Questions tagged [text-based]
233 questions
0
votes
1 answer
Variables reset when calling method
I'm creating a text-based game that requires you to search two places to move forward in the game, but it also has two dummy options to lead you astray. These are not important. The problem is that once the method is called again after heading down…

user3362503
- 1
- 1
0
votes
1 answer
Windows batch card game not working properly, don't know how to fix
So for our computer science class, we had to write a program that randomly generates cards, i decided to do mine in batch, because im a massive noob XD
I was confident that i could do it as im quite experienced with it. Even though batch isn't by…

Will11600
- 3
- 6
0
votes
0 answers
C++ adding borders on monsters (C++ text-based game)
void Map::Movement()
{
int ch;
switch (ch = _getch())
{
case KEY_W: //up
if (Player::posy != 1)
{
if (AboveM == false)
{
Player::posy--;
DisplayMap();
}
}
break;
case KEY_S: //down
…

Spencer Hopkins
- 15
- 10
0
votes
1 answer
A more efficient way to use/gather data in a text-based game
I have started development on a text-based adventure game. The environment behaves like a Sierra game, but there's no graphic interface and all commands are text.
Currently, any objects in the game (such as characters, rooms, items, etc) are…

DankHill
- 5
- 3
0
votes
2 answers
I cannot get my printWithDelay method to print faster than 300 milliseconds.
Here is my method
public static void printWithDelay(String data, long delay) {
for (char c : data.toCharArray()) {
try {
Thread.sleep(delay);
System.out.print(c);
} catch (InterruptedException e) {}
…

Daniel Winkel-Pedersen
- 135
- 7
0
votes
1 answer
Xcode 11db error thing: Thread 1: EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
I've been trying to write a game in Xcode where a game board is drawn in the terminal using a multidimensional array of type char. The game is supposed to be like a dungeon where there are doors that you can step on and when you do a new room in…

CharlieFan39
- 29
- 1
- 3
- 6
0
votes
1 answer
Why are my variables giving a different value when they are printed outside of the class I set them in?
I am making fairly new to C++ and I am using it to make a text based game for a school project. However during the first section of the game the player answers questions by entering the number shown beside the answer they choose. However when I…

Richard Horton
- 43
- 6
0
votes
1 answer
How To +1 A Previous Assignment (Python 3.3)
NOTE:
This is not a duplicate of
Python integer incrementing with ++
I triedw_sword += 1 and it still showed up as 0.
Okay so this is my code as of now.
#creates random monsters with xp points, leveling up player, and adding upgrades
#imports
from…

Antonio Anselmo
- 9
- 3
0
votes
1 answer
My text based game script is not working
I am making a text based rpg and the script is not working. It has something to do with the stamina. I also have a quest that is dependent on you having a certain amount of gold and that script is not working as well. I will include…

andrewb
- 1
0
votes
2 answers
Custom "invalid input" error message in Text-Based Game
I'm new to stackoverflow and would like to thank any and all people who come across this post and gives any assistance. Sorry if this question/request seems noob-ish, I am a beginner-intermediate programmer in C++(closer to beginner I would say) but…

TDubs95
- 3
- 3
0
votes
3 answers
How to remove dictionary entry depending on item condition
I want a room to be removed from my dictionary from the start of the game while snowboots = False. When snowboots = True, I want the room to be reachable, and I want picking up the snowboots to make them True.
if that makes sense.
roomDirections =…

kebab
- 17
- 5
0
votes
2 answers
How to code item interaction in text adventure
I am building a text adventure in python and I would like to have my items affect things in the game, for example, a passageway is too dark to walk down, unless the player holds a lamp in their inventory.
What would be the best way to code this…

kebab
- 17
- 5
0
votes
1 answer
How to do scheduled tasks in ASP.NET?
I am coding a text based web browser game in ASP.NET. But i need a lil bit info so i decided to ask here.
When user enter any quest, lets say that quest take 10 mins to proceed. If user exits from game, how can i make my script to run automaticly…

phoeNix
- 63
- 1
- 8
0
votes
2 answers
More while issues for my text based game
while(!A){
System.out.println ("You enter a room and look around, in it, you see three doors, a red door labeled A, a blue door labeled B, and a green door labeled C. Which door do you choose to go through? Enter, A, B, or C");
…

METEORITES
- 43
- 1
- 6
0
votes
4 answers
I'm having an issue with booleans apparently, textbased game
Scanner sc = new Scanner (System.in);
String enter = new String ("Enter your name brave soul: ");
System.out.println (enter);
String name = sc.next();
System.out.println ("Your name is: " + name + "? Y/N");
boolean y = true;
boolean n =…

METEORITES
- 43
- 1
- 6