018, GUI and Map

I’m marking this one as “in progress” as it’s on the cusp of being done, but needs a little more time. I don’t know when I’ll pick it back up again, so I thought I’d begin documenting it while it’s still fresh in my mind.

I’ve spent some time putting rudimentary GUI (graphical user interface) back into the project. I’ve currently got it so you have two GUI screens, one while controlling a vehicle, and one while on the map.

GUI is going to be kept as simple as possible; there’s a simple direction indicator to help you orientate when driving. It shows turret direction in relation to body direction, so you know roughly what direction you’re going to go in if you push forward. There’s also a crosshair that tracks the forward direction of the cannon; in other words, it shows where the shot will go if you fire at any given moment. As your camera turns faster than the turret, the centre of the screen isn’t always the direction the round will go. This indicator shows, and will also show if something is going to clip the show (in future).

Also, I have the map working again. You can pop out to a birds eye view at any time, with camera panning and zooming as you’d expect. You can hover over a friendly unit, and at the press of a button, take control of it. This “hot swap” feature is something I wanted to add in a while ago, and has been working for a while, but now it’s back to being functional.

I ended up reworking a lot of this code, as it was originally a bit too rigid. I broke it into components, again, and organised a proper flow of data (always flowing down from the top). It’s honestly a much better and more understandable approach, I’m really glad I was told about it.

Images and videos to follow when it’s complete.

Leave a comment

Design a site like this with WordPress.com
Get started