🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

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

Started by
5 comments, last by Sergey Ignatchenko 8 years, 4 months ago

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?

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.

Norm Barrows

Rockland Software Productions

"Building PC games since 1989"

rocklandsoftware.net

PLAY CAVEMAN NOW!

http://rocklandsoftware.net/beta.php

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.

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.
enum Bool { True, False, FileNotFound };


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...

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!"
enum Bool { True, False, FileNotFound };


"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 :-)

This topic is closed to new replies.

Advertisement