This week has been productive so far. Monday night and tonight (Tuesday night) I’ve implemented:
- Building placement - Detects valid placements for buildings. Buildings can be rotated. Buildings in general still need a lot of work, this is just the placement portion. Since I don’t have 3D models made for the buildings, the space they would take up just gets filled with brick cubes :) Can you tell I’m putting off art related work?
- Camera orbit / follow - instead of just “strafing” the camera left and right, it can now “orbit”. The camera just finds the cube that’s in the center of the window and uses that as the pivot point for rotating around. Subsequently the code I wrote for this is reused to look at any point in the world. This could be used for a tutorial or jumping the camera to points of interest, like stinking dwarf attacks.
- 3D cube selection - Sketch-up style! Select a region of cubes, then you can click and drag that region up, down, left, right, whatever. Pull the selection out into the sky to make a selection for adding cubes, creating a wall or tower. Or pull it into the ground to create selection for removing cubes, creating a tunnel or shaft. This is actually pretty fun to use. I was using it to select some cubes on top of one hill, and dragging that out to create a bridge to another hill top. This feature still needs some work, but it’s off to a great start. (That green blob is the unit, you may recognize it from my first video, usually they’re blue. When doing a task the units change to the color of the task, it’s for debugging, so I know they’re doing their work).
- And a few other little things that were on my “ever growing, never shrinking” to-do list.
- Lastly, I updated the blog :p
Feels good to be productive.