Various Game Updates

Categories: Bingo Game Server, Flash Bingo Games

Some of the changes done lately:

  • Fixed points display issue in the Flash games when the amount is greater than 1,000 (actual value must be sent unformatted)
  • Fixed character set issue in the game servers (noticed the problem while testing with java socket connections), string being sent should be properly encoded
  • Additional check to make sure duplicate buy cards are prevented
  • Made changes so the game server only starts accepting connections when everything is ready (e.g. game rooms have already been initialized)
  • Fixed progress bar issue in all 4 bingo games during buy card event and the game has already started (progress bar jumps from partial to full incorrectly)
  • Fixed low-balance issue (error message is properly displayed, but player is unable to do anything anymore, solution is to adjust the low-balance check so the player is automatically given additional points)
  • Minor changes in chat formatting (first line formatting may not be being calculated as accurately as possible)

I’ve also wrapped up doing a maintenance program, similar to what I’ve done on HB. Combined with some scripts, this basically checks whether a particular game server is running properly, and when it’s not, the script will try to restart the game server appropriately. The code check is finished, so I just have to add some scripts to the linux server later.

This is very important, since problems with the game servers may happen any time. Not so long ago (on BC and TTG), sometimes problems occur while I am asleep or on vacation. So game servers may be down for a couple of hours before I am even aware of it. These program/scripts give me more peace of mind, since game server problems are usually auto-corrected already.

The other uptime issue (i.e. dedicated servers having problems) is handled by something else. This is already working on HB, so I just need to adapt the system to BingoGems. The more things I can automate, the less maintenance the site requires on my part, freeing me to do other things.



Object Pooling

Categories: Bingo Game Server

The game server now supports object pooling. There were 3 objects that have been modified to support it. Supposedly, this is a good optimization technique since there are less object creations and deletions going on. In the old days of my Java programming, this has actually been very useful, especially since server RAM was still very limited then.

However, there are now debates as to whether object pooling is still beneficial in Java these days. They say the newer JDK has much improved garbage collection, so object pooling actually slows things down in some instances. It looks like the use of object pooling is now advised mainly for objects that maintain external resources (e.g. threads or database connections).

On BC and TTG, I remember I was using 2 threads per connecting player, and then a database connection is created as needed. It wasn’t until TTG when pooling has been given a more serious look. On HB, a minimal thread and database approach has been implemented from the beginning. And now on BingoGems, it has been a complete redesign again. Only 2 main threads are running, there are also only 2 live database connections, and multiple game rooms can be running on a single game server instance.

This has been possible because of advancements in the Java language itself, and of course taking into account the many things I have learned from experience developing these kinds of things. So now, it looks like I don’t need to do object pooling at all. However, the only way to find out is to do some actual profiling, but I don’t think this is necessary at this point.

Anyway, in the meantime, I have disabled this feature. The good thing is, it’s something I can easily enable in the future, should the need arise. I did leave out the part of manually calling the garbage collector, so that clean-ups can be done at a more appropriate time.

Tags: ,


Bingo Friends Updates

Categories: Flash Bingo Games, Site Updates

The player pop-up menu (in the chat area) is now completely working. This allows a player to add/remove friends and mute or report problem players. These are also supported via chat commands, however that isn’t very user-friendly as has been proven on the HB site (most players commit a mistake, which is usually embarrassing because the mute command ends up being seen publicly). The pop-up interface should solve this problem nicely, and it’s also much easier.

Adding/removing friends is now possible via this pop-up interface, which is also an improvement over HB where only referrals can appear in the friends list. It’s only 1-way, i.e. you don’t need the other person’s approval before adding them to your list. I think this is sufficient for now, as I’m trying to keep things simple since there will still be changes in this area to support more functionality in the future.

Players who are in the friends/mute list are also highlighted properly in the chat list. Some website pages and server-side functions have been revised to accommodate these changes. I still need to fully test everything with multiple players, but so far, 2-player tests have been problem-free.

Tags: ,

Search Blog