Questions tagged [text-based]

233 questions
0
votes
3 answers

Element changes position when I add text

I'm making a text browser RPG and I have the input form in the bottom of the page. When I add text to my game this form just moves down. How do I prevent that and make it fixed in a certain position so it doesn't move when I add something to the…
Victor Key
  • 21
  • 3
0
votes
2 answers

Str object not callable (using input as arg for a function in a class)

I'm a very new coder learning python for the first time, working on making a text based adventure game as a project to teach myself. I've managed (I think) to almost get a working "engine" going, (Thanks to the wonderful people here at stackoverflow…
SchrodingersStat
  • 291
  • 3
  • 19
0
votes
2 answers

fpc: how to initialize a global variable before it is initialized

I am making a simple text game in pascal (a real beginner one). There is a general routine, that is repeated several times (the cycles variable, representing the levels). In the beginning of the routine there is a part where character`s name is…
Anvbis
  • 43
  • 1
  • 8
0
votes
1 answer

list index out of range.split on input?

i'm running into "out of range" while hitting enter and imputing single words. I understand why they are out of range, i just can't find how to fix the issue. this is my code: commands = { 'help': help, 'exit': exit, 'look': look, 'stats':…
0
votes
0 answers

Text-based game using HTML and JS: Where to put content?

I'm new to programming. I want to make a game where the user encounters a problem and then chooses one of 2-3 options. Currently, I have the story/content in html and handle the events using javascript/jquery. Is this an acceptable way or should I…
Ina
  • 1
  • 1
0
votes
2 answers

Grouping Variables in C#?

I'm new to C# started recently and had an idea to make a small text based RPG sort of a game, I am using Visual Studio 2017. I want to have a few different files, including one that marks down all the different types of enemies in the game, how much…
Anthony P
  • 31
  • 2
  • 9
0
votes
2 answers

Text-Based Battle mechanics - Python

Recently, my friend and I began working on a text-based battle sequence (in console) on Python for a fantasy style game. Overview The way it works is that the user is presented with: the current situation of their Attack (Att) + HP (HP), and whoever…
Necrolio
  • 11
  • 1
0
votes
4 answers

I have a issue with python classes

Ok so i'm making a text based RPG game but i have a issue with python classes that i'm not sure how to fix I've tried looking up this problem but haven't been able to find any posts that pertain to this maybe i'm looking up the wrong things? i don't…
0
votes
2 answers

how to get the elapsed time while interacting with other functions in a text-based application in python

So I created this project that records football (soccer) stats. Up to now it records only corner and free kicks but I want to record the possession time between the 2 teams. My main problem is that when I try to keep possession time, the other…
mangafas
  • 43
  • 7
0
votes
2 answers

Text Based Mechanics in Python: Class, Dictionary, or List?

I'm fairly new to coding in python (3) as somewhat of a hobby, but having fun playing around with some game mechanics without worrying about GUI. I'm currently working on a civilization-type text based game whose foundations lie in an old excel…
0
votes
1 answer

Python error: cannot concatenate 'str' and 'builtin_function_or_method' objects

I am currently in the process of programming a text-based adventure in Python as a learning exercise. So far, the player can name themselves, the value of which is stored in a dictionary key. However, when I attempt to allow the player to choose…
0
votes
1 answer

Text based game with choices that takes place over many days

I am currently making a game that takes place over 10 days in senior year. I created an intro to this game but I am unsure of how to put it all together. Should I have the intro be the parent class and have different subclasses for each day? Here is…
0
votes
1 answer

Text-Based Game in Swift

I'm very new to programming and I'm trying to learn the basics of Swift. I have coded a very simple quiz game for iOS whereby the app moves through the questions in a sequential order. I am wanting to move onto a simple text-adventure game. To start…
user2952907
  • 1
  • 1
  • 4
0
votes
2 answers

Text-Based Calculator not working

I just started writing this basic text-based calculator in Java and I found into a problem when I ran the adding portion, when I add 2 numbers, say '9' and '9', the answer comes out to 99 instead of 18, as it should. Is it because I'm not storing…
Josh P
  • 29
  • 5
0
votes
2 answers

Making a text based game that waits for a JButton event

I'm looking for a way to make a simple text based game, though I'm having problems doing it in Event Driven rather than a game loop. The basic way that the game plays: Says what monster you are fighting. Attack. When it is defeated, you go to the…