I finally gave up on the fov algorithm from yesterday and implemented the one from this post.
http://www.adammil.net/blog/v125_roguelike_vision_algorithms.html
It's way faster (previous one lagged a bit even on my 2700x and took >1s per turn on a raspberry pi 2), it's actually symmetric, and it light up walls correctly.
I made good progress on my #roguelike today.
- switched pathfinding to block diagonal movement on corners
- added mouse input (just prints what you hover over for now)
- started working on item and effect systems
- made the ui a bit better by splitting the status panel, showing the rest of the player stats, and adding more colors
I did some reworking of my renderer trait the implementations for libtcod and termion so now I can make my ui and not worry about if it'll look ok in a terminal or desktop environment.
I added a cave map generator because I was getting tired of running through mazes for hours on end while testing things out.
I made a bunch of progress on the #roguelike today cleaning things up and making a single render interface and implementing it for tcod and termion.
I initially added a player health bar and message log, but then I realized how much of a mess I was making by writing everything twice to use both renderers.
Now that I have a single interface I can spend tomorrow writing a gui with player status, list of enemies in view, and prettier message log.
I got termion working as a optional renderer so that it can be played in a terminal.
I spent today making a bunch of structural changes to clean up data access/ownership and adding a simple event system.
After that, adding a basic random move/attack ai to enemies was very easy.
Next up is to add message and status panels.
I've made some more progress on the #roguelike project.
It has a basic dungeon generator, player movement, fov, doors, and enemies(without any ai right now so they just stand there and take damage).
I'm trying to make it easy to extend it as I go so I'm storing tile/entity data in json and loading at launch.
I've been fighting with the borrow check a bit today, but overall writing a game in #rust is a lot easier for me than in c++ (no worrying about double frees and segfaults!).
#gamedev
I finished with the basic dungeon generator.
It still needs some changes to the maze fill to make the paths less long and winding and the door placement needs to be tweaked, but it should be good enough to work with for now.
I've started working on stuff for a #roguelike to get better at #rust.
Here's a dungeon generator that I've been working on today.
I’m watching “Cells at Work!” and the platelets are way too cute. https://derpsin.space/media/mE6SVnxxdhuAmJf-7HY
Here are the culprits. https://derpsin.space/media/ivBFcMpepLTEqUEq61c https://derpsin.space/media/bolBJg5Q1pBlXhuWgVc
Software engineer/db admin by day, serial project starter by night.
btw i use arch