Roguelike text adventure?

I've been experimenting with making my text adventure kinda "rogue-like". How I've been doing this is putting all the possible entrances, items, or NPCs in their appropriate rooms, making it so the player can't see or interact with them without them being mentioned by the game, then have a bunch of [random:] things containing the entrances/items/NPCs, thus making a "randomly generated map". Has anyone else been trying to make rogue-like text adventures? Care to share any tips?


I have some lazy codes, but if you are interested

The below code determines whether an object appeared or not, copy the same code for the rest of your objects and exits, the other coding experts are able to write a code that automatically does the same to all objects in a room which will be a better code than this

(Write down the code on enter room)

firsttime {
  if (RandomChance(10)) {
    MakeObjectVisible (donkey)
  }
}

(Write down the code on enter room, this code also requires you to change the names of the exits first)

firsttime {
  if (RandomChance(90)) {
    MakeExitVisible (go to room2)
  }
}

Another more content fully utilized method is to base the visibility of the objects via the player's level, it will be up to you whether the player's level is known to the players or not

This code will require you to set their levels to 0 on their attributes page first
(mrangel have said that it should be game.pov.level instead of player.level, I am writing it as player so new coders dun get lost)
(Write down the code on enter room)

if (donkey.level = player.level) {
  MakeObjectVisible (donkey)
}
else{
 MakeObjectInvisible (donkey)
}

Mrangel have taught how to create an infinite maze before, but I am too funny to explain how it works, so I will post the links instead

Sample game
https://textadventures.co.uk/games/view/wyxv0ib9jkopqyza1nhsww/infinite-maze-2021
Theoretical lessons by mrangel
https://textadventures.co.uk/forum/quest/topic/igcf62bri0ovenfu0aapwg/how-to-create-infinite-maze
No need to learn, gimme the codes
https://gist.github.com/foxrain4/171dfa464868b6381e13ca0281d0ff2f


There are a lot of pseudo-roguelike-like workarounds you can use when you encounter engine limitations. Instead of randomly generated maps, you could use multiple pre-generated static maps and randomized nodes so the same map would feel different in other playthroughs. Send the player to dungeon 1, 2, or 3. So the first level of the dungeon could have 3 different possible maps that a player may be sent to. So, it would be extra work, of course.

You could spawn the player at different starting points in each dungeon. You could have nodes throughout the dungeon, that are randomly generated when the player enters the room. You could have a universal node that randomly selects from a set of enemies, treasure, or other things. You could have specific mob, treasure, and thing nodes, too.

You can definitely do a lot with random number generation. I'm currently working on a game in Quest that uses multiple, random descriptions. Some are for game color and humor, and others are to make playthroughs more unique, like those nodes I talked about.

That said, Inform 7 might be better for what you want to do. In fact, a fairly notable IF roguelike was made with it. Check out the game and then maybe check out Inform.

https://kerkerkruip.org/about/

Whatever you use, you really want to focus on getting the framework and core mechanics in place. It sounds like that's what you're working on.


Log in to post a reply.

Support

Forums