Fourth Week
Hello again! I hope you’re doing well.
This week I’m a little behind of schedule. I had two major issues to worry about and, well, is summer, is hot and I’m a professional procrastinator, so, I don’t really need much to do nothing while reading some good book (I’ve finished On Writing, by Stephen King, a good one).
First was dungeon and enemy visibility. At first I wanted to use the FOV to discover the random generated dungeon, but, when thinking about enemies I struggle between “once discovered, always visible” and “only visible when visible”. So, I choose the second one and now there’s a visited dungeon and a visible dungeon. Lucky me, this was easy (without worrying about optimization).
Second was all the attack system. I don’t like the combat that only relies on messages on a console without some simple visual key. I don’t know if I’m explaining it well, but on some oldschool roguelikes when the entities attacks (and other) the information comes only with messages on a console. The character doesn’t move and so on.
So, as I don’t like this system, I tried to think about doing what I like and, well, it was a TOTAL FAILURE. As I followed the tutorial (when I was in the mood) I modified some of the systems and some of the framework so I spend two days (damn, TWO) thinking about a solution.
And, well, it was easy (now that I have no AI) to implement. Long story short, on each turn the “TurnSystem” checks for an entity that has a “TurnComponent” if it has finished its turn and, if so, checks then the next one.
Simply, the player finishes its turn ONLY if it moves. So, for each frame of the turn the “TurnSystem” works:
-Player moved? Yes → next entity; No → wait until next frame and check
-Entities to check? No → next turn.
And so on. It’s easier that it seems.
So, with this system I have an “AttackSystem” that works only if an Entity collides with another. If so, the “AttackSystem” not only calculates damage and health, but the “animation” too. The “animation” is something super-simple: move the attacker to the attack’s position, wait a little, and return to the original position.
Easy-peasy and more visual than a simple message!
I had some other troubles, a lot of bugs and some design flaws, but I think this was the worst of it.
See you and have a good and pleasant week!
Roguelike Project
This is a simple Roguelike.
Status | In development |
Author | Cutre Studio |
Genre | Action |
Tags | 2D, ascii, cutre, Godot, Pixel Art, Roguelike |
More posts
- Fifth WeekAug 10, 2021
- Third WeekJul 20, 2021
- Second WeekJul 13, 2021
- First WeekJul 06, 2021
Leave a comment
Log in with itch.io to leave a comment.