Hoping you guys can help me out with something.
What's the correct way to create a simple networked game using a client/server architecture. For simplicity lets say its just a game that has objects with positions and velocities, and some number of clients can be playing on the server at one time.
Are you meant to have the game lag each player by their ping. So you always have 2 correct positions to interpolate between, the old position and the newer player position, and if the packets arrive later extrapolate the position? Or are you meant to extrapolate all the time and wait for the players real packet, but then you'd have some correcting to do.
Any articles on simple networked games, or tutorials would be appreciated aswell as discussions or suggestions. Maybe even books.
Oh yeah, the unaccounted on the performance display is fraps.
[QUOTE=Mechanical43;18824288]thanks for dumb out of nowhere... I'm not good at coding and I want to simple things with freebasic.. I'm asking for help.[/QUOTE]
Guys ? I'm asking pseudo-code here..
[QUOTE=Pj The Dj;18832425]Yeah I agree. Crysis sandbox is probably the best example, because it can be seen as an extension to the game and not as much a separate editor. (although it is still definitely an editor, not sure how else to explain)[/QUOTE]
Same thing with the unreal editor. One button and you're inside the game, and can get an immediate representation of the level. Or you can actually have a bot spawn in your place and run through the level for you, you can spawn additional bots and watch them fight. It's like a god game, except they all die :3:
[QUOTE=Mechanical43;18832858]Guys ? I'm asking pseudo-code here..[/QUOTE]
If people want to help you then they will. If you demand it they won't even bother.
[editline]02:33PM[/editline]
[QUOTE=Cathbadh;18828400]I was hoping for something more along the lines of valid reasoning.
You might as well say that given the fact that most level editors don't allow you to input brush dimensions and textures via shouting at the computer, and the fact that most levels in games suck ass, then you would come to the conclusion that such a feature is necessary.
[editline]11:40PM[/editline]
How about a level editor that also cooks hot dogs? Clearly we need some more things like that.[/QUOTE]
The guy who made love built spaceships into his map thingy so you could play asteroids when you're bored.
[QUOTE=databee;18833078]If people want to help you then they will. If you demand it they won't even bother.
[editline]02:33PM[/editline]
The guy who made love built spaceships into his map thingy so you could play asteroids when you're bored.[/QUOTE]
Yeah.. guessed that by now.
Gonna release my Animation editor as a freeware one day =)
Didn't have much time to do anything big, kind of a busy week it was.
Anyways, here are some screens of my progress
[url=http://4.bp.blogspot.com/_9c1HhVyAaQk/SyEPnXQDmCI/AAAAAAAAABk/3buO5huRCn0/s1600-h/Untitled33333.png" imageanchor=1][img]http://4.bp.blogspot.com/_9c1HhVyAaQk/SyEPnXQDmCI/AAAAAAAAABk/3buO5huRCn0/s200/Untitled33333.png[/img][/url]
[url=http://2.bp.blogspot.com/_9c1HhVyAaQk/SyEQfGr-H0I/AAAAAAAAAB0/OBbqdX_YVvk/s1600-h/Untitled11111.png" imageanchor=1][img]http://2.bp.blogspot.com/_9c1HhVyAaQk/SyEQfGr-H0I/AAAAAAAAAB0/OBbqdX_YVvk/s200/Untitled11111.png[/img][/url]
[url=http://4.bp.blogspot.com/_9c1HhVyAaQk/SyEPmXuXCfI/AAAAAAAAABc/0KJ1KYGHKnY/s1600-h/Untitled22222.png" imageanchor=1" mstyle=margin-left: 1em; margin-right: 1em;][img]http://4.bp.blogspot.com/_9c1HhVyAaQk/SyEPmXuXCfI/AAAAAAAAABc/0KJ1KYGHKnY/s200/Untitled22222.png[/img][/url]
[url=http://4.bp.blogspot.com/_9c1HhVyAaQk/SyEPofNv0GI/AAAAAAAAABs/sMo9W4kYsnU/s1600-h/Untitled44444.png" imageanchor=1][img]http://4.bp.blogspot.com/_9c1HhVyAaQk/SyEPofNv0GI/AAAAAAAAABs/sMo9W4kYsnU/s200/Untitled44444.png[/img][/url]
For the record I didn't write this, but you should all be aware that this python particle engine exists, and I'm currently integrating it into my code~
[media]http://www.youtube.com/watch?v=sf4EkaPit1E[/media]
[QUOTE=Xerios3;18833620]Gonna release my Animation editor as a freeware one day =)
Didn't have much time to do anything big, kind of a busy week it was.
Anyways, here are some screens of my progress
*images*[/QUOTE]
Looks nice, keep up the good work.
Also the guy asking for help. There is so much help available on the internet already for things like that, the times when you need to ask for help in a forum should be few and extremely far between. And this is the wrong place to ask for it. If you need help, which you shouldn't, as you clearly have a web browser of some kind, and access to google (unless you're chinese, in which case apologies), then at least make a thread to ask in, and don't just ask in the "What are you working on?" thread!
/rant
Also, thinking about the programming books thing, what should the pictures be of? A fat guy at his computer?
[QUOTE=turby;18795277]Regarding the retarded pictures on computer books:
[img_thumb]http://covers.oreilly.com/images/9780596001322/lrg.jpg[/img_thumb]
I have them both and the covers really shit me[/QUOTE]
But you do know that the Perl mascot is a camel?
Hmm, ollydbg really needs a structure viewer. I think I know my next project :P. Was thinking about having it parse class files instead of a JSON file. Only problem is gonna be optimizations. Hrm....
[QUOTE=TheBoff;18835224]Also the guy asking for help. There is so much help available on the internet already for things like that, the times when you need to ask for help in a forum should be few and extremely far between. And this is the wrong place to ask for it. If you need help, which you shouldn't, as you clearly have a web browser of some kind, and access to google (unless you're chinese, in which case apologies), then at least make a thread to ask in, and don't just ask in the "What are you working on?" thread!
/rant
Also, thinking about the programming books thing, what should the pictures be of? A fat guy at his computer?[/QUOTE]
Yeah nevermind I did it my way and it works.
thanks anyways
[img]http://i49.tinypic.com/2heznk1.jpg[/img]
Finally after a month of getting this to work, I have shit on the screen.
[img]http://filesmelt.com/downloader/screenie5.png[/img]
More people need to use images of google as placeholder art.
I would also suggest flikr.
[QUOTE=Robber;18836097]Gravity :buddy:
[media]http://www.youtube.com/watch?v=ic4oPdnDTro[/media][/QUOTE]
That was fucking awesome. Did you just calculate current position, add in gravity and the vector it was currently traveling at to get that to work?
I know my fair share of physics but I couldn't grasp working with graphics. :P
[QUOTE=andersonmat;18837648]That was fucking awesome. Did you just calculate current position, add in gravity and the vector it was currently traveling at to get that to work?
I know my fair share of physics but I couldn't grasp working with graphics. :P[/QUOTE]
Yes, basically I just added gravity to the movement vector and the movement vector to the position vector every frame.
[img]http://i49.tinypic.com/28ml5au.png[/img]
reduce 1d data everyday
I'm working on making a game in C++ using Direct3D and I'm a little worried about my game loop.
Right now it loops over 16 ms. When the loop is completely empty (no code at all) it loops at less than 1 ms, but regularly it spikes up to 16 ms.
I wonder if this is normal behaviour or if I'm doing something wrong when compiling.
I'm quite worried :tinfoil:
Bah, no loop devices on my OpenVZ VPS. Trying to convert this to using bind mounts.
[code]
LOOP_DEV=`sudo losetup -f`
sudo losetup "$LOOP_DEV" "$ROOT_FS_IMG"
sudo mkfs.ext3 "$LOOP_DEV"
sudo tune2fs -L "$DISK_LABEL" -U "$UUID" -c 0 -i 0 "$LOOP_DEV"
sudo mount "$LOOP_DEV" "$ROOT_FS_DIR"
[/code]
Managed to get mkfs.ext3 and tune2fs to work on an image file, but then the mount command complains that the image is "Not a directory". Puzzling.
[QUOTE=DrTaxi;18835504]But you do know that the Perl mascot is a camel?[/QUOTE]
Yeah, I realise that, but they shouldn't let some mascot get in the way of aesthetics.
[editline]08:24AM[/editline]
[QUOTE=Sippeangelo;18838709]I'm working on making a game in C++ using Direct3D and I'm a little worried about my game loop.
Right now it loops over 16 ms. When the loop is completely empty (no code at all) it loops at less than 1 ms, but regularly it spikes up to 16 ms.
I wonder if this is normal behaviour or if I'm doing something wrong when compiling.
I'm quite worried :tinfoil:[/QUOTE]
You need to optimize.
Profile your code, figure out what part is executing slowly, then examine it and try to find where you're doing things inefficiently.
He's probably building in debug mode :v:
EDIT: On a side note, is anyone participating in this weekends Ludum Dare?
[QUOTE=Chandler;18839300]He's probably building in debug mode :v:
EDIT: On a side note, is anyone participating in this weekends Ludum Dare?[/QUOTE]
It's the same in release and
[QUOTE=turby;18839177]
You need to optimize.
Profile your code, figure out what part is executing slowly, then examine it and try to find where you're doing things inefficiently.[/QUOTE]
is an empty while loop optimized enough? I'm still getting spikes.
[QUOTE=databee;18833078]
The guy who made love built spaceships into his map thingy so you could play asteroids when you're bored.[/QUOTE]
And EMACS has Tetris built into it. It's a text editor, but with tetris in there as well.
Is it cool? You bet. Useful? Fuck no. I think the same thing would apply to multiplayer editing.
[editline]04:48PM[/editline]
[QUOTE=Sippeangelo;18839370]It's the same in release and
is an empty while loop optimized enough? I'm still getting spikes.[/QUOTE]
An optimizer will just remove an empty while-loop entirely. How do you know it is still taking 1 ms to execute? That's an awful long time.
And remember, your program isn't the only thread your computer is running.
[b][i]profile your code.[/i][/b]
If you want to try actual multiplayer editing check out [url]http://www.moddb.com/games/platinum-arts-sandbox[/url]
it has it built in (Uses the Saurbraten engine)
[QUOTE=Cathbadh;18839568]An optimizer will just remove an empty while-loop entirely. How do you know it is still taking 1 ms to execute? That's an awful long time.
And remember, your program isn't the only thread your computer is running.
[b][i]profile your code.[/i][/b][/QUOTE]
The only code in the loop is to measure the time, and it's not 1 ms, it's less than 1 ms. But with my limited measuring method I can't get lower than a millisecond. Anyway that's not important. It reports 0ms for a while, then I get a 16 ms spike. The spikes are frequent and I've already ruled out my measuring code.
What kind of compiler options can cause this?
My particles attract each other now, but I'm having some problems with the gravity formula I think. Could someone tell me how to properly calculate the gravitation based on distance?
[media]http://www.youtube.com/watch?v=9kdx4JoqUog[/media]
[editline]11:01PM[/editline]
[QUOTE=Sippeangelo;18839911]The only code in the loop is to measure the time, and it's not 1 ms, it's less than 1 ms. But with my limited measuring method I can't get lower than a millisecond. Anyway that's not important. It reports 0ms for a while, then I get a 16 ms spike. The spikes are frequent and I've already ruled out my measuring code.
What kind of compiler options can cause this?[/QUOTE]
Where exactly does it take 16ms? It has to stop at some line of code.
[QUOTE=Robber;18839912]My particles attract each other now, but I'm having some problems with the gravity formula I think. Could someone tell me how to properly calculate the gravitation based on distance?
[media]http://www.youtube.com/watch?v=9kdx4JoqUog[/media]
[editline]11:01PM[/editline]
Where exactly does it take 16ms? It has to stop at some line of code.[/QUOTE]
Dude throw some AI onto that and you've got a swarm of bees. You wouldn't happen to be releasing that source code anytime would you? :X
Sorry, you need to Log In to post a reply to this thread.