Day 2 went well.
1 I adjusted the size of the map area to be odd number of columns and rows so the @ could sit in the middle when not at the edge of the map.
2 I refactored yesterday’s ugly code which did everything twice with copy and paste and made a nice game class.
3 Fixed position of visual origin of map when you are near the edge so the player
moves but the screen doesn’t scroll.
4 You can now only move in corridors and rooms rather than ploughing through
solid rock shouting “I’m the juggernaut, bitch!”
5 Researched FOV to find a nice concept to code up. Panicked about time. Decided to steal someone else’s FOV. Tried libfov. Too complex. Stole libtcod’s. Pretty easy to stick in. (I didn’t want to have to use all of libtcod- just wanted to steal the fov parts).
6 Drew walls round rooms and corridors. Looks better but also a little more crowded.
7 Fixed a crashing bug on vector index
8 Messed about with colours and characters for dungeon. Now better but not perfect.
9 Now supports numpad, cursor keys, wasd and vi keys. Made the keys autorepeat. Decided not to allow diagonal movement because my maze has gaps you could exploit.
10 Finally found out why close button wasn’t closing the app- you need to handle
the SDL_QUIT event in the event handler. I’ll still leave my own custom X button
on the screen though- you’ll need it when the app is full screen.
11 Doors placed and drawn- horizontal or vertical as appropriate! Doors can be openerized. Different door open character depending on whether it was horiz or vert door. Had to resist urge to take note of all 4 door pos and draw door open on correct side each time (so door is always open to the right). Sigh. Resist.
12 Made it so unseen areas are total blackness and previously seen areas that
are currently out of fov are the grey stuff

Tomorrow: Stuff that can kill you. Stuff you can pick up.


FOV! Moobment! Doors!