Day 2 and I’m kicking along!
I’ve started recording a changelog for my work. It’s a nice way to capture work and recognize that you’re doing something, even though it all feels trivial. I’ve included it below.
While the difference between yesterday might not seem so marked, various hacked-in stuff is being refactored into their proper places and incorporated in a cleaner way. For example, objects now render themselves to a buffer, so I build up the screen in a few steps:
- The walls and floor
- Other objects
- The player
I had to do a bit of jiggery-pokery to make everything work nicely with transparency. In my experiments the NPC could be surrounded by a haze or have a sightcone, which was cool.
It took all my energy to not investigate how to do realistic lighting (like screens glowing and throwing shadows). I have a plan for that, but it requires a lot of little refactors.
Over the weekend I want to add in some gameplay, but that’s a bigger undertaking than it seems. For example I want a button you can push. If you just have to walk over it, I need to catch collisions between the player and the button. Preferably I’d like you to be able to walk next to it and a contextual menu pops up.
Changelog
## [0.0.2] - 2017-03-09
### Added
- Generic GameMap code
- `maps/` now contains different maps.
- Filled rectangles utility code
- HQ Map
- Take screenshots with PrintScreen
- Nifty scrolling ticker screen
### Changed
- Maps and GameObjects now render themselves onto a console. This
allows them to be multi-tile and do things like (fake) glow.
- Tiles now store their own colour
- Test map code moved to its own GameMap
- Player and NPC are now Human objects
- GameObject is very lean
## [0.0.1] - 2017-03-08
### Added
- Core TCOD engine
- Game loop
- Clean exit on ESC or Ctrl-C
- Base World functionality (stores a map, a PC and a list of NPCs)
- Base Viewport functionality
- Walls and floor
- PCs and NPCs
- Base Object functionality
- Movement
- Wall blocking movement
- Rendering
- Base Map functionality
- Custom map with some walls
- Utilities
- Box-drawing (AABB, origin+(width,height), centered)