Day 3 - UI Mockup


Well, I've made some significant progress today.  I was able to deal with the issue I was facing yesterday, by dynamically editing the libtcod spritesheet to add in any extra sprites before initializing libtcod.  It was a bit tricky to get working right, but I am really pleased with it.

Once that was working, I got the creatures (robots, in this case) set up to initialize from data files, like the tiles.  This will make it a lot quicker to add in all the sprites for the different robots available for play.

Finally, I spent some time starting to lay out the UI for the game.  It took a little while to troubleshoot why it wasn't displaying the correct characters, but I eventually figured out that if I'm using unicode, I have to set each character one at a time, rather than trying to set a whole string of unicode all at once.

If you look at the picture, there is a nice little map with a wall around it, a single robot at the bottom (each one will look a little different), and a circle of conveyor belts.  The circled "1" in the top right is to goal of the race.  Right now I can move the robot around just by using the arrow keys, and nothing else works, but most of the data structure is there.

The HUD portion below has those nice grey lines around it, which I think really set off the feel of the UI.  The red bar is the healthbar, and the boxes on the left will contain the instructions being queued up as they are set.  As you loose health, you eventually loose the ability to change your instructions, and you will be stuck executing the same program turn after turn.

The plan is to have a sidebar on the right with the different instructions available for selection, to make it really easy and clear what your options are.  Hopefully I'll get that set up tomorrow, as well as hooking it up to actually allow you to select and display instructions.

Get Robot Racers RL

Leave a comment

Log in with itch.io to leave a comment.