PHP Gotcha

The first test map for Bunnies was only 32×32 tiles. The second map is 64×64 and suddenly the Bunnies server is getting errors and causing the Bunnies game to crash. Turns out that PHP is not very good at sockets. If a message is sent and then another message is sent before the first is done sending then PHP throws a warning and appears to not send the second message. So now there’s a half second delay before any message is sent. That will of course need to be optimized. I imagine there’s some way for PHP to tell if a socket is ready to be written to. I could be wrong. I don’t imagine too many game servers are written in PHP.

This error is popping up now because the second map is 4x the size of the first map.

Also, the C# version of Bunnies is updated. It would crash out if a map contained an object that it didn’t have the code for. Now the C# version will just ignore any objects it doesn’t know about. For example the Wolf3D map contains a soldier object. The C# available for download doesn’t have the soldier object. So those soldiers just won’t show up. You’ll still be able to walk around the map.

I will probably release a new C# version when the game aspect is 100% done. Title screens, the ability to win and lose, etc.

The Java version will no longer be supported.

Leave a comment

You must be logged in to post a comment.

ss_blog_claim=70b9168863fc97c91e6d88b40542a327 ss_blog_claim=70b9168863fc97c91e6d88b40542a327