More fiddling before tea. Added in some basic keyboard controls for pitch and yaw and an artificial horizon + pitch indicator to the targeting HUD.
I'm enjoying this a lot more than my initial foray into classic #RogueLike #GameDev. I'm thinking more in advance, planning the UI and working on the basics (albeit, from what I learnt from my other project) before diving in further.
Blue area is top-down map with cardinal points (four axes; yaw to change heading and movement along current vector).
Green area is targeting (180 degrees in front of your current heading, will be gradated like a fish-eye lens).
Purple area is side view, so its left is your 6'o'clock and right is 12'o'clock, with up and down showing the vertical axis (pitch).
Messing around with heightmaps and Voronoi diagrams (again) for some #GameDev ideas (again). The two V-diagrams aren't relating to the heightmap properly at the moment, so I need to tweak the algorithms a little.
Meat Show more
"Black as midnight, black as pitch, blacker than the foulest witch."
Boiled for 3 hours in vegetable bouillon. Roasted for 45 minutes and basted with honey and mustard.
Added rudimentary targeting using the mouse. Refactored the sensor display to show target data.
It's a bit tough (doesn't refresh on damage updating, but then I've not implemented it yet except as a simple collision anyway). It's also messed up my ECS slightly, as I have state data in a System now and a UI element (the sensor) knows about a WorldEntity. Hmmm. Requires some thought regarding architecture as a whole. But not bad for a few hours work.
I've spent days fiddling with tilesets, editing PNGs and carefully working out the maths involved in seamlessly rendering edges for the walls in my game.
This morning, after spending two hours colouring in pixels I remembered:
I'm a programmer, not an artist.
So I've gone back to ASCII. Now I can do some coding.
The completed product. For now.
Two tilesets (one for each map, though I should consider a single tileset and scale it) and a whole lot of bitwise maths built into each MapCell instance. Still requires 48 separate tiles to handle edges and corners, but it does mean I can some cool terrain transitions now.
Managed to grind my FPS down to near-zero at one point, which was amusing. Pro-tip: don't recalculate each cell's edge type every draw call, it's computationally expensive. 🤣
Fuck this, there HAS to be a more elegant solution to handling cell edges/ends/corners/inner corners. I'll do some searching tomorrow and look through /r/roguelikedev. Probably assigning values to coordinates and offsetting the cell tile slightly, as with ASCII bars.
(That is a "vertical" top-right of the red highlight, except as it joins with a corner then the cell below it needs to have the grey bar to the east position and a single grey block to the north-west to fill the corner.)
I'm going to end up using up all the bloody tiles in my tileset just to get corners and stuff working properly.
And the finished article, for now at least. Sensor area will be an interactive mini-map you can sweep over different types of scans (think: Predator) and do things like scan or target mobs. Data on locked targets (and maybe quick actions like "attack") will be listed in the little five-column sensor side-bar.
Didn't need to refactor any of the logic that renders the main or sensor maps. Everything works out of the box, message overlay included (that disappears after five seconds).
Dev. AppSec/InfoSec guy. Writer. Hubs. Dad. Punk of Many Colours. Mental Health First Aider & Advocate. Middle-aged Northern Brit. Sweary. Simplifying life.
A safe, social, virtual space for anyone interested in mental health and its issues. Whether you're a service user, someone with lived or living experience or a mental health professional, feel free to join, hang out and chat about anything.
Non-judgemental, open-minded and with a zero-tolerance policy on abusive behaviour, harassment and discrimination.
If you are experiencing a suicidal crisis, please call one of the numbers below and talk to someone - they will be able to help.