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


Log in to post a reply.

Support

Forums