Author Topic: My new roguelike  (Read 12197 times)

Kalantir

  • Newcomer
  • Posts: 31
  • Karma: +0/-0
    • View Profile
My new roguelike
« on: October 08, 2010, 12:54:04 PM »
Sorry, if this is in the wrong spot...as I you can see I am new here.

Anyways, I started a new roguelike, and wanted to share some ideas I have for it and was maybe looking for second opinions on some things.

I'm very loosely going for an Adom type of feel.

The premise behind this game is a persistent save file for each real life player.  As the player achieves certain scores or does certain things in game, it will unlock new races which become available once the current character retires or dies. So, even though you have a save file which does not delete upon loading the game, you still restart your character upon dying. Eventually, every creature in the game will be a playable race.  NPC's, monsters, and players are all treated the same via polymorphism.

I have been working on this over the last couple days.  So far I have managed to set up a world map, which can randomly generate towns/dungeons/whatever else i want. Each time a player enters a town/dungeon/whatever a "portal" is saved for that location on both ends linking the areas to each other.  So, you can enter locations, leave them, come back to them later, and it remembers them.  I also am almost finished with the "lighting engine".  Basically just what determines what can and cant be seen.  I still must write the random map generators for each different type of map.  Currently the field map just has a few random trees, towns are completely empty except for a few houses with no doors, dungeons are just a staircase leading back to the surface in a large empty room.

Ideas I'm looking for are
What method should I use to generate a random dungeon?  Have any of you played the 7drl "You Only Live Once"?  It's one of my favorites and I think it has a pretty nice look to its dungeons.  It seems like it randomly pieces together like 5x5 grids of preset tile groups or something to that effect.  Does anyone know how I would go about creating those?

How should I do the random world generator?
Currently, the world generator only creates a border of mountains around the edge of the map, and then generates random cities, mountains, and dungeons with the rest filled in with plains.
I just dont know where to begin to actually generate a semi-realistic world.  Also, I must figure out how to  generate a race-specific town for each race to start in.  That should be relatively easy for all intelligent and humanoid races... but animal creatures would have to be handled differently..

Sorry my post is such a mess and so long, but I'm really tired.. Anyways, I hope I got across what I meant to.

Here's a link if you want to see what I have so far. http://rapidshare.com/files/423838985/PaveriaRL.rar
Yes, I realize the field of view looks screwed up especially in villages.

hjlyubn for movement
> to enter a location (field, town, dungeon)
< go up a staircase

You can see how the field of view works better if you > into any field " and observe how trees effect it.

magellan

  • Rogueliker
  • ***
  • Posts: 91
  • Karma: +0/-0
    • View Profile
    • Email
Re: My new roguelike
« Reply #1 on: October 08, 2010, 01:09:31 PM »
There are quite a few approaches.
One for wilderness maps (That i find rather good, and can't remember where I stole it) is this:

Draw random circles, one after the other. each circle has a height of 1, and adds to the underlying terrain.
So if 2 circles overlap, you have 2 areas with height 1, and a small ridge of 2 in between.
Do this very often.
Then assign a certain terrain type to each height. Very low is going to be water, very high is mountains, between is grasslands, woods, hills.
Looks pretty neat.

Dungeons:
A very simple way is this.

Dig a first room
do
   Check for another place to put a room, that doesn't overlap with existing rooms
   Dig that room
   Dig Tunnel from that room to the closest none-wall tile
loop until no more rooms can be placed or room/wall ratio is met

Kalantir

  • Newcomer
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: My new roguelike
« Reply #2 on: October 08, 2010, 01:42:27 PM »
http://rapidshare.com/files/423848416/PaveriaRL.rar

Last link doesnt seem to be working

Darren Grey

  • Rogueliker
  • ***
  • Posts: 2027
  • Karma: +0/-0
  • It is pitch black. You are likely to eat someone.
    • View Profile
    • Games of Grey
Re: My new roguelike
« Reply #3 on: October 10, 2010, 11:36:26 PM »
The premise behind this game is a persistent save file for each real life player.  As the player achieves certain scores or does certain things in game, it will unlock new races which become available once the current character retires or dies. So, even though you have a save file which does not delete upon loading the game, you still restart your character upon dying. Eventually, every creature in the game will be a playable race.  NPC's, monsters, and players are all treated the same via polymorphism.

Wow, you're going for a very big target.  Sounds a bit like how TOME4 is getting at the moment.  I'll give you the advice that every roguelike developer needs to learn: start small and build yourself up.  It helps a lot to get a releasable, playable game early, even if it's stripped of vital features.

Quote
What method should I use to generate a random dungeon?  Have any of you played the 7drl "You Only Live Once"?  It's one of my favorites and I think it has a pretty nice look to its dungeons.  It seems like it randomly pieces together like 5x5 grids of preset tile groups or something to that effect.  Does anyone know how I would go about creating those?

There's plenty of methods.  Personally I've only ever done cave generation, which is a bit easier.  You might want to check out some specific development articles on RogueBasin.  You Only Live Once is open source, so there should be no problem having a peek at that and getting some ideas.  The game's maker Jeff Lait is also a frequent poster on rec.games.roguelike.development - you could try posting there looking for advice.

Quote
How should I do the random world generator?
Currently, the world generator only creates a border of mountains around the edge of the map, and then generates random cities, mountains, and dungeons with the rest filled in with plains.
I just dont know where to begin to actually generate a semi-realistic world.  Also, I must figure out how to  generate a race-specific town for each race to start in.  That should be relatively easy for all intelligent and humanoid races... but animal creatures would have to be handled differently..

Best article I've seen is this:

http://www.nolithius.com/game-development/world-generation-breakdown

It's a description of how Dance of Death creates its world map, and it has some impressive results.  Otherwise there are also some ideas on RogueBasin, I believe.

Best of luck with your efforts, and keep us updated on how you progress  :)

Kalantir

  • Newcomer
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: My new roguelike
« Reply #4 on: October 11, 2010, 02:56:13 AM »
Wow, you're going for a very big target.  Sounds a bit like how TOME4 is getting at the moment.  I'll give you the advice that every roguelike developer needs to learn: start small and build yourself up.  It helps a lot to get a releasable, playable game early, even if it's stripped of vital features.
I've already made several pathetic attempts at creating a roguelike over the last few years, but as my programming knowledge has grown, I've realized that where I failed before was setting up a good base to work with.  The problem is, if you don't set up a good framework, it makes it much more difficult for expansion.  Also, my roguelike is considerably less complex then most due to the lack of classes(everything will be based on attributes and skills) and the fact that there are no static maps.  So far in this attempt, I've more or less made a roguelike engine(minus combat) which is now ready to be utilized and expanded.  Once all my random generators are set up and I implement a combat system it will be "playable", although not necessarily winnable.  Then I will work on a random quest tree generator(That's the hard part).  Once that is finished, it will actually be winnable.  Different endings will be available depending on which quest branch the player followed down.

Since this is just a side project for my own amusement, I'm not terribly concerned with it actually getting finished or released.  Although, if it does, that will be nice.


Quote
There's plenty of methods.  Personally I've only ever done cave generation, which is a bit easier.  You might want to check out some specific development articles on RogueBasin.  You Only Live Once is open source, so there should be no problem having a peek at that and getting some ideas.  The game's maker Jeff Lait is also a frequent poster on rec.games.roguelike.development - you could try posting there looking for advice.
Thank you for the link and information.

Quote
Best article I've seen is this:

http://www.nolithius.com/game-development/world-generation-breakdown

It's a description of how Dance of Death creates its world map, and it has some impressive results.  Otherwise there are also some ideas on RogueBasin, I believe.
Looks interesting, I'll definitely have to read that over.

There are quite a few approaches.
One for wilderness maps (That i find rather good, and can't remember where I stole it) is this:

Draw random circles, one after the other. each circle has a height of 1, and adds to the underlying terrain.
So if 2 circles overlap, you have 2 areas with height 1, and a small ridge of 2 in between.
Do this very often.
Then assign a certain terrain type to each height. Very low is going to be water, very high is mountains, between is grasslands, woods, hills.
Looks pretty neat.

That sounds very clever.  I might mess with this and see what kind of variations I can make to improve that method.


Also, something else I'm considering is multiple algorithms for each type of map.
ie.
different world map generators, so that the world map doesn't look similar every time you start a game
Different dungeon generators, so as to support multiple themes and keep dungeon romping from getting boring.
Different town map generators so it doesnt look like one person designed every town in the world.

What do you guys think?
« Last Edit: October 11, 2010, 03:01:21 AM by Kalantir »

Bear

  • Rogueliker
  • ***
  • Posts: 308
  • Karma: +0/-0
    • View Profile
Re: My new roguelike
« Reply #5 on: October 13, 2010, 01:03:15 AM »
I think you're on a good track.  One thing about developing a roguelike is that you're right, you want to have a good design in place, and if you do then developing content is easier.  Mistakes ("pathetic attempts" as you call them) are an excellent way to learn and evolve a good design. 

I think it's a good idea to have several different map generators.  That way you can associate different styles of architecture with different beasties, so an ant tunnel-and-chamber complex doesn't look like a giant-badger burrow doesn't look like an abandoned temple doesn't look like a dragon's cave doesn't look like a goblin warren, etc. But this only works if you "bias" the map generator and creature generators together, so they come up with the appropriate monsters in the appropriate settings.

Bear

Kalantir

  • Newcomer
  • Posts: 31
  • Karma: +0/-0
    • View Profile
Re: My new roguelike
« Reply #6 on: October 13, 2010, 08:31:15 PM »
But this only works if you "bias" the map generator and creature generators together, so they come up with the appropriate monsters in the appropriate settings.

The way I'm doing this is by making each type of map its own class.  This way, it they can each be used as if they are the same but I can write their random generators or any other functions seperately.  Or just have them use the default inherited from the original Map class.