[MPGAME] Mad Mobiles (a working name)

Tested MadMobiles MP with @jpfli and the test went quite well! We had great fun :smiley:

Now I can schedule the real test session!

1 Like

Testing randomized starting grid positions.

madmobiles_startgrid

2 Likes

Update: Added small dust particles behind the car.

3 Likes

Thanks all for the game session! Unfortunately, the game was freezing a lot. That is something that has not happened at all when I have been testing with 1 hw and 4 Sim clients (and using a remote server).

Some things to consider for development:

  • A spectator mode
  • Handle new clients joining during the race. They can be just left out or set as spectators.
  • Handle clients unjoining (or crashing). After a timeout, set as spectators.
  • Why even a two player race was freezing after 1 1/2 laps?
  • Give players with high latency a longer delay buffer so they do not slow down the whole game.
5 Likes

It was definitely fun for the short time!

  • it seemed to be soft lock (deadlockish) - both server and clients are running fine, but something is waiting for an answer that is never received (could be a lost packet?). the more the players there are, the more likely it becomes.
  • When you tested by yourself, you only had 1 HW and 4 simulators, but yesterday I think most of us tested with actual pokitto+, so it might be an issue located in the ESP firmware.
  • the spectator mode is fun in itself and could open people to tournaments (someone streaming could be using a simulator MadMobiles to comment on a race :grin:)
  • I’m excited for the next sessions!
1 Like

A good point that it might be ESP sw related

1 Like

Update:

The host (top left) is here a “spectator”. He does not attend to race at all.

You can see the the movement of the spectator is quite much delayed in the remote end. That is the intention. A spectator should not cause a lot of networking load to the other clients. It only sends an update once a second. The position is then interpolated in the remote client. That way we could have e.g. 10 players: 5 racers and 5 spectators.

4 Likes

Starting 7 players in the multiplaying game. As only 5 “racers” are allowed the 2 last ones are set automatically (by the host) as “spectators”

4 Likes

Here is a video about handling crashing or hanging clients. At first there is a spectator (the host) and 3 racer when the race starts. After that the racer processes are closed one after another. The race still continues :smiley:. Finally, the host checks the track for racers who are turned into “zombie” spectators.

3 Likes

nice work!!

1 Like

I might ask you some day for quick playtest if you will.

1 Like

I improved the autonomous driver AI. Now, it is based on the guide map, which looks like this:

Actually the track behind and the arrows are just for convenience when creating the map. The final map is only based on the arrow colors. The grey value tells the angle, 255 is the full circle.

So the final map (created by scaling down the arrow layer, to one pixel per arrow) has just colors and it is of size 16x16 pixels only. Here:

Now the AI is much faster driver than before :slight_smile: :grimacing:

3 Likes

the AI should have network bugs as well as a handicap :stuck_out_tongue:

1 Like

Thats an interesting method. I was expecting something more like the way mario kart did it.

1 Like

What is that?

The level is split into sections, each having a target point for any cars in that section to drive towards.

After watching further, it seems to also use the method you do.

3 Likes

Looks good. There are a lot of ideas in the video if I will improve the AI driver logic.

What has happened to the remote server? It has half a second sleeps constantly (!). This does not happen when I am using the local PokittoServer. Can there be some kind of cpu throttling in the virtual machine (locates in Netherlands)? According the server logs sleeps occurs in the middle of a server thread. Not always in the same place in code.

madmobiles_slowness

2 Likes

That was fixed with @carbonacat. :slight_smile: The reason was that the game server was busy looping when there were no packets to process and because of that the OS decided to put forced sleeps of about 400 ms once a second or so. Now I added a 1 ms sleep to every iteration which that is more multitasking friendly. A better solution would be to use SDLNet_CheckSockets() will automatically sleeps if there are no messages, but that will leave for the future improvement.

2 Likes

Added marching ducklings to the game :slight_smile: That can be used to bring a little balance between good and not-so-good drivers.
ducklings

4 Likes