Author Topic: 7DRL questions  (Read 9533 times)

jasonpickering

  • Rogueliker
  • ***
  • Posts: 274
  • Karma: +0/-0
    • View Profile
    • Email
7DRL questions
« on: September 01, 2011, 04:30:34 AM »
Hey guys. I am going to try making a small 7 day roguelike in flash. I started a while ago, with building different code snipets I.E grid movement test, Turn based movement test, stuff like that, but after learning all the basics I am starting an actual one. so I have a landmass being created and the player starting in the center at their Lair. My next task is adding things to the world, basically houses (code is done so they grow into towns over time). I guess I just don't understand how to populate my world with stuff. so how would you go about doing this? I need more theory then actual codes.


Test Build

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: 7DRL questions
« Reply #1 on: September 02, 2011, 12:38:52 AM »
I guess I just don't understand how to populate my world with stuff.

Your question is a little too ambiguous. 

I guess you are really talking about a map object that contains (references)  instances of terrain types and monsters?  Terrain is static so a map cell (an x,y part of the map) will contain a terrain object. Then you have to decide whether your cell owns a monster or a monster has a cell reference, or a Manager class links them together.

Please be more specific with you questions and people will be more willing to help, cheers.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

jasonpickering

  • Rogueliker
  • ***
  • Posts: 274
  • Karma: +0/-0
    • View Profile
    • Email
Re: 7DRL questions
« Reply #2 on: September 02, 2011, 02:40:10 AM »
sorry about that.

basically I am wondering what algorithms or processes people go through to populate their world with Enemies/ items that kind of thing.

obviously you don't want the player to spawn at the stairs surrounded by every monster in the level. so how does someone go about  placing these items. My original plan was to go through cell by cell, but that caused everything to be more weighted towards the top left side of the screen, where I was hoping for a more even distribution across the entire landmass.

corremn

  • Rogueliker
  • ***
  • Posts: 700
  • Karma: +0/-0
  • SewerJack Extraordinaire
    • View Profile
    • Demise RogueLike Games
Re: 7DRL questions
« Reply #3 on: September 02, 2011, 09:57:12 AM »
Ok, for each level I get a list of available monsters, their weights, and their avaiable terrain types with terrain weights.

I randomly choose a monster (or group of monsters) from the list and randomly choose the terrain type that it will be generated on and then get a list of avilable terrain cells from the level (deleting the ones I dont want to generate monsters one, e.g. near an entrance etc) and randomly choose the cell to drop my monster on. 
Rinse, repeat.
I add up the difficulty of each monsters and when it reaches a certain number I stop generating monsters.
corremn's Roguelikes. To admit defeat is to blaspheme against the Emperor.  Warhammer 40000 the Roguelike

jasonpickering

  • Rogueliker
  • ***
  • Posts: 274
  • Karma: +0/-0
    • View Profile
    • Email
Re: 7DRL questions
« Reply #4 on: September 03, 2011, 05:16:33 AM »
Thanks, that helped a lot. I don't have different terrain, but I was able to separate my level out, by distance from the center like a concentric circle. works good.

new questions will be coming in, this probably will be a 7-ish day roguelike as some stuff as come up so I cant put all my focus on it.

guest509

  • Guest
Re: 7DRL questions
« Reply #5 on: September 04, 2011, 07:10:48 AM »
  So you have just one huge flat world?
  Generate random spawn point. Check Terrain at that point. Place the appropriate enemy there based on terrain and distance from the lair (I assume that's how you are handling difficulty, distance from lair).

  What's better though is if some points would spawn an entire tribe, so you can fill an area with, say, 1 orc chief/boss, a shaman and a few of his goblin underlings (archers, warriors, etc...) running around in the perimeter of his domain. So that entire area becomes filled with green skins. Gives that section of the map a bit of flavor.

  Towns should spawn city guards and what not. Some Naga's running around by the water, etc...

  I have seen some games that seem to create enemies by reproduction. Like the game spawns leaders throughout the land, then the game runs a few turns as the leader produces random minions who run around doing stuff. Run 50 turns then turn off the breeding.

  Just some ideas.

jasonpickering

  • Rogueliker
  • ***
  • Posts: 274
  • Karma: +0/-0
    • View Profile
    • Email
Re: 7DRL questions
« Reply #6 on: September 05, 2011, 02:10:54 AM »
yeah I was basically towns as RTS systems. each turn they gain gold for you to capture and take back to your hoard. they can use that gold to buy guards, heroes, traders, thieves and settlers which will go make other towns, but the idea of different races had not occured to me yet. I might have to look into that, could be really fun.