Posted on

The fun in coding…

Hello fellow gamers,

it’s been a while. It’s actually been too long. Sadly I haven’t coded as much as I wanted to in the past 3 months. This means the testing phase has been pushed back a bit.

However. I’m slowly but surely getting there.

Since the last two weeks I’ve been ramping up the amount of time I spent working on Ventura Inc.

I’ve been hard at work to put together a social panel with friends, ignores, a chat window, including private and public channels where you can chat with other players.

On the networking front I have been debugging my game with a friend who lives in France. We managed to run the game smoothly on his and my end. France – Belgium, a latency of 50 ms.

Very promising. Once the game is connected and loaded it consumes around 200 bytes / second on average. Wich is a very promising number to allow for many many players on one server. 🙂 Framerate ranges from anywhere between 120 and 400 fps for now , depending on the power of your pc. Either way, stuff runs smooth.

Furthermore, i’ve been developing several UI’s, this includes:

  • a list of available contracts
  • a list of goods for sale
  • a financial overview of your company
  • an event reporter
  • messageboxes triggered by the server (this tech I’ll use to inform players of important events)

Also, I finished the economy more or less. This means the populace now earns and spends money as they should.

Still not finished entirely is the transportation of goods between the different branches of your company. (and cities) This is something I’m still working on.

I have managed to get a bankruptcy event in. If your company value drops below 0, you’ll go bankrupt, possibly taking others with you.

Now, you might ask, what is the title about? Well , today I’ve been working on the save/load of the game.

All players will play on 1 server. However, the server needs to be maintained, and backups need to be taken on a regular basis. Making a savegame of all the data, wich is alot, took quite a bit of typing I must say (around 2 work days). When everything works in the end, it was well worth it. This is the result when loading a game for now. (Look at the bottom image – My buildings are half UNDERGROUND) – Now I have to look at what is the issue and fix it ofcourse.

Next up, planned for the coming weeks:

  •  Finish up on the existing systems
  • Drawing buildings, vehicles, icons and add them to the game
  • Gameplay Balancing
  • Start of initial playtesting

Steam Direct

Steam is releasing Steam Direct today and I’ll be looking at releasing the game on Steam. Release will however come after a sufficiently long testing phase in wich i established the game runs smooth and without bugs.

Hope you enjoyed the read,

over & out,

Ben Strijbos

Posted on

Everything can be conquered

Hello everyone,

the past week I’ve been mostly occupied with technical issues. The sad story game developers sometimes come across. I’ve been working on the game since well over 6 months now. And each time you finish new functionality you come to a point where you want to debug the new features you implemented. That’s what this past week has been mostly about for me.

Basically, ‘Debugging’ is the big word here. Generally most bugs are fixed in a matter of minutes, some however take a bit longer. As was the case this past weekend. Checking your code, making sure it does what it is supposed to. I fix most bugs using just the ‘single player’ functionality of my game. Basically the game is ran as both server and host in 1 game application and you check if everything works as it should. This makes it easy to fix stuff. However, it sometimes makes you forget it’s a multiplayer game. And then you go back to your earlier implemented functionality and you notice it no longer works.

Now, this weekend was special in that I came across a big issue that nearly killed the plan to ever release the game if not fixed. Basically my players could join the server, play, but could never rejoin the server at a later point if they wanted to play again. When rejoining, lots of data was being transmitted between server and client, yet no game objects were ever received on the players end. I then went ahead and investigated, around 15 hours total (Friday , from 10 am in the morning until 6 in the following morning). Taking just a break to have lunch and dinner. When in such a situation i start to feel very uncomfortable as the morning approuches. This doesn’t happen often, a bug I cannot find in any reasonable time frame. But as morning dawned I came to realise my code was bug free.

What option did I left? If my code was indeed bug free… Maybe there was an issue in the Unity3d Engine I use. So I went ahead and started reading the many patch notes from patches that came out since I started using the game engine for my game. And suddenly, in one of the patches, I noticed: ” Networking: ReliableFragmented channel stops working after client has disconnected, then reconnects.” As described in the Unity 5.3.6p1 patch. And this gave me hope. Hope that not all the countless day and nightly hours I’ve put into creating the game were lost. So, I went ahead and looked at the networking class. And indeed, i had implemented a channel as ReliableFragmented. After 15 hours of trying to fix my working code, i just had to remove the channel with 2 mouse clicks and assign some game objects to be communicated over different channels. And indeed, the bug was fixed!

This, in my opinion, is proof that as game developer, and developer in general you need a very broad view on everything that happens. It shows that projects can fail where you do not expect them to. Unity3d, afterall is also a work in progress and in constant development. In this particular case it failed me a bit. However, it was great that they provide nice documentation where you can read about issues that have been noted and fixed in later versions of the engine.

For me, Unity3d, even with this issue has been a great experience. And I’d recommend it to anyone wishing to create a multiplayer experience. In general the HLAPI Unity3d provides makes it very convenient to write a networking game that works and is not susceptible to exploits. (They use server authority) It also allows you to, with sufficient coding of yourself, write a game that will scale well for many many a player.

I’m confident in saying my game servers will be able to host the game for hundreds of players per server. The biggest bottleneck will surely be the speed of the hard drives /SSD’s. I find i can easily keep traffic to any player down to the absolute minimum. The tools are there, you just have to know how to use them.

With that positive note I’ll end my post for today.

Over and out,

see you soon!