Creating a Tycoon Game Part 4 - UI and dialogs

I am developing a game named Business Magnate. This post is part 4 of its development blog (other parts: part 1, part 2, part 3)

One of the most time intensive parts of creating tycoon games or simulation games in general is also the most boring part: User interface. It is hard because the user interface needs to be functional, good looking and easy to understand at the same time.


And in addition, for the type of game I am working on: It needs to be able to update itself in realtime - everything can change while the dialog is open - and it needs to be able to do this quickly, without much framedrop. All togehter, this is a terrible, terrible combination.


Nevertheless, Business Magnate has a total of 23 dialogs (including subdialogs) like this. I am quite happy that - as user tests reveal - most of them seem to be very easy to use and understand, but I think I could still improve some of them. But on a side-note: If I ever mention that I want to write another game like this with that amount of UI - please someone shoot me.

I also had to add another, quite interesting feature, related to UI: When I played through the game the first time with a "Rockets" business type, I was so busy adjusting production settings, doing marketing and research, ordering materials and so on, that I never had the time to watch my rockets take off, although I really wanted to. I simply always missed the rocket launches. So I implemented this thing here:

This looks like a simple message box, easy to add, right? It is actually a bit harder: The game needs to detect that you won't see the launch - maybe because you are busy in a dialog, have a too fast gameplay speed or watching somewhere else, and only THEN ask for this. Then it needs to be able to scroll and zoom to the right place, and it also needs a setting in the options so that you can turn this feature off if you think it is too annoying.
But after all this, it was worth implementing this: Watching the rockets you designed, marketed and sold, lift off into space is quite a reward - I wished there was a similar event for other business types such as cars.

Anyway, the game is now nearly finished already and will release in less than 4 weeks on steam. I hope that everything will work out until then. A lot of testing still has to be done.

If you are interested in the game, you can subscribe to the newsletter on the game's website, or follow me on twitter. Or wishlist here:





Happy new year!

I wish all the readers of this blog a happy new year! May you be successful and have fun in 2019!

Also, as the tradition demands, I give away my software for a big discount, for a short amount of time: The ambiera new year sale is running again, currently. There is for example RocketCake 2 for -50% and CopperCube 6 for -30%, so there is something in for you too, maybe.



CopperCube 6 Pro Steam Sale

Today is the first sale of CopperCube 6 on Steam: It is still basically free, but if you want to support CopperCube, you can buy the Pro or Studio edition (a DLC on Steam), now with a -30% discount for a few days.

If you already own CopperCube 5 Pro, there is also a Steam bundle which makes it even a bit more cheaper for you.



Creating a Tycoon Game Part 3 - Rockets and Particle Systems

I am developing a game named Business Magnate. This post is part 3 of its development blog (other parts: part 1, part 2).

I programmed a lot of particle systems in my life, but when I started implementing the game engine for Business Magnate I wasn't aware that I would need one for that game, too. It is a tycoon game, after all. But what was I thinking, of course I need one. Besides other types of businesses, you can create space companies in that game, and launch rockets into space. Rocket engines produce fire and smoke, so - yes - of course I need a particle system. So this was what I came up with: It might need a few adjustments, but it is looking ok so far, I think. It works like this: Each particle is a structure in an array and has an image and a position, movement speed, and lifetime assigned to it. Every frame, each particle is moved and animated (faded out based on its lifetime, in that case):

void animateParticles(timeDelta)
{
  for (i=0; i<Particles.length; )
  {
	var p = Particles[i];
	
	if (p.TimeToDelete < timenow)
		Particles.erase(i); // delete particle		
	else
	{
		// move particle
		
		p.X += timeDelta * p.SpeedX;
		p.Y += timeDelta * p.SpeedY;
		
		++i;
	}
}

All particle systems I wrote so far were in 3D, but 2D ones are the same, only the Z component is missing. I probably will have to adjust the position of the fire a bit for the different types of rockets, but I think for a business game, they look ok so far.

Another thing which you might have spotted on the .gif above is this: There is a car moving in there. I originally wasn't sure if the game would have animated cars, but I decided that it would be much nicer with them. The Minibus you can spot in that gif is the first attempt at making this work, too. I'll likely write more about that next time.

Business wise: The game has a Steam page for a few days already, and it is possible to wishlist it on Steam. A handful of people aleardy did, which is very nice. But the Steam community forum is quite empty so far. Nobody seemed to have an interesting question about the game so far on steam, not sure why. Hope it is because the trailer answers all questions already. :)

If you like the game, you can subscribe to the newsletter on the game's website, or follow me on twitter.



RocketCake 2.2 - Mojave troubles fixed

I just uploaded version 2.2 of RocketCake, the free responsive website editor I am developing: I had to push this out because some people sometimes had problems with the editor UI not working at all: Sometimes, ComboBoxes and sliders simply wouldn't work at all. I bought a new Mac Mini among other things too be able to reproduce and fix this problem, and after many tries, somehow, finally RocketCake behaved exactly the same as reported by some people. Still not exactly sure if this was the reason, but I was able to fix this behavior by rebuilding a few underlying libraries, linking with a newer MacSDK, and making RocketCake stricktly 64 bit only for macOS.

It's a bit scary, though. Especially since this only happened on Mojave and the app works perfectly on all previous 6 versions. Hope Apple will test their OS a bit more before shipping it in the future.



First Gameplay Video

I just created a small gameplay video of Business Magnate, I think it shows a bit better how the game will play like:



Any feedback is welcome.

Also, there is now a steam page for the game. So you can put it on your Steam wishlist, if you like:



Also, if you want to help, you can upvote the tags of the game on the steam page.




Changed the name of the game

Some friendly people let me know that the planned name for my next game, which was "Business Builder" probably wasn't a very good choice: There is a mobile game which has a similar name, although not the same one. That's also why I overlooked this. Still, unfortunate. I could go on using "Business Builder", since it is not the same, but to avoid confusion and because the game is still in development, a change of name is a good idea.

So I changed the name, and "Business Builder" will now be named "Business Magnate".

Website and logos are already converted, and I think although that new name is a bit more complicated, it better tells you what the game will be exactly about.



Mac Mini 2018

I just received a new Mac Mini from Apple. The new one is black. Looks interesting, compared to the three older generations: Starting it up, it is surprisingly fast (especially compared to the older versions), only that default "natural" mouse wheel scrolling (which is inverted) was annoying. It only has two 'normal' USB ports, the remaining other 4 ports are USB-C, so I guess I need to invest in a few adapters. Another change: The power adapter is now internal, as it seems. It only has a simple cable connecting to the mac. All my older macs have external ones.

So yay, going to write better macOS versions of my Software in the future.



Creating a Tycoon Game Part 2 - Hit Tests and Streets

I am developing a game named Business Magnate. This post is part 2 of its development blog (part 1 is here).

For making the isometric engine more useful, we need to be able to click onto buildings, in order to open dialogs and similar. Detecting if a user clicked on a building isn't actually that difficult: Just check if the mouse coordinates are within the rectangle of the drawn sprite, and if the hit pixel is solid. We also need to check if another building is drawn in front of the current one, and then take that one, of course. For business magnate, I also added a hit-test cache:

The red overlay is the hit cache image, it won't be visible in the final game


What it does is basically speeding up the hit-testing: Every frame, I need to lookup which building is under the mouse cursor, and do a image lookup to do pixel perfect hit-testing. For big images, and a lot of them, this could mean that a lot of data needs to be kept in memory for this, increasing cache misses, or even worse: transferred between GPU and main memory. To prevent this, a size reduced and only 1-bit-per-pixel version of the image is created and held in memory, to do very fast hit-testing.

If for example we have 10 building types with a size of 512x512 pixels, we would need about 10 MB for this, which would have needed to be transferred and unlocked. The hit-testing images only need 0.3 MB instead, which is a very nice improvement for this.

The fact that the image isn't exactly matching at the borders is negligible, the error is too insignificant for users to notice. I tried it out, and it feels very nice. Also, the game runs quite fast that way on slower systems.

Additionally, I implemented a quick way to easily create streets:

A simple algorithm quickly scans for neighbouring tiles after the user placed a new street tile, and adjusts the tiles to connect in order to form streets. No magic there.

I'm not yet sure if it will be necessary in the game to have an efficiently planned street layout, but the company and building setup you can create in the game will definately look a lot nicer with proper streets.

If you like the game, you can subscribe to the newsletter on the game's website, or follow me on twitter.



CopperCube Roadmap

When I started developing the Irrlicht 3D engine nearly 20 years ago, I always had a public roadmap on the website. Not sure why I didn't make one for the CopperCube 3D game engine as well. So time to change that. The official CopperCube roadmap is now available, too. It's still a bit empty, but I guess it will fill more and more during the next months. It only contains the big items (not bug fixes and similar), but if I forgot something very important, please let me know!