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.


Ah, roguelike text adventures! Those are always such a wild ride. The randomness and unpredictability are what make them so fun, but I totally get the challenge in balancing depth and simplicity. Sometimes when you're designing, it's like walking a tightrope between giving players too much info or not enough. And figuring out how to pace it all? Man, that's a skill on its own.
Honestly, when I hit a creative block while working on projects, I’ve found it really helps to have some solid resources backing me up. One that’s been super useful for me is https://99papers.com/ they really know how to break down complex tasks into manageable steps, especially when things feel overwhelming.


Log in to post a reply.

Support

Forums