andrew-peng-144 / js-explore-game

0 stars 0 forks source link

Mob system and spawning system #18

Open andrew-peng-144 opened 3 years ago

andrew-peng-144 commented 3 years ago

A mob, or any enemy that the player can fight, is an actor.

But all mobs of a certain type has a set of base attributes. So all mobs of that type will have identical stats, by default. These can be changed with modifiers, like buffs, like damage increase. Similar to the item system. An enemy that you run into will be of a certain species, but that enemy itself may have some certain modifiers.

There's basically a main list of all the base enemies, or "species". Ordered by ID. Ex a goblin has ID 42, that entry can be something like this at position 42:

to reiterate, things like walk speed are its BASE attributes.

Let's say you encounter a goblin that has 20. That's an entity, so it has physics and graphics, and its entity data will be something like:

andrew-peng-144 commented 3 years ago

Spawning system:

I think this is comprehensive for now. This handles spawns in dungeons, and also could handle a large overworld, since you can define constant points where enemies MAY spawn. And it still feels natural.

The big question is whether the world will be unleveled (morrowind) or leveled (like skyrim).