I played with the main menu title a little bit. To hammer home the “gun being loaded” idea, I set the materials on the “2” to resemble a bullet. Small change but something new to look at every time I launch the game.
I’m still planning to do another pass on the whole thing, fix letter spacing and add a few more details.
Currently I’m working on the dialogs for the game. After watching some footage from Call of Duty: Black Ops Cold War, I knew I had to have subtitles just like that.
Here’s how it works: if a subtitle comes to an empty screen, it goes to the top line. The second one will go to the line below. Any following subtitles push the existing ones up; the top one disappears. After a short delay any subtitle simply fades out.
Getting this right was quite a challenge. It took me over 3 hours to figure out all the edge cases and make the animations robust enough to handle them. I had a lot of fun making this and I’m happy to have such a nice little system in the game.
Until recently, all the map tiles were created in Photoshop (or Pixelmator, or Affinity Photo, let’s not get into that now) and exported as flat images. Multiple combinations of ground × road × water × dirt all had to be done up front and each new one took additional memory and disk space.
I created a new meta tile system that improves this. Each tile now consists of multiple layers which are combined at runtime.
The first “naive” implementation simply draws all the layers on top of each other, which isn’t super efficient but I have an improved version in the works which uses multiple texturing units and a shader which combines them in a single pass.
Using the new tile editor I can create any combination of water / ground / road layers I need and the game and level editor will start using it immediately.
You can now pick up some special items and deliver them to designated locations to trigger an action.
There are currently two items you can pick up:
6-pack of Cola
Here’s how it works: walk over an item to pick it up. You will see it float above your head because obviously that’s how humans carry things. While carrying an item you cannot shoot but you can drop it anytime, do your business and pick it back up. The goal is to deliver it to an area which “accepts” it and triggers some action. It can spawn new objects, start dialogs or simply change the state to “mission completed”.
In Superforce, it was safe to assume that the game would run at a constant rate of 60 frames per second. This was thanks to
predictable hardware and software environment
fast, simple rendering and game update logic
The game logic could thus be directly locked to the framerate. This assumption is not valid for Devastro 2. I have no idea what machines it will run on. I don’t even know if VSYNC works on all of them.
There’s a great article called “Fix your timestep” which describes a good way to decouple game updates from rendering.
After making a few changes in my code, I have indeed fixed my timestep. Toggling VSYNC causes a big FPS increase and yet gameplay keeps running normally.
I was not able to fully implement the last step from the article, which is interpolation. It would require more substantial changes to the game and I just didn’t have time for that. I may or may not do that later as the… next step.
I might add interpolation for the camera position, which could smooth things out even more without too much work.
Recently I purchased a Raspberry Pi. I wanted to try building & running Devastro 2 on it. Would it be fast enough?
I got the the Raspberry Pi 4 model B with 4GB of RAM. It’s a cute little device. Packaging and branding are top notch. Installed the official Raspberry Pi OS. It works.
There were a few things I had to adjust in my code to make it build with the default clang 7 compiler.
Unfortunately I couldn’t get the game to run. There was some mysterious problem with the OpenGL drivers and I couldn’t figure it out. Running out of time I had scheduled for this experiment, I decided not to pursue this any further. The Pi is sold and I’m focusing on the other platforms.
It would be great to have a simple game focused OS for the Raspberry Pi.
All it would do is run games directly on the device, with no setup required and without any interference. I could distribute a bootable image containing a copy of the OS and my game. It would be guaranteed to work on every Pi, every time.
Console only (no X server or other GUI)
OpenGL driver (or Vulkan)
Game controller support
Not necessarily Linux based
When I see the new 400 model I think it is clear that an official Raspberry Pi notebook is also in the cards and I’m looking forward to that. However for my game I need the software part to improve as well.