scytail / LiteCrawl

A small roguelite dungeon crawl game, made mostly for my own amusement.
1 stars 0 forks source link

Add scoring #11

Open scytail opened 2 years ago

scytail commented 2 years ago

maybe something to do with level progression, upgrades collected, or enemies defeated?

AltruisticNut commented 2 years ago

Maybe add in a check for "clearing" a room (killing all the enemies in a room, getting all collectables, etc.) that would add to the total score. Could even factor into a "cleared floor" check if all rooms have been totally explored and purged of monsters. It would certainly give more incentive to explore every single room.

scytail commented 2 years ago

i like the idea of a "clearing" bonus that gives you "points" for emptying the entire level. The challenge with this is that level generation right now is fairly "dumb." It doesn't know anything about what rooms are reachable or unreachable because all the doors generated are purely randomized. The only "path" it truly knows about is the path from the starting room to the descent room (to ensure we guarantee progression). Adding in a "clearing" bonus would force the world gen to keep track of which rooms are unreachable. I'd likely need to perform a search tree process to sweep all possible paths from the origin and see what rooms are not included after the generation is complete, which could be slow.

I suppose the other option is to redo the level gen algorithm to be smarter by building a process like the following:

  1. pick start room
  2. pick any points of interest (such as the descent room)
  3. pick open doors on the current room
    • We'll have to force certain doors open that will lead to a point of interest, and close any if there are door restrictions on adjacent rooms (such as the descent room only having one open door or closed doors on the edge of the map)
  4. perform a tree search starting from the current room, branching to each "child" room, and recursively repeat 3 & 4 while also verifying that we don't end up in a loop with a room that we've already visited.

As I enumerate this second option, I'm beginning to like this more and more.