troublesum's Recent Forum Activity

  • https://dl.dropbox.com/u/5779181/C2Repo/Zip/behaviors/rex_moveto.7z

    find the help documentation for installing plugins. This plugin is a move to command that can be executed for sprites.

  • An alternate way would be simply call the functions simultaneously on each device. This ensures the animation you want is the same becuase both devices call the same function. It works really nice for me.

    [attachment=0:dt756ie8][/attachment:dt756ie8]

    Note: You will need the MoveTo Plugin by Rex for this to work

    I created a small plat-former example where every action is synced by performing function calls. I don't sync any objects or do association. I've found this to be a faster solution to compensate for lag for synced behaviors that already take dt (time dependent events) into account. Its a little complicated to follow and ill see what i can do about putting in some comments but check it out and see if it will work for you.

    Just open the example in 2 browsers. On the screen at the top enter the room name (it should bee the same so they join the same room). Then give each player a name and click connect. (I got little lazy and it only supports 2 players so if you join more than 2 in the room it will break)

    What I do is make everything a function call and simulate actions. When player 1 presses left.. he calls a function to simulate moving left on his screen and at the same time sends a multiplayer message to other players that tells them to call the exact same function for player 1 on their screen.. Everyone sees the same thing and instead of syncing for every X,Y change i send a single message and tell it to persist until i tell it to stop. The move to is just the last piece that fires off to ensure the players are where they are supposed to be on each other screen. (This example is missing some other code i put in to correct for speed differences in the devices but it still works really well and should be a good starting point)

    The trick and complicated part is that using this method i send only 3 packets to move a player all the way across the screen instead of sending lots of x,y updates. Movement is smooth and timely. How this is possible that the sender can tell the receiver to persist the function (continuously call it) so I only send the move left command once and tell it to persist on the receiving device. the receiving device continuously calls the function until i tell it to stop... (Its the same way wireless signals in remote controlled cars work as I have some history in that field this is where i got the concept).

    Ashley I'm curious to get your thoughts on this method as I'm sure its very unconventional but would it be useful to add action to the multiplayer plugin to make function calling cross device easier? Constructive criticism is always welcome.

  • [attachment=0:1er4zmnp][/attachment:1er4zmnp]

    What your viewing is the view window notice the lines on the layout... they are showing you the screen size which is much smaller than the entire layout.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If i remember correctly triggers fire off independently of conditions they are placed in so they should be on the outside of the condition. Try putting the "On" triggers on the out side of the condition and the if(idle,approach) inside them.

  • I should make a correction.. the only lag to account for is if the receiving device runs slower than the sending... for long persisted action calls i inject a set position every half second or so on my games (not in this example) to make sure players are correctly positioned. So its technically more than 3 packets but somewhere in the order of 5-20 depending on the distance between move/stop actions but still far fewer than normal multiplayer associated variables

  • I don't think you understand.. to move a player half way across the screen I send 3 packets (3) instead of sending hundreds of x,y position for every change and have choppy lag for input prediction.. i assure you this is more compressed and more accurate as there is no lag to account for. did you try it and see how smooth immediate the changes are?

  • [attachment=0:1yxn2g5u][/attachment:1yxn2g5u]

    Note: You will need the MoveTo Plugin by Rex for this to work

    Ok so here it is... Its a little complicated and i got really lazy towards the end so I revisit later and upload with full comments (maybe make a tutorial) but here you set the room name, and player name and then connect. Each player will only scroll to them selves and see whaty other players are doing at the same time. (Also i got lazy and it only supports 2 players so if more than 2 go in the room it will break)

    Any way I also do things very different from how Ashley does (no discounting his genius i just do things different). I hated the lag that occurred from associating objects so i built a highly compressed data transmission method. What I do is make everything a function call and simulate actions. When player 1 presses left.. he calls a function to simulate moving left on his screen and at the same time sends a multiplayer message to other players as a dictionary JSON string they the decode and tells them to call the exact same function for player 1 on their screen.. Everyone sees the same thing and instead of syncing for every X,Y change i send a single message and tell it to persist until i tell it to stop. the move to is just the last peice that fires off to ensure the players are where they are supposed to be on each other screen.

    Take a look.. Hopefully it helps.. Again I'm sorry for not commenting but i got a little tired pulling this out of my code to make an example.

  • You need to assign the peerid to each player and then select player where instance = peer and set scrollto... this will set it so that each player scrolls to just there player

    In my example I have global var called MyPlayerID which is the peerid from the multiplayer instance. When I spawn the the player I set its id variable to the peerid as well. then I select the player where id = MyPlayerID and set scroll to for just that object. Ignore the single playertest condition from my example as I use it that when im testing the game in single player mode

    [attachment=0:3qksmq7k][/attachment:3qksmq7k]

    Hope this helps..

  • Reminds me of smash tv from super Nintendo... nice job

  • http://99designs.com/

    I have never used them but I read they were pretty good... might be worth a look. They basically crowd source logo designers and then you pick the one you want.

  • Never mind.. found it...

troublesum's avatar

troublesum

Member since 4 Dec, 2013

Twitter
troublesum has 2 followers

Trophy Case

  • 11-Year Club
  • Email Verified

Progress

12/44
How to earn trophies