Sign in to follow this  

Concept of an two player platformer...

This topic is 4692 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I think I have come up with a pretty good idea of how a multiplayer playformer would be done. Tell me what you think. //Host send x cordniate recieve 2player x cord send y cord reviece 2player y cod //server recieve x send x recieve y send y I would run that during the game loop every time so no matter what happens it will always be sent over. Does that seem plausable before I go and code it?

Share this post


Link to post
Share on other sites
I wouldn't run it EVERY frame, Otherwise you could get a fast computer sending out thousands of updates every second :) Here's a few ideas:

- Try locking network updates to something like every 1/30th of a second (The exact update rate you need depends on your game).

- Remember that you're probably going to have more than two players moving around. Try to plan your network system around any number of objects.

- If you can predict the movement of an object, it is better to send events like "player 1 started a jump at (x, y)" or "create particle effect at (x, y) using this random seed", rather than specify every coordinate.

- For objects you can't predict, you'll need some sort of extrapolation to keep things looking as smooth as possible, and to handle network interruptions. Linear extrapolation often works well for many things.

- Don't keep resending the same information if it hasn't changed. If there are 50 pickups on the ground, you should only need to specify their position once each.

- Don't tie your updates to recieving bits of information each frame, otherwise you'll get bad framerates when the network is slow.

- Use UDP instead of TCP when sending information that you're going to be resending the next frame anyway. If a packet fails to get sent, UDP won't bother trying to resend it.

I hope I haven't said too much and confused you :)

Share this post


Link to post
Share on other sites

This topic is 4692 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this