santiagoestrade's Forum Posts

  • Oh... I see. I shouldn't have closed the remote preview window on the editor... haha I feel the most stupid on earth. The good point is I can now set up any feature of multiplayer with my eyes closed.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I am trying to test a multiplayer game, so tried to open a remote preview on another device. But is always returning 'error: join failed'. That's even before connecting to the signalling server, on an 'offline' layout. I tried to remote preview some other NON-multiplayer games and always returns the same error. It is not about my multiplayer events. I cannot remote preview at all. I thought it might be something about device's webGL, but happens on every one. Could be a bug or should I set or check something on the browser, for instance?

    1drv.ms/u/s!AojCIgmN1VlPgYcOydc4TAO4xp4M-Q

  • Thanks a lot. I misunderstood what 'send message' stands for. I thought it was like sync variable, but for strings. Now I see it's just that. One-time sending any given value as a string, not updating it automatically.

  • GeorgeZaharia dop2000

    Thanks both!

  • Today it seems that the whole tutorials sections of the web has been moved from scirra.com to construct.net.

    The only point with that is I cannot find the attached capx to download!

    They used to be on the upper left corner, yet with the new design they're gone.

    Yesterday I copied the series of multiplayer tutorials and printed them. But I got late today to download the examples.

  • I am making a multiplayer strategy war game and still struggling to make each player can choose his troops.

    Before connecting to the server or the host, a player enters an 'army selection' layout. There, one can choose the amount of each different unit he is going to use and their weapons/armor. Their stats are then stored as variables and its skins as animations/frames (I could make some sprites as layers and change effects if sync animations produces lag, doesn't matter, troops are not even animated at all).

    The point is when choosing his army, player is still offline. So I cannot send message or sync. I want the host catches those variables stored on peer's side, so it can create the right troops and set their right skins.

    Every tutorial I have seen takes a standard character for both players, so it is not explained. And the posts on the forum that talk about it just have links to capx explaining it, but none are still available for downloading.

    It must be something pretty basic, for many games allow for character/army/team customization offline, but I have no experience with multiplayer and cannot find any examples.

  • rojohound

    Ok, no slow down. So, as long as I don't loop through the array/JSON everytick and it is not really big, I won't notice.

    Then I am sticking to JSON as standard. It safes me translating the format and allows the use of same structures for the project files and DB from the server (c2array:true size:blabla data:blabla.... off). Needn't parsing backwards AsJson for uploading either.

    Moreover it feels rather natural having each item's data nested inside it, instead of deploying sorted data by index. Retrieving and inserting without tokenat nor looping. Just string path. Definitely JSON.

    Thanks a lot.

  • I haven't been able to find any topic on this, since most posts about arrays are before the new built-in JSON plugin was born.

    I am making a card game and have serious doubts about the way to arrange the deck. There will be much card sorting, which used to be done with arrays. Yet I have seen that, though not on the manual, there are pop/push, sort and insert/delete actions for the JSON object.

    My question is- since JSON is supposed to be quite fast at accesing for it uses path ID, would it be performance wiser to work straight with a JSON, instead of loading an array?

    However, on the documentation, Ashley says Construct JSON is not actually on native layer Javascript. So I am a bit confused.

    I don't need the data to be sorted in rows&columns anyway.

    Would it be faster to handle a deck of cards by parsing a JSON or loading an array? Do loops and tokenAt behave the same with both? Or the JSON path stuff speeds it further up?

    I mean reading and writing too. Pretty much shuffling and sorting, like I said.

    Maybe Ashley can give me a hint.

  • It's totally worth its price.

    First of all- firebase. Nothing to add there, everyone knows and uses it. Unless you spend some time with it and learn a min code, you'll need it.

    Second- Playfab. Great suit for multiplayer game dev. I wasn't quite sure, for it was hard to think Firebase could be beaten. But hell it does. Every feature is a must-have for a any multiplayer toolkit (real-time DB, leaderboard, player segmentation, reward system, multiple stores...). And they are adding some quite spicy stuff in a near future.

    I haven't tried AI, for I have it all already set up through events, yet sounds promising.

    Process is also a nice help- it seems an advanced FSM. Not messed with its conditions yet, but guess it has some time-related and bi-relational checks to expand the basic VAR+timer+function_callback mechanics.

    The Mobile suit is also very well fitting, as far as I have been able try (six Android devices from 5.something on- Huawei, Samsung and Sony, all brands with added layer of UI, yet not checked on IOS).

    So, basically, if someone does not code at all and is thinking on MMORG, MOBA, RTS, or any large server multiplayer game, he'd rather be getting this. The best bet will be Firebase or Playfab 99% times. And they both need some auth rules, dependence adding, and general API set up.

  • Nevermind. I was answering his first post, where, if you take a look at his snippet screenshot, the object compared was the player. and he wasn't comparing to zombie object, but to an expression from the system condition. Simply was the position of a zombie refered, but not its instance picked.

    If you say system compare object1 to (position where object2 is) it doesn't pick object2. That was my point. So be two objects2, runtime 'crashes' for there is not fixed reference, but several to choose from at the time of setting animation.

    System needs to know which zombie are you talking about, for the action itself is setting a different anination to that specific zombie that is near the player, but not the rest. With the previous one, at the pkayer getting close to ANY zombie without picking, system will animate... which one? It doesn't know.

    Now I see after your comments, which I apologize not reading before posting, je changed the comparison to the zombie object, so now it's fine. I got late.

  • Or set an instance variable to every character/enemy/obstacle height, so that you can compare to enable or disable solid.

    IF

    System compare two values: Character.Height > Obstacle.Height

    THEN

    Character set solid disabled

    And by my very little experience, if no physics involved nor a proper platformer, I'd use XY position conditions rather than collision or overlap.

  • I have not worked that much with multi screen, but have read somewhere that Browser object has a condition for comparing screen orientation (portrait/landscape), so you can set fullscreen on/off with it.

    - Browser compare landscape >

    > Browser request fullscreen

    - Else >

    > Browser cancel fullscreen

  • How do you want the tweening to start? It needs to have a proper one-time trigger, so if you have something like a system comparison (when a variable = X number or something like that), it won't work.

    A simple workaround is to set a function. You say:

    - system compare VAR = number >

    > call function "TweenStart" (sprite.UID)

    - On "TweenStart" >

    - pick Sprite by UID = function.param(0)

    > Tween one property (size or scale, I don't remember) in 8 seconds

    It needn't be a variable check. Anything that you need to start the scaling and is not a trigger, call a function in between :p to make it a trigger.

    In case you have more than one instance, then you will need to pass its UID as a parameter to the function to retrieve it and pick the right one at tweening.

    Maybe it is not your case, but I run into a similar issue these days when switching from old C2 Rex MoveTo to new shiny built-in Tween. Sprites didn't start moving at all. And then noticed this.

  • dop2000

    I'm no senior but remember Ashely explaining picking at some post regarding loops, arrays, picking and tokenat. He said picking always act as a loop. Runtime checks condition for every instance to see if that instance meet the criteria. The issue here seems to be that the expression choose() is rrseted for every isntance checking. One would expect that at the beginning of the event, it chosed a number and compared that 'now-constant' number for every instance. But it chooses a new number for every instance, because it runs the entire condition from the start for each instance, not just from choose(). Which is kinda weird, given the expression box at a very primitive level is meant for fixed strings or numbers, so my logic also tells me it should treat the expression as a variable to call from at the beginning of the action-function.

    I am no programmer, but recalling his words about it, the whole picking system works like that at a core level, so it is not likely to change in a near future, as it would imply the same code rewriting many SDK folks have complained about C3 runtime.

    I think here the only way is the typical workaround of setting the VAR in advance, as you indeed had tought me in other posts in the past.

    BTW, a bit odd to see you around asking things, instead of solving them :p

    Have a nice year!

  • You could give them bullet behaviour. It has a property called 'Bounce off solids'. It might fit, depending on how much you want the light to overlap. You could set the collision box to a minimum.