Implemented a new type of area -> encounter maps! Basically, it is a randomly generated terrain segment where "interesting" things can happen, such as being attacked by a group of
looters bandits. Also, hills and non flat terrain!
Along with this, there are a couple of changes, both invisible and visible:
1) Added collision resolution for when objects are already overlapping each other.
The collision system is a "looks ahead" system, meaning that before each object moves into a new position, it first checks whether that path to the new position is valid, if it not, it will truncate the path so in the new position the object only "touches" the collider rather than overlap with it.
Problem: due to floating (decimals) calculation errors, sometimes 0.00001 (a gap) becomes -0.00001 (overlapping) and the system fails. And yes, the game doesn't move the objects exactly right next to each other, but with a small gap. However, it turns out that sometimes the objects will move roughly the size of the gap, which cause the separation between the two to become ~0, and after some calculations, that 0 could become -0.00001 and boom.
To handle this (rare but all it takes is one failure to go out of bounds) issue, this game now have additional checks and handling for when objects are already overlapping each other.
2) The respawn button (U)
Lets be clear first, the respawn was never meant to be a core gameplay mechanic, but rather a testing tool for what if something terribly bad happens, like falling off the map. I don't want to say that this mechanic was "abused," because players have all the right to utilize all in-game mechanics however they want to their advantage (bugs not withstanding). But I do want to reduce the reliance on it.
Starting from next patch, the respawn button will no longer respawn you at the beginning of each dungeon floor, but at the camp instead. So it is more of a "I give up"/"I am stuck" option rather than "full HP refill"
3) Individual dungeon floors are no longer saved if you leave the dungeon.
I think this was a cool little mechanic, but ultimately this mechanic creates too much burden on other systems. For example, if this still works, then the respawn button change above effectively does nothing. Furthermore, it can lead into performance problems, such as opening one dungeon, quitting, then entering another, so there are two dungeon instances open, each with some arbitrary number of alive units. From now onwards, exiting a dungeon will now kill the dungeon instance and despawn all units within it.
4) AI Changes
This part I am still working on, but one finalized change is that AI will now "cry for help." Which means if they are attacked, they will alert nearby allies to start attacking. This wasn't much of an issue when the game was melee only, however, with ranged weapons, it's too easy to snipe the enemies one by one while the group watches.
There are other changes under consideration too, such as making enemy run towards range attackers if they don't possesses the "projectile block" skill. Basically, things to make AI play well with ranged combat.
Finally, I am looking for some feedback:
A while back, I asked if people want non-bosses/uniques to be grabbable. And the answer to that was yes. So I want to make that a reality.
But there are some issues:
1) I don't want lots of bodies to litter around. After they are K.O.ed, they should be marked for despawn asap.
2) Possible ambiguity with controls - loot or lewd? A separate key?
3) Should there be a separate move for grabs? A Grab Action? Possible, but comes with implementation costs, of course.
4) Ideally, it should not interrupt the flow of combat. Certainly want to avoid something like a "Combat Phase" and then a "Sexy Phase" if possible.
If you got any ideas on how to actually implement a grab system, that also addresses the issue above, feel free to leave a suggestion here. I know there was some suggestions already on the previous post, and I haven't forgotten about them, but hey, it doesn't hurt to listen to some new ideas. (or old ideas, for that matter ;) )