Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411432 Posts in 69363 Topics- by 58417 Members - Latest Member: gigig987

April 20, 2024, 04:45:34 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignChoosing monsters in Procedural levels.
Pages: [1]
Print
Author Topic: Choosing monsters in Procedural levels.  (Read 759 times)
JasonPickering
Level 10
*****



View Profile WWW
« on: May 08, 2015, 07:16:39 AM »

Hey guys. So I am doing some fixes and such to Microgue and I want to redo the monster loading. the problem is I am really lost on the procedural part. so I basically figured I could write out my current process and then see if we can figure out a way to make it a bit more efficent. Right now I have an array of monsters and then select a few out of that array. My main two reasons for that is I want certain enemies to appear after certain levels, and I want certain enemies to appear only a specific amount of times for example 4 yetis, would be impossible. the problem is I need to create an array for each floor specifically. If there was a way I could create an array of monsters on the fly. Would my best bet be to try and graph how I want an enemy to appear over time and then figure out the equation that makes that graph?
Logged

baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #1 on: May 11, 2015, 12:31:23 PM »

Hmmm... well, you can begin by assigning a value for each monster, based on it's relative toughness. Factor in how much mix-up you'd like, where say, Yetis would be on stage 4 primarily, but +/- 2 levels; that's how far apart you want the monsters' core values to be from each other.

Then you can make a simple array of all of the monsters, shuffle it, and have the floors *only* select the monsters that are at it's floor +/- its margin of error. Remove the monsters chosen from the list, and then restart the list every floor; this will cause a feedback loop that will somewhat sort your creatures out by their approximate level, but still keep them shuffled up and inconsistent.

If you're going for a thing that generates a different pool of monsters each time, do the same thing, but replace the array of specific monsters with an array of monster class variables; and then randomize which monster generates per class every run. This will give you greater variety of the runs themselves, but only do this if you have the monster pool and variation within it to support the option.
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic