text-adventure | A text adventure game for Android | Game Engine library
kandi X-RAY | text-adventure Summary
kandi X-RAY | text-adventure Summary
An Android old-skool text adventure game. This is another exercise in TDD in an Android environment. Don’t forget to drive the development by producing value - the value is game content and this should drive the development of functionality to support it.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Invoked when the menu item is selected
- Creates a builder for the options dialog
- Show Waypoints list
- Create an action by name
- Returns the bitmap for the drawable
- Retrieves the bitmap resource
- Infers the actions from the text experience model
- Generate the pick age actions
- Handles a touch event
- Zoom the event
- Returns the command line arguments for this entry
- Cancel pause
- Returns the list of arguments that this item should be displayed
- Returns a list of all available actions
- Adds a new location to the model
- Returns a hash code
- Extracts the inventory items
- Extract location locations
- Adds the menu to the options menu
- Initialize the activity
- Deserialise a ModelLocation
- Deserialise the given exit content
- Removes non - printable lines from the text
- Find an item in the inventory
- Invokes an action
- Deserialises the given item and content
text-adventure Key Features
text-adventure Examples and Code Snippets
Community Discussions
Trending Discussions on text-adventure
QUESTION
ANSWER
Answered 2022-Mar-03 at 21:32Add the images into the textNodes object, the you can easely use therefrom.
QUESTION
So I am trying to add save files to my text-adventure game that can't be edited by the user. This is so that they can't cheat by editing the dictionary inside of it. So far all I've done is a few algorithms that can be easily bypassed if you connected the dots. Basically it's this.
...ANSWER
Answered 2022-Jan-25 at 01:20You can't hide files from the super user. They bought their computer and they reserve the right to read and edit whatever files they please. And no program will ever have higher permissions than the administrator.
Your best bet is to encrypt the data inside the file. So that if the user tries to edit, the program won't function properly.
A question that might be more relevant: https://gamedev.stackexchange.com/questions/48629/how-do-i-prevent-memory-modification-cheats
QUESTION
Im new in Python3. I wrote a little text-adventure but i don't know how to use the input string to access the object properties.
...ANSWER
Answered 2021-Jan-21 at 06:55Try
QUESTION
Im making a text-adventure game where you have to solve riddles. And i created an array riddles = ["riddle1", "riddle2", ...]
and answers= ["answer1", "answer2", ...]
(answer1 is answer to riddle1) then i choose random riddle with riddle = random.choice(riddles)
and now i have check if input
is same as the answer
of the randomly chosen riddle. But first i try to save the correct answer of randomly chosen riddle into variable answer
. I do that with answer = answers[riddle]
. I also tried answer = answers['riddle']
as i found on Google. I even tried answer = answers[riddles[riddle]]
and i cant get the effect i want
Also i get this error list indices must be integers or slices, not str
when i try to run the program
Here is the function
`def riddle_room1():
...ANSWER
Answered 2020-Nov-06 at 12:13riddle = random.choice(riddles)
QUESTION
I'm a beginner programmer (who has a bunch of design-related scripting experience for video games but very little programming experience - so just basic stuff like loops, flow control, etc. - although I do have a C++ fundamentals and C++ data structures and algorithm's course under my belt). I'm working on a text-adventure personal project (I actually already wrote it in Python ages ago before I learned how classes work - everything is a dictionary - so it's shameful). I'm "remaking" it in C++ with classes to get out of the rut of having only done homework assignments.
I've written my player and room classes (which were simple since I only need one class for each). I'm onto item classes (an item being anything in a room, such as a torch, a fire, a sign, a container, etc.). I'm unsure how to approach the item base class and derived classes. Here are the problems I'm having.
How do I tell whether an item is of a certain type in a non-shit way (there's a good chance I'm overthinking this)?
- For example, I set up my print room info function so that in addition to whatever else it might do, it prints the name of every object in its inventory (i.e. inside of it) and I want it to print something special for a container object (the contents of its inventory for example).
- The first part's easy because every item has a name since the name attribute is part of the base item class. The container has an inventory though, which is an attribute unique to the container subclass.
- It's my understanding that it's bad form to execute conditional logic based on the object's class type (because one's classes should be polymorphic) and I'm assuming (perhaps incorrectly) that it'd be weird and wrong to put a getHasInventory accessor virtual function in the item base class (my assumption here is based on thinking it'd be crazy to put virtual functions for every derived class in the base class - I have about a dozen derived classes - a couple of which are derived classes of derived classes).
- If that's all correct, what's an acceptable way to do this? One obvious thing is to add an itemType attribute to the base and then do conditional logic but this strikes me as wrong since it seems to just be a re-skinning of the checking class type solution. I'm unsure whether the above-mentioned assumptions are correct and what a good solution might be.
How should I structure my base class/classes and my derived classes?
- I originally wrote them such that the item class was the base class and most other classes used single inheritance (except for a couple which had multi-level).
- This seemed to present some awkwardness and repeating myself though. For example, I want a sign and a letter. A sign is a Readable Item > Untakeable Item > Item. A letter is a Readable Item > Takeable Item > Item. Because they all use single inheritance I need two different Readable Items, one that's takeable and one that's not (I know I could just make takeable and untakeable into attributes of the base in this instance and I did but this works as an example because I still have similar issues with other classes).
- That seems icky to me so I took another stab at it and implemented them all using multiple inheritance & virtual inheritance. In my case that seems more flexible because I can compose classes of multiple classes and create a kind of component system for my classes.
- Is one of these ways better than the other? Is there some third way that's better?
ANSWER
Answered 2020-Jun-09 at 09:07One possible way to solve your problem is polymorphism. By using polymorphism you can (for example) have a single describe
function which when invoked leads the item to describe itself to the player. You can do the same for use
, and other common verbs.
Another way is to implement a more advanced input parser, which can recognize objects and pass on the verbs to some (polymorphic) function of the items for themselves to handle. For example each item could have a function returning a list of available verbs, together with a function returning a list of "names" for the items:
QUESTION
Note: This is not a duplicate of AttributeError: type object has no attribute. I am trying to code a text-adventure.
...ANSWER
Answered 2020-Apr-29 at 03:26The problem is in your last 2 lines:
QUESTION
I'm making a text-adventure game called Glaux. This game is an RPG game, but it's on text. my problem is how to show the user 3 classes that he can choose from by typing an option but I don't know how.(code provided below).
...ANSWER
Answered 2020-Jan-04 at 06:36You can do it like that:
You define a method Classes that is doing some weird stuff which I don't know what your intention was but you should change:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install text-adventure
You can use text-adventure like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the text-adventure component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page