Stunt Marble Racers - now includes network playing

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Anohter little bugfix upload: now the program does no longer crash in the network mode if a server is re-started. There is still a proble though: it seems that after a restart it is not possible to connect to the server any more.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

I tried it with a friend and we could connect over hamachi but the player 2 was slower than the player 1 and if I stopped and started moving again I was very very slow. I hope you can find the bug or what it causes the bug;)
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

Well ... I guess it's a lag problem. There is no real synchronization between the peers, the client just sends new controller information every 0.016 seconds (if a control is applied of course). What ping time does the "net info" panel (use the "F2" key to make it visible) show? In my local test sessions I get times well below the 16ms, and both marbles move in a correct way. The (brute force) network implementation I use is just designed for (real) local area network games, I don't think that I'll improve that in the near future because network programming gets really complicated then (and as I'm a "lonesome coder" doing all development in my free time (besides my fulltime job) I just don't have enough of that).

Btw: uploaded a new version yesterday. Now has enhanced graphics: I found where the "flat shading" of the marbles came from: the 3ds format I used. Either the Wings3d exporter messes up the normals or the Irrlicht importer doen't import the correctly. However, after switching to the .obj format the marbles really look better. Also added 2 levels (I guess I'm currently in a "level creation mood").

Updates to come:

- more levels
- changing the "network race" to a "network tournament"

I think I won't currently improve the shadows. Afaik shadows will be improved with Irrlicht 1.8, so I'll wait for that (aka "do other things to do") until it's released.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

Oh forgot that but I could see him in a normal speed and I was slower. I'll try it again and then I'll post that.


edit:
Ping ca 120
in teamspeak I got a ping of ca 22

sent ca 2316
recv ca 19701
traffic goes up when I move
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

OK ... the Ping that the game shows might not be right ... the network adapter is not updated that often, so there might be some additional ping. I checked the code yesterday and I found something: this update of the network is only done once per frame render, so I think that maybe the second marble runs slower if the server renders at less than 60 fps (60 fps is the fixed speed of the physics simulation in the background ... I'll have to do some testing with it on the weekend). With a ping of 22 the game should imho be playable. Could you do an additional test with the shadow details and maybe resolution on the server turned down so that it gets a higher framerate?
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

Yes I can do it when my friend is online
ping is a bit lower after grphic is down (ca 80) but it still doesn't work


PS: In singleplayer it works
PS: I like your game and still hope you can fix it ;)
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

OK ... I tried to reproduce it on a single computer yesterday, didn't work (ok ... it worked as it should, I couldn't reproduce it). I'll try that on the weekend, when I have some time at home with 2 computers. In the meantime: I took a look into the code, and it should be OK. Maybe you should make sure that both client and server run at at least 60 frames per second.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
stash
Posts: 47
Joined: Wed Dec 12, 2007 11:28 am
Location: Brasil, SC

Post by stash »

I tested in multiplayer and it worked properly.. Congratulations, the project is very interesting.
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

After testing your game with my friend we played Age of Empires 3 and Battle for Middle Earth 2 which are much bigger so I think that marbles should also work.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

I just uploaded a new version. No big changes, I just updated to Irrlicht 1.7.1 and Irrklang 1.3.0.

Btw: it would be nice if someone playing a network game with stunt marble racers would record a replay and send it to me. I'm just curious ;)
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

Now the game works over hamachi. I don't know why it didn't work.

PS: It worked after downloading the latest version of the game.
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

That's nice, although I didn't change anything in the network code. I also tried to slow down client and server (you know ... the single threaded thing), and in both cases the reactions were reasonable (although it doesn't really work good if you get the server down to 10 FPS). Imho it is most important for a smooth game to have the server running at at least 60 frames per second. I think I'll do a stand-alone server in the next project that doesn't do any rendering so it always runs as fast as possible. But for Stunt Marble Racers I don't think I'll have the time to add that.
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

By the way the second training map doesn't work in multiplayer (we didn't test the first one) and one of the new level was too big so it lagged and I got after ca 4 seconds a new frame. I don't know the name of the map because my friend hosted it. Anyway the other maps work very well :)
Brainsaw
Posts: 1183
Joined: Wed Jan 07, 2004 12:57 pm
Location: Bavaria

Post by Brainsaw »

You're right. The second training is just for single-player. I am not quite sure whether or not I should add the other three players there. The net game does not (yet) do any check to see whether or not the track is suitable for the amount of players connected (nor does the splitscreen tournament). I am thinking about removing those training levels anyways, I guess I'll have to make a decision there.

If you give me a hint on that other map I might be able to do something. Maybe it's the "crossing bridges" level, the track with an "8" shape that has 4 bridges. I realized that this level creates a damn lot of traffic because of the many movable objects connected with joints (they will actually not rest at any time). Maybe I'll have to re-think that as well. But nice to head that the rest works well.

I would still love to get one or two recorded replays from anyone playing the game in a network, just to see how it works out. And, of course, to get a better feeling about my performance. Playing with my brother doesn't help me there, he normally wins - even in levels he doesn't know yet. He seems to be a computer-game genius or something ;)
Dustbin::Games on the web: https://www.dustbin-online.de/

Dustbin::Games on facebook: https://www.facebook.com/dustbingames/
Dustbin::Games on twitter: https://twitter.com/dustbingames
Sir_Hans
Posts: 143
Joined: Sun Dec 06, 2009 2:23 pm
Location: Germany

Post by Sir_Hans »

I recorded a game but I was so bad xD. I'll upload it on my website and send you a link per pm. (I don't want to give my email and I don't want that everyone knows my website because I'll update the design in a few weeks (it seems very strange and it has a bad performance))

The best addition would be an easy editor in the game to make your own level with some standard grounds, streets and walls. Maybe you know Trackmania, it has a nice level editor.
It'll be very difficult I think but a nice addition ;)

EDIT: My friend has the replay I think so I have to wait till he is online.
By the way are you from Germany?
Post Reply