Questions tagged [text-based]

233 questions
0
votes
1 answer

How can I wait for an input while something else happens at the same time?

I've been having a really hard time putting this problem into words. What I'm trying to do is to have a while-loop constantly running, unless I give a 'stop' command. I'm making a fishing mini-game in a bigger game, and I want to be able to start…
glennrv
  • 3
  • 2
0
votes
1 answer

User/Player Health is not saved during attack simulation using a coin and random

I am a novice to python. My longterm project is to design a choose your own adventure text-based game. A major component of this game is attack scenarios. With that in mind, I have been constructing a python program for simulating an attack…
0
votes
2 answers

How do I repeat a choice in an Else/if format on Python?

I am making a text-based game in Python, which I haven't touched in a while, for a class project. I want the game to use a name feature, and want the player to choose their name, so I put in a line of code that is supposed to allow them to repeat…
Rene707
  • 31
  • 5
0
votes
4 answers

How to "style" a text based hangman game

My question is simple, the hangman game looks like this: I'm doing the indentation in a way I don't think is very good. I just have var = "\t" and add it at the begging of every print, this seem impractical and hard to maintain. Would you have it…
Trufa
  • 39,971
  • 43
  • 126
  • 190
0
votes
1 answer

Printing text into a printed text after it's printed

My idea was to insert a line of slow-moving text into a set of printed text after the printed text had finished printing out. So for example: @@@@@@@@@@@@@@ @ SlowText @ @@@@@@@@@@@@@@ The border would be printed out immediately and then the…
062904
  • 1
0
votes
1 answer

$("user-input").is(":focus") , ("*:focus") , ("input:focus") are not working

I have seen many questions asked about ': focus', but have not seen many helpful answers with context to text-based games or using inside of an if statement. I wanted to be sure what I was writing was correct, and I don't get any errors from my…
0
votes
1 answer

'user-input'.is is not a function

I'm trying to code a text-based adventure game, yes like Zork, and I keep getting the above error message. I tried a few workarounds, but I keep getting the same result. I'm pretty new to this forum, so I hope I can find some good help!! Here is…
0
votes
2 answers

Python: Split() method in input alter "if" statements outcome in text based RPG game

I've been learning how to code for a month now using the "Learn Python The Hard Way" tutorial. So far it's been a lot of fun. I challenged myself in creating a text based RPG game. I am currently re-writing the code for improved readability and…
gpiriou
  • 1
  • 3
0
votes
2 answers

Typo mistakes in input still meet conditions for text based RPG game with Python 2.7 on UNIX

I've been learning how to code for a month now using the "Learn Python The Hard Way" tutorial. So far it's been a lot of fun. I challenged myself in creating a text based RPG game. I am currently re-writing the code for improved readability and…
gpiriou
  • 1
  • 3
0
votes
1 answer

How to ask for user choice in Prolog?

I've just started learning Prolog. I am practicing from a fruit sample. but I could not create a structure that allows users to select by number. The examples I look at on the internet are not effective on the fruit sample. when I run the following…
Murat Kılınç
  • 175
  • 3
  • 16
0
votes
1 answer

OOP How do I add defeated enemy's money to main character's bag?

I'm almost done with this java game project. I just have to add a defeated enemy's money to the main character's bag. I also have to add weapons and armor if they are better than the main character's weapons and armor. How do I add the enemy's money…
Yep
  • 47
  • 8
0
votes
1 answer

How to get two functions to activate at the same time + Timer questions

I'm trying to code an attack for a text based adventure game, where the player can do damage with a sword. A random number is shown in the console and the player must type in that number as fast as possible. The faster they do it, the more damage…
Herobrine
  • 47
  • 1
  • 5
0
votes
1 answer

How to block keyboard input in Python 2.7?

I'm currently creating a text-based RPG in Python. When the game is first launched, it prints a small introduction message letter by letter. The thing is that, while it's printing, the user can still type on the keyboard and insert random letters in…
Lord Baryhobal
  • 132
  • 1
  • 7
0
votes
2 answers

How can I publish text-based games on python 3.7?

I'm neither programming very long nor doing it as job. Because I'm doing whatever I want I mostly programm videogames in python 3.7. My newest one is similar to a text-adventure, so it's text based. But when I want to play it, I'm doing this with…
Yelta
  • 7
0
votes
1 answer

Want to know if I can make buttons which perform a function in Python GUI

So I'm making this text based adventure game in python (with pre installed modules like random and time) and I've already made it for the console. But , I want to make an app out of it in which there are a few buttons located below and when clicked…
CarboxyDev
  • 47
  • 1
  • 5