Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smarter dungeons #150

Open
3 tasks
oskarrough opened this issue Jun 30, 2021 · 2 comments
Open
3 tasks

Smarter dungeons #150

oskarrough opened this issue Jun 30, 2021 · 2 comments
Labels
feature New feature or request help wanted Extra attention is needed

Comments

@oskarrough
Copy link
Owner

oskarrough commented Jun 30, 2021

Problem

Current state of the dungeons:

  • The monsters you have to fight in the dungeons are randomly chosen.
  • Monsters are divided into three categories: monsters, elites and bosses.

You only meet bosses at the end, so that's fine.

But monsters and elites are scattered around the floors and since it's random, you might meet a very difficult monster on floor 1 and an easy one on the last floors.

Solution

It'd make for a more fun and balanced game if the logic for choosing a monster and/or elite was smarter.

We could extend the function to choose a monster and elite to account for the floor you are currently on. A plan could look like this:

  • Add difficulties to the monster rooms

The difficulties could be numbers (1-3?) or a size (s, m, l, xl) or just a string easy, medium, hard.

  • Add categories/tags to the monster rooms

The tags I'm not sure we need for now, but could indicate what type of fight it is. For example aoe, single target, scaling, kill fast before it kills you and so on.

  • Improve logic for choosing which monster or elite room

See code here:

if (nodeType === 'M') return pickRandomFromObj(monsters)
if (nodeType === 'E') return pickRandomFromObj(elites)
)

Remember to use state.dungeon.y (the current floor) as well to make it balanced.

@oskarrough oskarrough added feature New feature or request help wanted Extra attention is needed labels Jun 30, 2021
@SamuelRott
Copy link
Collaborator

Questions:

The difficulties could be numbers (1-3?) or a size (s, m, l, xl) or just a string easy, medium, hard.
Lets take numbers, 1 being the weakest, so we never have to think of a new name for a new big boss :)

The categories, or tags tbd
This should be decided/clarified at the start. We could have:

MonsterType: enum => "Archer", "Tank", "Mage"
MonsterFamily: enum => "Zombie", "Swarm", "Mech"
MonsterDifficulty: number =>  1, 2, 3, 4

MonsterAttack: Interface MonsterAttack {
        attackType: enum => "aoe", "dot", "singleTarget",
     ... and some other properties
}

indirect requirements

  • value of reward must be proportionate with the difficulty of encounter.

In General I think of two possibles ways here

  1. Group monster by difficulties, each floor randomly pick from a group.

eg:

Floor level 1 could pick 3 monsters in from a pool of 4 MonsterDifficulty 1, 2 MonsterDifficulty 2, 1 MonsterDifficulty 3.
Floor level 1 could pick 5 monsters in from a pool of 2 MonsterDifficulty 1, 4 MonsterDifficulty 2, 3 MonsterDifficulty 3.
and so on.

doing this would add a but of luck feeling, if you get only the easiest combination at each floor.

  1. Create special "Story Paths"
    The goal would be to bring the player to commit to a playing style to be able to beat this paths.
    This would mean to group monster by MonsterType/MonsterFamily and difficulty.

IMO the second options would be much more fun, to dev and play, and we can create a random "Story path" that just reproduce the behaviour described in 1.

@oskarrough
Copy link
Owner Author

Let me first get some confusing naming out of the way: technically we have both Monster and MonsterRoom. When you land on a node, you always encounter a monster room not a monster directly. A room can have any amount and combination of monsters.

"Story Paths" sounds pretty cool. Also like quite the undertaking. In any case, we want to be able to pick rooms by difficulty. How about we first…

  1. Add difficulties on all monsters
  2. Add difficulties to the room (maybe summed up from the monsters in it?)
  3. Use this to pick a room according to the floor you're on. Like your solution 1

Once that's live, we can always reconsider story paths, tags and so on. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants