Page 1 of 1
[GroundUpEngine] Drunk design
Posted: Tue Mar 02, 2010 4:55 pm
by GroundUpEngine
Been drinking beer all night, but felt like doin sum code/design. So the test code will do dis, every 60 frames or whatever:
If it good I use it :D paint ftw!
Re: [GroundUpEngine] Drunk design
Posted: Tue Mar 02, 2010 5:28 pm
by K-Bal
Haha
Client/Server programming sucks hard
Re: [GroundUpEngine] Drunk design
Posted: Tue Mar 02, 2010 6:40 pm
by RyanPridgeon
Have you reached the "Ballmer effect"?
In all seriousness though (for when you sober up):
I believe most engines work on a basis where the only information sent to the server is user input such as key presses and view transformation. The server does all the real work, whereas the client just SIMULATES the server inbetween updating when the server sends back the status updates.
Also I would have the server also store the state every "tick" (such as 60 times a second). This allows you to go back a few steps using the ping of a player to find out when they actually pressed that input, so that you can interpolate back up to the present "tick" to reduce delay between input and reaction.
But I'm no expert, I just read this stuff here and there. So take it or leave it I guess ;D
Re: [GroundUpEngine] Drunk design
Posted: Wed Mar 03, 2010 9:47 am
by GroundUpEngine
K-Bal wrote:Haha
Client/Server programming sucks hard
lol Agreed man!
RyanPridgeon wrote:Have you reached the "Ballmer effect"?
lmao I wish
RyanPridgeon wrote:In all seriousness though (for when you sober up):
I believe most engines work on a basis where the only information sent to the server is user input such as key presses and view transformation. The server does all the real work, whereas the client just SIMULATES the server inbetween updating when the server sends back the status updates.
Also I would have the server also store the state every "tick" (such as 60 times a second). This allows you to go back a few steps using the ping of a player to find out when they actually pressed that input, so that you can interpolate back up to the present "tick" to reduce delay between input and reaction.
But I'm no expert, I just read this stuff here and there. So take it or leave it I guess ;D
rofl Spot on man!
Wasn't thinkin' straight last night, just wanted to make quick basic mulitplayer rig
**However the first half of my design (which I managed to code), was kinda viable but the idea I've got from some research is**
Code: Select all
--Client--
while( user does not exit )
check for user input
send commands to the server
receive updates about the game from the server
draw graphics
play sounds
end
Code: Select all
--Server--
while( true )
check for client commands
run AI
move all entities
resolve collisions
send updates about the game to the clients
end
Re: [GroundUpEngine] Drunk design
Posted: Wed Mar 03, 2010 10:04 am
by K-Bal
For simple stuff it's okay but you probably don't want to send data every frame
Re: [GroundUpEngine] Drunk design
Posted: Wed Mar 03, 2010 11:15 am
by Milch
If I had to do a server/client system, I would go after Valves approach:
http://developer.valvesoftware.com/wiki ... Networking
Re: [GroundUpEngine] Drunk design
Posted: Wed Mar 03, 2010 2:02 pm
by K-Bal
That is actually a very good resource. Thanks
Re: [GroundUpEngine] Drunk design
Posted: Wed Mar 03, 2010 2:11 pm
by GroundUpEngine
K-Bal wrote:
That is actually a very good resource. Thanks
/agreed
Cheers!
Re: [GroundUpEngine] Drunk design
Posted: Fri Mar 26, 2010 2:09 pm
by Arce
Wow! XD
I'm drunk atm, and too damned scared to touch any lines of code. XDDD
-pops 4th beer-
Though, to be completely honest, I'm impressed by what you've accomplished! Haha. In my current state I can't really decipher whether it's a good design or not, but regardless! Great job man! Sorry I didn't respond to this topic as it was actually relevant. :P
Somehow I don't quite realize how much I love the community we've formed here until I'm drunk. Hmmmmmm.........
....
....
Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P
Re: [GroundUpEngine] Drunk design
Posted: Fri Mar 26, 2010 3:44 pm
by RyanPridgeon
Arce wrote:
Somehow I don't quite realize how much I love the community we've formed here until I'm drunk. Hmmmmmm.........
....
....
Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P
No way dude, this is my favorite online community. It's small enough for everyone to know each other, and big enough to actually be active and fun :D
Re: [GroundUpEngine] Drunk design
Posted: Fri Mar 26, 2010 4:02 pm
by GroundUpEngine
Thanks
Arce
I agree! This community is my favourite too there some really great people here creative, young, smart developers! Totally awesome
p.s. Maybe I get back on this stuff after I get some GLSL and Physics Integration done, but the approach will be sending the current state of the world
instead of player data, so the clients can simulate everything like Source Engine
Re: [GroundUpEngine] Drunk design
Posted: Fri Mar 26, 2010 6:09 pm
by hurstshifter
Arce wrote:
Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P
You know how I know you're gay? You're posting in this thread.
Re: [GroundUpEngine] Drunk design
Posted: Fri Mar 26, 2010 8:49 pm
by RyanPridgeon
hurstshifter wrote:Arce wrote:
Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P
You know how I know you're gay? You're posting in this thread.
MOTHAFU-
Re: [GroundUpEngine] Drunk design
Posted: Fri Mar 26, 2010 11:27 pm
by GroundUpEngine
hurstshifter wrote:Arce wrote:
Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P
You know how I know you're gay? You're posting in this thread.