🎉 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!

How to structure my pure client/server model properly?

Started by
12 comments, last by deftware 7 years, 9 months ago

There really is no simple solution to this game loop stuff.


For PCs where the render time is too divergent to test and control for.
Consoles can just lock at 60 Hz and call it good.
Used to be, PAL locked at 50 and caused trouble for NTSC games and vice versa; with modern digital TV systems that's no longer as much of a problem.

Also: One of the main drawbacks of the Unreal Engine is that is doesn't let you fix the timestep. Certain kinds of physics wlll occasionally go "boing" in Unreal games on PC because of this, when a time step becomes longer for some reason.
So, it's possible to ship certain kinds of games with certain kinds of networking on variable time steps. I just wouldn't recommend it :-)
enum Bool { True, False, FileNotFound };
Advertisement

It sounds like you have a lot of work to do concerning how to actually create a game, let alone a multiplayer one. I have had many false-starts since my teenage years insofar as creating a game engine is concerned, and it took me a solid 10 years (with a lot of Real-Life getting in the way over that time) before I finally started figuring it all out. You could say I was super naive from the get-go, I knew how to render some stuff and have an array of entities with positions and velocities, but I had no idea how to actually build something that was manageable without coding myself into a corner that rendered the entire project hopeless and requiring a complete re-write (or some serious surgery that I had no patience for once I realized the horror of my code-design mistakes).

I have started many game engine projects over the years, each time thinking I had it all figured out, until I coded them to the point where it was obvious I still had some learning to do. I am finally *just now* releasing something, after spending 20+ years learning the ins-and-outs of game development, which I've been working on for over 2.5 years (again with Real-Life interfering along the way) and it's something I'm super proud of and excited about, and I couldn't have done it without learning everything that it took me to learn over all this time.

I guess what I'm trying to say is, don't give up, you probably won't get it your first try, but trying is how I learned, so go for it, but it can't hurt to have a realistic perspective of what you're going to be capable of starting with barely enough knowledge to make a single player game. If you won't have to deal with all the problems I did in my life you'll get there a lot quicker than I did.

If you're curious to see what I've managed to do check out my blog: http://deftware.blogspot.com

My game is called Bitphoria, and it's the product of wanting to make a multiplayer FPS game since the 90s when multiplayer shooter games were just in their infancy.

and it took me a solid 10 years (with a lot of Real-Life getting in the way over that time) before I finally started figuring it all out

When I saw the name "Real-Life", it really reminded of "Half-Life" and I thought that this is a game that was made long time ago and it got so popular that they based Half-Life on it and I was really mad at myself that I haven't even heard that name. Then I searched on Google, didn't found anything, then figured out that you are actually talking about the real life. I mean outside of games.

after spending 20+ years learning the ins-and-outs of game development

Man, it took you 20 years to make a multiplayer game. :o

I started 10 months ago, and I really hope Real-Life doesn't interfere too much( for now I don't even have it :lol: ) because I don't want to spend all my life making some shitty fps. :lol:

It sounds like you have a lot of work to do concerning how to actually create a game, let alone a multiplayer one

True. I decided to postpone the multiplayer by three or four weeks, so I can structure the game loop and add inter/extra-polation in my render() function + some really basic graphics and even more basic cloth physics.(sounds like 2 months). :lol:

Thanks for the advice, by the way. It's really cool when I hear someone else did complete re-writes due to awful code. But result == time * productivity, so I guess there's no other way around this. You have to sacrifice quite a lot of time. Even if someone is very productive, he still needs a whole lot of time.

You will make it if you keep at it, I believe that whole-heartedly. That's really what separates the successful from the unsuccessful: the will to keep at it until success is achieved. Where there's a will there's a way!

...and yes, it took me a long time, because I had to deal with a lot of problems/mistakes I made in life when I was younger, and allowed myself to get distracted and lose focus. But, making a game was something I consistently came back to. So, ultimately, I just had to fully commit and tell myself "I am making a game" and that there were no two ways about it.

Even after that I still got distracted with another project (making specular holograms and building a CNC machine to do it) and that took me 6 months to get out of my system before realizing how much I had already accomplished with my game working on it for over a year solidly, and that I shouldn't let all that hard work go to waste, so I dove right back in and picked up right where I left off.

This topic is closed to new replies.

Advertisement