It’s been a while since my last post so what have I been up to? After a slow start I’ve finally started to make a bit of progress. I’d decided to start my coding by putting together a very simple editor which would allow me to start creating maps and building up features as I went along such as item handling and encounters. I really like the idea of a combined editor/play environment so that I can build and test quickly.
So I built up a simple tile sheet which would be displayed at the side of the screen and would be used to select tiles with your left and right mouse buttons. The rest of the screen would be taken up with a large viewport onto the current map. You would be able to scroll around quickly and use the mouse buttons to place tiles onto the map. This seemed like a sensible place to start and not too difficult or time consuming to code. That was the theory anyway.
I failed to account for my inexperience of using SFML and the time it would take me to get into the swing of starting a new project. It took me a number of hours to sort out various bugs in my display code and work out how to do various simple display tasks properly in SFML. As I started making myself more comfortable with SFML and getting back into coding, the focus shifted away from the editor to just getting a simple map format setup and a tiled map view displayed on the screen. This was frustrating as the code is short and straightforward but you have to remember that I’m not much of a programmer. Anyway eventually I got my simple view onto the screen using the Ultima IV tileset and a map of the town of Moonglow (also from Ultima IV).
This simple example lets you move around the map using the cursor keys and sets up map boundaries. In the example I used an 11×11 map window like Ultima IV but I’ll be making this much larger so you’ll see a much larger portion of the map at one time. It was satisfying to finally see something vaguely game-like on the screen even if there is currently nothing to do. I’m currently thinking through the possibilities for the rest of the display. This will most likely feature character and inventory information on the right hand side in a column with a rectangular message window running along the bottom of the screen . At a resolution of 800×600 that should still leave plenty of space for the tiled map.