Questions tagged [text-based]
233 questions
2
votes
6 answers
Using Switch-blocks to Parse input for a Text Adventure?
Okay, I have a goal right now to make a basic text adventure. To do this, however, I would need/want to have a switch statement that can do the following:
Check to see if a string has a word SOMEWHERE inside.
Check to see if a string has two words…

Ian Cordle
- 206
- 4
- 13
2
votes
2 answers
Java text based game - How to implement class choosing feature?
I am trying to make a role-playing game in java.
I am new at java so i don't understand all things.
I Need help to implement class choosing feature.
Here is my code:
package com.rpg.entities;
import java.util.Scanner;
public class Character…

Dejan Ilic
- 99
- 1
- 4
- 13
2
votes
2 answers
Simpler text menu in Python 3
I have to make a program with a text based menu system for a school project. It includes a main menu and multiple sub-menus. I have made my current version of the menu with LOTS of if-statements, prints and inputs. But it is neither a elegant nor…

Rewned
- 61
- 4
2
votes
1 answer
C++ text-based selection menu on Linux behaving strangely?
The code is a bit long, but that's only because I commented everything so it's very easy to read. Basically this is a simple text-based selection menu that I'm working on.
You need to be on Linux and have a C++11 compiler to run this properly.…

notadam
- 2,754
- 2
- 19
- 35
2
votes
3 answers
Python beginner, text-based game
I'm fairly new to the programming game; I'm 3/4 of the way through Learn Python the Hard Way and I had a question about a little text-based game I made... So in this game my guy is stranded on a desert island and you have the option(raw input) of…

user3580073
- 39
- 3
2
votes
0 answers
Assigning Equipped Items to Player Characters in Text Adventure game?
I'm creating a text-based adventure game and Im a bit confused on how to actually assign a weapon object to a player. I'm inputting weapons from a text file called weapons.txt:
ID: 1.
Weapon Name: Katana.
Damage: 20.
Weight: 6.
ID: 2.
Weapon Name:…

Becca
- 117
- 1
- 12
2
votes
1 answer
Interacting with other objects in a text-based game in Java
I'll try to be as clear as I can about this so that there's no confusion. Also, I'm not looking for a how-to process, just some tips on how to get started and head in the right direction.
I'm relatively new to programming in general (programming in…

LMAR1093
- 23
- 4
1
vote
3 answers
Python GUI Toolkit for Text-Based Game?
Quick to learn is pretty important, but I need just some basic GUI tools, for Ubuntu OS but would be nice to have multi-OS compatibility. Any suggestions?
The basic dynamics of the intended game just include a text input and some set…

Arger
- 171
- 1
- 9
1
vote
3 answers
ProgressBar for perl
I'm trying to make a simple text-based progress bar in perl, in order to display the progress while sending an email or doing a task.
Any pointers ?!
Thanks

amrfaissal
- 1,060
- 1
- 7
- 18
1
vote
1 answer
Beating TextBased Game with a full inventory of items
So this is my first question that I've ever posted on here so I'm sorry if I mess up the format of all this. I'm trying to code a text based game moving from room to room and adding items to your inventory. I currently have it set up that if you…

a.brown.94
- 13
- 3
1
vote
1 answer
lua text-based fighting system
Ok, so I am trying to create a text-based adventure game. I am currently creating the attack system. Here is the code
start = io.read()
if start == "start" then
ma1 = "jab your opponent"
ma2 = "hook your oppenent"
fa1 = "kick your…

Shatow
- 17
- 4
1
vote
2 answers
building a python text-based game: im trying to access a specific value inside of a dictionary
hey everybody i am building a text based game for a class where i am moving between rooms and trying collect all the items without going into the room with the villian, in this case the Record Executive, and im just having issues accessing the item…

aubrey digital
- 13
- 2
1
vote
1 answer
How to make an if statement to check if all three items in list is present in another list
This is a bare sample of what I'm trying to build and I don't know why the combination of "wallet" and "ring" can pass as win.
I want the player to obtain all three items in order to win. Do you pose better solution to this?
import sys
inventory =…

BlueberryWine
- 21
- 4
1
vote
1 answer
Creating a simple experience points gaining and leveling up system in a text based RPG in Python
Feel free to edit this post if it requires it.
Hi, I have been learning python for two months now, and I just finished learning about functions and blue bean logic. I decided to try my hand at making a text adventure on the side while I am not in…

Σamuel
- 11
- 3
1
vote
0 answers
Why does my text-based adventure game "loop" through the if statements instead of making an either-or decision?
Edit: Looks like my main problem was, for whatever reason, having the boolean operator "or" in my choices would default the user to playing both choices, or the affirmative one instead of the negative one. If anyone can explain why, I would greatly…

Joseph_C
- 59
- 4