Page 1 of 2

World Persistance

Posted: Mon Feb 09, 2009 4:02 am
by Aliuar2
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

Re: World Persistance

Posted: Tue Feb 10, 2009 4:31 pm
by dandymcgee
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.

Re: World Persistance

Posted: Tue Feb 10, 2009 7:14 pm
by LeonBlade
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
What do you mean by "server-side"? Are you implying that this is a network game or something...
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.

Re: World Persistance

Posted: Tue Feb 10, 2009 7:15 pm
by eatcomics
LeonBlade wrote:
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
What do you mean by "server-side"? Are you implying that this is a network game or something...
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.
Or server and client programming! :lol:

Re: World Persistance

Posted: Tue Feb 10, 2009 7:49 pm
by MarauderIIC
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?

Re: World Persistance

Posted: Wed Feb 11, 2009 10:44 am
by Falco Girgis
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.

Re: World Persistance

Posted: Wed Feb 11, 2009 11:34 am
by trufun202
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.
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.

It worked, but probably didn't implement the best / most efficient practices.

Re: World Persistance

Posted: Wed Feb 11, 2009 1:00 pm
by MarauderIIC
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

Re: World Persistance

Posted: Wed Feb 11, 2009 1:46 pm
by trufun202
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

Re: World Persistance

Posted: Wed Feb 11, 2009 6:31 pm
by LeonBlade
GyroVorbis 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.
Well he didn't say network game so I thought he said client/server for something else and I was like "WTF" but yeah... lol
My help was the best and you know it... >.>

Re: World Persistance

Posted: Wed Feb 11, 2009 9:53 pm
by Falco Girgis
LeonBlade wrote:
GyroVorbis 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.
Well he didn't say network game so I thought he said client/server for something else and I was like "WTF" but yeah... lol
My help was the best and you know it... >.>
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.

Re: World Persistance

Posted: Wed Feb 11, 2009 9:55 pm
by trufun202
GyroVorbis wrote:a game to get his girlfriend to do anal.
!!

You will find me this game, yes?

Re: World Persistance

Posted: Wed Feb 11, 2009 9:59 pm
by andrew

Re: World Persistance

Posted: Wed Feb 11, 2009 11:01 pm
by LeonBlade
GyroVorbis wrote:
LeonBlade wrote:
GyroVorbis 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.
Well he didn't say network game so I thought he said client/server for something else and I was like "WTF" but yeah... lol
My help was the best and you know it... >.>
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.
LOL leave me alone :|
Besides... I thought you hated OO...
And I didn't know if he knew OO or not so that's why I said that.

Re: World Persistance

Posted: Wed Feb 11, 2009 11:59 pm
by Aliuar2
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