Questions tagged [text-based]

233 questions
0
votes
2 answers

What is wrong with my code? I am new at Python 3.3

def start(): import os os.system("cls") print "*A Wise man once said “Be the change that you wish to see in the world.” This is the idea you have decided to live by and strive for in your quest for making a better world. You are Noah…
user2490630
  • 21
  • 1
  • 3
0
votes
2 answers

Python multi-line string losing formatting

I am making a hangman game, which gets the hangman shape from a list. For some reason though, because each image is in a multiline string, somehow it loses formatting so that one line goes on the same as another. Here's the code: ''' …
codemonkeyz
  • 35
  • 1
  • 4
0
votes
1 answer

NumberFormatExceptions being thrown everywhere. Why? (parseInt)

First time poster here with a seriously annoying issue. I have decided to create a text-based RPG in Java in order to consolidate what I have been learning. And with all lengthy games, a saving/loading system is necessary. This is where my problems…
0
votes
1 answer

I have two scala projects - basically the same - one works and one does not. Can someone tell me why?

For class we have to make a test based game in which we move through a series of rooms like the old school text game Colossal Cave Adventure. I began by defining functions for the different rooms so that when the directions are typed in the room…
Chris
  • 233
  • 2
  • 5
  • 14
0
votes
1 answer

how to combine same inventory items in a text based role playing game to one row

I run a text based games and in the inventory i get rows like this: Mini-Rocket Launcher x10000 Mini-Rocket Launcher x10000 Mini-Rocket Launcher x10000 Mini-Rocket Launcher x10000 Mini-Rocket Launcher x10000 Mini-Rocket Launcher x10000 I am…
0
votes
1 answer

Web console for text-based RPG in Python

I'm a beginner here, slowly learning Python. I wrote a text-based RPG game, and I'm looking for a way to create a web-version of it. However, I don't want to follow the approach where HTML is generated when something happens in game (i.e. player…
hdaen
  • 1
0
votes
6 answers

While loop condition not working

Hey basically i want both the player and the wolves to attack each other until one another are dead. But the while loop is infinite so obviously the condition is not met. But i cant see where i am going wrong with this if ( choice1 == 1) // if…
Pendo826
  • 1,002
  • 18
  • 47
0
votes
1 answer

Method for enemy to attack player

Hey in my text based adventure game. I have this class: class wolves { public: string name; int health; private: string attack; //wolves(string name,int health); // Constructor //hitPoints() +1; }; I have a method that…
Pendo826
  • 1,002
  • 18
  • 47
0
votes
2 answers

Return to code after function runs

I'm making a text-based game and need an application-wide command line that's able to be pulled up at any text entry. My plan was to have the commands contained within a module, and execute command(), which would then allow the user to enter a…
0
votes
2 answers

disjointed clickable text rollover

I have text-based navigation. Rolling over "contact" displays the address (layer) over all the other menu buttons. I would like the email address and the phone number to be rollovers (changing color from grey to red) and as well clickable links.…
rapha
  • 5
  • 1
  • 7
0
votes
3 answers

The value of the variables aren't changing in a simple text RPG game using C++

I'm trying to create a very simple turn-based text RPG game. The code compiles and runs but the attack and heal functions don't seem to change the values of the variables. I'm pretty sure it's a problem related to inheritance but I'm not sure.…
0
votes
1 answer

custom logging method MyLog not working for high-page characters in Objective-C

I am trying to use a custom logger to give clean console output for a text-based game. Below is the code of the method in question: void MyLog(NSString *format, ...) { va_list args; va_start(args, format); NSString *formattedString =…
Ky -
  • 30,724
  • 51
  • 192
  • 308
-1
votes
1 answer

How can Automate Or Bypass Text-Based captcha in Cypress

I can't automate or bypass the Text-Based captcha in Cypress. Click here to open this image This Type of captcha I want to automate I try to use cy.pause() Command and enter manually the captcha but it was repeatedly changed the captcha. I want to…
ben ben
  • 5
  • 3
-1
votes
1 answer

`elif` statement is not triggering in my `if` statement. Not sure why. Involves comparing a win condition list to an inventory list

I'm crafting an item collecting dungeon game. I have an if statement that looks at my sorted inventory list and triggers if I have collected all of the items. The next elif statement triggers if I enter the exit room and don't have all the items.…
zeroMana
  • 1
  • 2
-1
votes
1 answer

Using an "if" statement in a class function to level-up Player class instance

I am working on creating a class for a Player (user) in a text-based Python game. The level is expressed as the level function in the Player class. I include a level_up() function for when users successfully complete a quest. Completing a quest…