Posted By
|
Message
|
Silveraura God's God
Registered 08/08/2002
Points 6747
|
26th June, 2006 at 14:17:03 -
I have a small request, something I am unable to do. The main reason for this, is for online, however I figure the principle would be the same offline too, so I'll keep my example in the form of an offline experiment.
Say you're creating a 2 player split screen game, with custom platform movement (a lot of triggers, fast loop, yada yada...) however, you want to make it so that your player shows up in the other persons screen. The option to rapidly send the X & Y of your player, to their screen would work, but it's not exactly performance friendly. Now say you want this game to handle more then 2 players... how can you do this?
Basically you have your standard custom platform movement, however, everything your player does based on your controls, needs to be fed to the other players in a method efficient enough so that they can 'guess' what your going to do, based on the limited information you send them. However, fast loop doesn't want to function correctly, and all those triggers for all those new players, drive you mad. In addition, you don't want to use a player 2, player 3, and player 4 object. You want to use 1 object for yourself, and 1 object for 2, 3, and 4. Each with an ID that calls themselves 2, 3, & 4. Just for more efficiency.
With this scenario in place, can anyone help me out here? Perhaps even an example?
http://www.facebook.com/truediamondgame
|
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
|
26th June, 2006 at 14:28:25 -
IDs can simply be achieved by spreading a value of 1 in the player objects, or for online things you could reserve one variable in the object that sets itself to a non-used following up number (like if number 1 and 2 exist, make the next entering person have ID 3).
I don't have much experience with dead reckoning, but you could try the following:
- Make a speed variable and tile x/y variables.
- Make an option in the game to set the amount of lag (from values 1-3).
- When the position of the player differs 1 to 3 tiles (depending on lag setting), send its values to the server.
This should be small enough for positioning to run smoothly, at least. You could additionally add jump or special move command sending, and maybe a BIT of triggers, which will auto-stop when they arrived on the next tile.
Lag can also be set up by making the tile zone larger or smaller, for faster/slower checking/sending.
Keep one thing in mind: these are IMAGINARY tiles, not on the screen but all done by the engine!
Old member (~2004-2007).
|
|
|