Upcoming fixes/changes


Hey people! CalcRogue is very w.i.p at the moment, so the current release is very buggy and slow. Here's how I plan to change that!

A goal to aim for

The plan is for a Magic Crystal (open for cool names) or something, denoted by phi "Φ" to spawn at ~depth 22, which you would then be able to use to leave the dungeon through the doorway on Level 1. Furthermore, I plan on adding some sort of a point system to the game whereby coins would randomly spawn on the map, and picking them up will increase your score by a value.

Movement improvements and AI code change

The code that clears the screen when an entity leaves a position also needs a solid cleanup, because currently it clears the entire char's spot, even though it could probably get away with just clearing the right two pixel columns, which would make it a couple times faster. This code will also be moved so that it will be called before any changes to the matrix (so that old character positions are correctly cleared).

Currently there's a really bad loop in the code somewhere that iterates through each AI and then runs the "move character" code FOR EACH AI INDIVIDUALLY. I'm going to change this so that the "move character" code modifies the matrix that stores all entity coordinates directly, and then one single sub-program would redraw all the entities on the screen.

This will also fix the bug that entities are only drawn once they move, since the new entity drawing script would be an all-in-one solution which could be called right after level generation finishes.

AIs currently call for random number generation twice, and have 9 possible outputs. This will be changed so that only one random number has to be generated, containing all 8 possible positions an AI could take. This would then be input into a matrix containing all the displacements possible (j+k,j-k,-j+k,j,k etc etc) which should hopefully speed up player movement as well, since it currently uses a huge if statement (this would be converted to a system where keycodes=positions on the movement matrix, so that instead of many if statements you end up with a single line of "offset player by this matrix")

Finally, there is currently no collision between entities. This will be changed so that when an entity or the player tries to move into another entity's position this other entity will take damage (or, in the case of entities attacking entities, they will simply not move that round).

AI behavior improvements

AIs will now have a "state" column in the AI matrix which would denote whether they are sleeping, wandering, or attacking. Attacks on wandering or sleeping AIs will do a multiple of the original damage.

AIs currently only wander, so attack code is on the way. When an AI tries to enter the player's coordinates, the AI would 'attack' the player, with a success probability based on armor and the AI's accuracy.

All AI stats will be moved to another (immutable) matrix which would be used to look up what values to use when AIs are doing actions. For example, whether the AI moves fast, moves at a normal speed, is slow, or is immobile.

Useful UI

The "UI" currently consists of text that displays when you walk on the bottom of the screen. I plan on adding HP and hunger values, which would probably display on the top right of the screen, and a score, which would probably display on the top left.

Since the walls of the dungeon are impenetrable by the player and AIs they can be overdrawn with text without affecting gameplay.

better level generation when?

It's a work in  progress, and I'll write more about a "true" procedural level generator in my next post. This would include true "rooms" each with a different flavour which would vary depending on depth, and a new way to generate levels which should hopefully make them more fun to play in.

Get CalcRogue 1.4 (Rebalanced difficulty!)

Leave a comment

Log in with itch.io to leave a comment.