Jump to content
  • Advertisement
Sign in to follow this  
Javier Brannigan

What do I need to run real-time multiple physics worlds on server side?

This topic is 937 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'm making a Real-time multiplayer game, which also includes physics, I'm working with node.js, socket.io on the backend and Phaser on the client Side.

Till now I was running the logic on the client side and sending the velocity and position through sockets to all the clients, but obviously it doesn't works well(And we haven't even started to talk about cheating).

So, what I need is to run the logic and physics of the game in the server side, sending just the inputs on the client, and receiving the position from the server.

Well, for now it's simple, as any other multiplayer game.

The problem is that I'm going crazy, I have seen many tutorials but I don't even know where to start, because my programming skills are limited and the tutorials didn't help me, what I would need is a framework or tutorial which allows me easily to run several worlds(The game has different rooms), in whose physics have to be calculated as fast as possible.

So I ask, has someone done or found any tutorial which does that?

Share this post


Link to post
Share on other sites
Advertisement

sounds like what you need is a game engine that supports multiplayer and serve side physics. poll for input or queue input packets then process, then broadcast results.

Share this post


Link to post
Share on other sites

sounds like what you need is a game engine that supports multiplayer and serve side physics. poll for input or queue input packets then process, then broadcast results.

 

That's another option I'm wasking for, one easy to use, I will need to use a DB in the future too, to make an entire web around the game, but I don't know if, for example Construct 2, has enough potential to do that because it's without programming, but I would love to.

What i need is a easy engine which serves that, as easy as possible, or some example/template of what I'm looking for, in box2d physics, for example.

Share this post


Link to post
Share on other sites

I don't even know where to start, because my programming skills are limited


Note that distributed systems programming is some of the most challenging parts of software development. It's not a good area for learning the basics in.
It's possible that the fastest way to where you want to go, actually goes through a few smaller projects where you can learn each thing separately.
So, try building a physics-based client-only single-player game.
Then try building something that's client/server, but doesn't use physics. (Chess? Poker? A forum?)
Then, you'll probably have a better foundation to attempt what you're trying to do.

Another option is to just try Unity or Unreal engines. They can both compile to JavaScript if you need to.

Share this post


Link to post
Share on other sites


Note that distributed systems programming is some of the most challenging parts of software development.

 

As Phil Karlton has reportedly said, "There are only two hard things in computer science: cache invalidation, and naming things" Distributed systems programming includes LOTS of both, so it should be indeed among the most challenging ones ;-) .

 

P.S. My apologies for off-topic, but I couldn't help myself...

Share this post


Link to post
Share on other sites
The popular vernacular version of that statement is my favorite!
"There's only two hard things in computer science: Cache invalidation, naming things, and off-by-one errors!"

Share this post


Link to post
Share on other sites


"There's only two hard things in computer science: Cache invalidation, naming things, and off-by-one errors!"

 

I love this one too ;-) (BTW, Leon Bambrick from secretGeek says he's the one who added 'off-by-one' bit: https://twitter.com/codinghorror/status/506010907021828096 ), but as off-by-one errors are not specific to distributed computing, I've decided to skip it this time :-) 

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!