Questions tagged [text-based]

233 questions
0
votes
1 answer

Is JApplet Writing safe?

So I am creating a JApplet Game, and I am saving the users info to a .txt file in the APPDATA. Is there a safer way to save their info, that won't allow them to edit it to cheat?
Jay
  • 143
  • 2
  • 11
0
votes
1 answer

How to implement time.sleep(delay) pauses into f-strings, to smooth out the look and feel of my Text Adventure game?

Here is a relevant code snippet that I'd like to implement this on (the f-string in start()). I've assigned to variables the values from the parameter of the function that allows the interpreter to pause when running my script whenever it's called.…
0
votes
2 answers

Using root.update to print a string list in python once

I am attempting to make a rogue clone in python using Tkinter, I found using .update would work better for what I want to do but unfortunately when I print out the string, it prints it out, and out and out while True: print(key_press) if…
0
votes
1 answer

How could I add a skill point limiter in lua?

Ok so I'm building a Text-based adventure in lua... If anyone thinks that is a bad idea well I am the master of bad ideas but the question is about the level up function... So here it is function lvl() if xp >= xpr then level = level +…
Shatow
  • 17
  • 4
0
votes
0 answers

Python Text Base game - Almost functional

I am writing this for a class. I keep running issues with being able to validate if a person is typing 'Go' or 'Get'. If i type 'bo north', the code will execute to the next room. It should give an error code. I also think my def move_directions can…
0
votes
1 answer

When I run a text based game through python the text I am putting into the terminal when I run it turns yellow. When entering the text an error shows

So I am very new to python. The text based game I'm making incorperates multiple choices and routes to choose from. I'd imagine I use the very basic ways of executing things, that's because I primarily use if/else/elif statements. The following is…
0
votes
1 answer

Movement and pick up Item based game (possible if-else statement problem)

I'm a little new to python and doing and assignment in my class to make a text based game that moves from room to room with North South East and West. In all but the first room there are Items that the player must pick up. The commands for movement…
0
votes
1 answer

Some commands in some rooms take me to unintended parts of the code

I'm currently working on this text based game for a python introduction class. I can't figure out why some parts of the code takes me to another part that I didn't assign. Like I would go east then north, which should take me to 'Hidden Mud…
redpat
  • 1
0
votes
3 answers

I can't see the continue button

I am a beginner programmer working on a text based game in Visual Studio and the continue button doesn't show up on the webpage. Is there something I missed?

0
votes
1 answer

How am I able to count how many specific string values of a certain kind I have in my list / dictionary?

Utter newb here with a slowly but surely growing bad reputation. I want to know how my dictionary value char['bag']['Iron Ingot'], or any 'Ingot' for that matter, can be counted without showing a TypeError: 'list indices must be integers or slices,…
Joseph_C
  • 59
  • 4
0
votes
1 answer

c++ static variables in a text based game

I am currently struggling to problem solve. I need to make my text based comment for entering a room, different the second time I enter that same room and get an object that first time. My code is formatted a little wrong but it looks like…
0
votes
1 answer

Is it possible to add an integer to a list comprised of two integers? (NOT a third variable)

I have a dictionary for a text-RPG I'm working on in Python 3.9. I want to know if the list, 'atk', embedded in the dictionary can grow as the player obtains new weapons, or perhaps when they level up. 'atk', in my code, refers to the lowest and…
Joseph_C
  • 59
  • 4
0
votes
0 answers

Combat sequence for a text-based RPG

This is the code. #When I try to make the variable ‘enemy’ save globally, it says ‘Variable referenced before assignment.’, or something along those lines. How do I fix this? #If you are going to suggest to make it all one function, I tried and it…
0
votes
1 answer

Text-Based adventure in Kivy, Python

I'm very new to programming, just have an introductory seminar in university, and I'm supposed to program a little app in Python. For that, I want to use Kivy, but I got stuck. I have a text file which should include the question, the possible…
annawebs
  • 13
  • 1
  • 3
0
votes
2 answers

Repeating sections of code multiple times in my text-based game

I'm making a text-based game, which is based largely in if-, elif- and else-statements. However, I also use while loops for different "areas" within the game. (Play_loop, Main_loop, Shop_loop, Fish_loop, etc.). Lately I've implemented admin commands…
glennrv
  • 3
  • 2