World Persistance

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Aliuar2
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 8
Joined: Mon Feb 09, 2009 3:56 am

World Persistance

Post 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
User avatar
dandymcgee
ES Beta Backer
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

Post 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.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
LeonBlade
Chaos Rift Demigod
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

Post 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.
There's no place like ~/
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
Posts: 2528
Joined: Sat Mar 08, 2008 7:52 pm
Location: Illinois

Re: World Persistance

Post 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:
Image
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: World Persistance

Post 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?
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
Falco Girgis
Elysian Shadows Team
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

Post 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.
User avatar
trufun202
Game Developer
Game Developer
Posts: 1105
Joined: Sun Sep 21, 2008 12:27 am
Location: Dallas, TX
Contact:

Re: World Persistance

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

YouTube | Twitter | Rad Raygun

“REAL ARTISTS SHIP” - Steve Jobs
User avatar
MarauderIIC
Respected Programmer
Respected Programmer
Posts: 3406
Joined: Sat Jul 10, 2004 3:05 pm
Location: Maryland, USA

Re: World Persistance

Post 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
I realized the moment I fell into the fissure that the book would not be destroyed as I had planned.
User avatar
trufun202
Game Developer
Game Developer
Posts: 1105
Joined: Sun Sep 21, 2008 12:27 am
Location: Dallas, TX
Contact:

Re: World Persistance

Post 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
-Chris

YouTube | Twitter | Rad Raygun

“REAL ARTISTS SHIP” - Steve Jobs
User avatar
LeonBlade
Chaos Rift Demigod
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

Post 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... >.>
There's no place like ~/
User avatar
Falco Girgis
Elysian Shadows Team
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

Post 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.
User avatar
trufun202
Game Developer
Game Developer
Posts: 1105
Joined: Sun Sep 21, 2008 12:27 am
Location: Dallas, TX
Contact:

Re: World Persistance

Post by trufun202 »

GyroVorbis wrote:a game to get his girlfriend to do anal.
!!

You will find me this game, yes?
-Chris

YouTube | Twitter | Rad Raygun

“REAL ARTISTS SHIP” - Steve Jobs
andrew
Chaos Rift Regular
Chaos Rift Regular
Posts: 121
Joined: Mon Dec 08, 2008 2:12 pm

Re: World Persistance

Post by andrew »

User avatar
LeonBlade
Chaos Rift Demigod
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

Post 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.
There's no place like ~/
Aliuar2
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 8
Joined: Mon Feb 09, 2009 3:56 am

Re: World Persistance

Post 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
Post Reply