World Persistance
Moderator: Coders of Rage
World Persistance
I've written a simple 3D engine that lets me animate a model and move inside buildings/on terrain.
I've written a simple world server that uses I/O Completion Ports and handles authentication - and game state.
I want to know what the best way to deal with tracking player position is? Should I be doing Matrix Transforms on the server side ?
I appreciate any advice,
Thanks,
John
I've written a simple world server that uses I/O Completion Ports and handles authentication - and game state.
I want to know what the best way to deal with tracking player position is? Should I be doing Matrix Transforms on the server side ?
I appreciate any advice,
Thanks,
John
- dandymcgee
- ES Beta Backer
- Posts: 4709
- Joined: Tue Apr 29, 2008 3:24 pm
- Current Project: https://github.com/dbechrd/RicoTech
- Favorite Gaming Platforms: NES, Sega Genesis, PS2, PC
- Programming Language of Choice: C
- Location: San Francisco
- Contact:
Re: World Persistance
I'm afraid I have absolutely no idea about your problem but I figured I'd welcome you to the forums anyways. Nice to see yet another great programmer around here.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches!
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: World Persistance
What do you mean by "server-side"? Are you implying that this is a network game or something...Aliuar2 wrote:I've written a simple 3D engine that lets me animate a model and move inside buildings/on terrain.
I've written a simple world server that uses I/O Completion Ports and handles authentication - and game state.
I want to know what the best way to deal with tracking player position is? Should I be doing Matrix Transforms on the server side ?
I appreciate any advice,
Thanks,
John
Create a class that holds the player with Position as a property so you can track it that way, and update it all in the class as well...
I cannot say much else, I don't know much of anything about your project.
There's no place like ~/
Re: World Persistance
Or server and client programming!LeonBlade wrote:What do you mean by "server-side"? Are you implying that this is a network game or something...Aliuar2 wrote:I've written a simple 3D engine that lets me animate a model and move inside buildings/on terrain.
I've written a simple world server that uses I/O Completion Ports and handles authentication - and game state.
I want to know what the best way to deal with tracking player position is? Should I be doing Matrix Transforms on the server side ?
I appreciate any advice,
Thanks,
John
Create a class that holds the player with Position as a property so you can track it that way, and update it all in the class as well...
I cannot say much else, I don't know much of anything about your project.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: World Persistance
Sorry for the probably basic thing here, but the 'old' way to do it is to send velocity vectors, IIRC. So like, you might have like a .05 second resolution and you'd send
"Player 4 moved at 30 degrees for .05 seconds" at which point you'd resolve the position (factoring in gravity and acceleration and whatever) on the server side. Send them to the client the same way. Edit: And make the client apply gravity and accel and stuff.
Is that what you mean?
"Player 4 moved at 30 degrees for .05 seconds" at which point you'd resolve the position (factoring in gravity and acceleration and whatever) on the server side. Send them to the client the same way. Edit: And make the client apply gravity and accel and stuff.
Is that what you mean?
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: World Persistance
I'm pretty sure that LeonBlade offered the most useless advice that I have ever seen. XD
I honestly can't say that I have done much other than basic networking/server interaction. I wouldn't be able to offer anything other than probably what Marauder said.
I honestly can't say that I have done much other than basic networking/server interaction. I wouldn't be able to offer anything other than probably what Marauder said.
- trufun202
- Game Developer
- Posts: 1105
- Joined: Sun Sep 21, 2008 12:27 am
- Location: Dallas, TX
- Contact:
Re: World Persistance
Yeah, I'm in the same boat. And friend and I tried to make an MMO (and didn't get far), but I focused on the engine while my friend worked on the network layer.GyroVorbis wrote:I honestly can't say that I have done much other than basic networking/server interaction. I wouldn't be able to offer anything other than probably what Marauder said.
It worked, but probably didn't implement the best / most efficient practices.
- MarauderIIC
- Respected Programmer
- Posts: 3406
- Joined: Sat Jul 10, 2004 3:05 pm
- Location: Maryland, USA
Re: World Persistance
I can do telnet-like things but I have no experience sending large amounts of data to large amounts of players, sorry. I could get away with sending packets of text with what I was doing. If you haven't, you might check out Beej's Guide to Network Programming (there's a link in our guides & resources thread), but I'm not sure how much help it'd be. Sorry we haven't been of much assistance. Also, whatever solution you come up with, please share so the rest of us can learn :D
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
- trufun202
- Game Developer
- Posts: 1105
- Joined: Sun Sep 21, 2008 12:27 am
- Location: Dallas, TX
- Contact:
Re: World Persistance
The XNA Creator's Club has a sample project on Network Prediction with a 2 player tank game.
The code is going to be in C#, obviously, but it might give you some ideas.
For the record, I haven't downloaded the project, but I saw it and thought it might help.
http://creators.xna.com/en-US/sample/networkprediction
The code is going to be in C#, obviously, but it might give you some ideas.
For the record, I haven't downloaded the project, but I saw it and thought it might help.
http://creators.xna.com/en-US/sample/networkprediction
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: World Persistance
Well he didn't say network game so I thought he said client/server for something else and I was like "WTF" but yeah... lolGyroVorbis wrote:I'm pretty sure that LeonBlade offered the most useless advice that I have ever seen. XD
I honestly can't say that I have done much other than basic networking/server interaction. I wouldn't be able to offer anything other than probably what Marauder said.
My help was the best and you know it... >.>
There's no place like ~/
- Falco Girgis
- Elysian Shadows Team
- Posts: 10294
- Joined: Thu May 20, 2004 2:04 pm
- Current Project: Elysian Shadows
- Favorite Gaming Platforms: Dreamcast, SNES, NES
- Programming Language of Choice: C/++
- Location: Studio Vorbis, AL
- Contact:
Re: World Persistance
You basically said "have a player class." That would be a "no shit" if he were making an offline game, an online game, a text based game, a game for his mom, or a game to get his girlfriend to do anal. That would be a no shit in any programming language that allows basic OO.LeonBlade wrote:Well he didn't say network game so I thought he said client/server for something else and I was like "WTF" but yeah... lolGyroVorbis wrote:I'm pretty sure that LeonBlade offered the most useless advice that I have ever seen. XD
I honestly can't say that I have done much other than basic networking/server interaction. I wouldn't be able to offer anything other than probably what Marauder said.
My help was the best and you know it... >.>
- trufun202
- Game Developer
- Posts: 1105
- Joined: Sun Sep 21, 2008 12:27 am
- Location: Dallas, TX
- Contact:
Re: World Persistance
!!GyroVorbis wrote:a game to get his girlfriend to do anal.
You will find me this game, yes?
Re: World Persistance
Some articles from Gamasutra that should be pretty relevant:
Internet Game Design
1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond
Instant Replay: Building a Game Engine with Reproducible Behavior
Internet Game Design
1500 Archers on a 28.8: Network Programming in Age of Empires and Beyond
Instant Replay: Building a Game Engine with Reproducible Behavior
- LeonBlade
- Chaos Rift Demigod
- Posts: 1314
- Joined: Thu Jan 22, 2009 12:22 am
- Current Project: Trying to make my first engine in C++ using OGL
- Favorite Gaming Platforms: PS3
- Programming Language of Choice: C++
- Location: Blossvale, NY
Re: World Persistance
LOL leave me aloneGyroVorbis wrote:You basically said "have a player class." That would be a "no shit" if he were making an offline game, an online game, a text based game, a game for his mom, or a game to get his girlfriend to do anal. That would be a no shit in any programming language that allows basic OO.LeonBlade wrote:Well he didn't say network game so I thought he said client/server for something else and I was like "WTF" but yeah... lolGyroVorbis wrote:I'm pretty sure that LeonBlade offered the most useless advice that I have ever seen. XD
I honestly can't say that I have done much other than basic networking/server interaction. I wouldn't be able to offer anything other than probably what Marauder said.
My help was the best and you know it... >.>
Besides... I thought you hated OO...
And I didn't know if he knew OO or not so that's why I said that.
There's no place like ~/
Re: World Persistance
You guys have been really great, I'll work on the suggestions you mentioned and check out the articles.
I'll post full source code in a couple of weeks when I've refined things.
I really want this code to be a toolset for anyone who wants to make their own MMO, but I want to make it scalable and secure, so I will most likely do a ton of rewrites.
John
I'll post full source code in a couple of weeks when I've refined things.
I really want this code to be a toolset for anyone who wants to make their own MMO, but I want to make it scalable and secure, so I will most likely do a ton of rewrites.
John