[GroundUpEngine] Drunk design
Moderator: Talkative People
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
[GroundUpEngine] Drunk design
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!
If it good I use it :D paint ftw!
Re: [GroundUpEngine] Drunk design
Haha
Client/Server programming sucks hard
Client/Server programming sucks hard
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: [GroundUpEngine] Drunk design
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
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
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] Drunk design
lol Agreed man!K-Bal wrote:Haha
Client/Server programming sucks hard
lmao I wishRyanPridgeon wrote:Have you reached the "Ballmer effect"?
rofl Spot on man!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
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
For simple stuff it's okay but you probably don't want to send data every frame
- Milch
- Chaos Rift Junior
- Posts: 241
- Joined: Sat Jul 11, 2009 5:55 am
- Programming Language of Choice: C++
- Location: Austria, Vienna
Re: [GroundUpEngine] Drunk design
If I had to do a server/client system, I would go after Valves approach:
http://developer.valvesoftware.com/wiki ... Networking
http://developer.valvesoftware.com/wiki ... Networking
Follow me on twitter!
Re: [GroundUpEngine] Drunk design
That is actually a very good resource. ThanksMilch wrote:If I had to do a server/client system, I would go after Valves approach:
http://developer.valvesoftware.com/wiki ... Networking
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] Drunk design
/agreedK-Bal wrote:That is actually a very good resource. ThanksMilch wrote:If I had to do a server/client system, I would go after Valves approach:
http://developer.valvesoftware.com/wiki ... Networking
Cheers!
Re: [GroundUpEngine] Drunk design
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
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
<qpHalcy0n> decided to paint the office, now i'm high and my hands hurt
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: [GroundUpEngine] Drunk design
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 :DArce 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
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] Drunk design
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
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
- hurstshifter
- ES Beta Backer
- Posts: 713
- Joined: Mon Jun 08, 2009 8:33 pm
- Favorite Gaming Platforms: SNES
- Programming Language of Choice: C/++
- Location: Boston, MA
- Contact:
Re: [GroundUpEngine] Drunk design
You know how I know you're gay? You're posting in this thread.Arce wrote: Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P
"Time is an illusion. Lunchtime, doubly so."
http://www.thenerdnight.com
http://www.thenerdnight.com
- RyanPridgeon
- Chaos Rift Maniac
- Posts: 447
- Joined: Sun Sep 21, 2008 1:34 pm
- Current Project: "Triangle"
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C/C++
- Location: UK
- Contact:
Re: [GroundUpEngine] Drunk design
MOTHAFU-hurstshifter wrote:You know how I know you're gay? You're posting in this thread.Arce wrote: Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P
- GroundUpEngine
- Chaos Rift Devotee
- Posts: 835
- Joined: Sun Nov 08, 2009 2:01 pm
- Current Project: mixture
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++
- Location: UK
Re: [GroundUpEngine] Drunk design
hurstshifter wrote:You know how I know you're gay? You're posting in this thread.Arce wrote: Okay, maybe it's just when I'm drunk that I'm willing to say completely gay things like that. :P