Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Java programming RPG?

I am learning Java programming. I will eventually have to write my own, simple and playable text-based RPG. Does anyone out there have the code for a simple, but complete, text-based RPG, so that I could play it and use it as an example? I promise I would not take credit for it as my own, I will write my own, I would just like an example. Thanks in advance

Update:

I was thinking along the lines of "choose a monster to fight" then option of monsters, then choose to attack, defend or heal, etc

2 Answers

Relevance
  • 8 years ago
    Favorite Answer

    You should research with google. There are many youtube tutorials. I, personally, don't like video tuts, but many people have their best learning that way.

    You don't give enough info, but in the Apple II days were RPG games based upon the Command-prompt. The play would go like this...

    > You are in the castle turret room

    > A door leads down the stairs

    > a window looks out over the valley

    > There is a candle and a cat in the room

    > What do you wish to do?

    > 1. take candle

    > 2. take cat

    > 3. exit the door

    > 4. look out the window

    The idea was to accumulate 'magic' points to solve for the reward, a purse full of coins. It takes OOP to make such code manageable. A step above console-games would be 2D graphics, and the ultimate game involves animation. There are several sites dedicated to coding games.

    One teaching tool for java is Alice.org.

    Source(s): // this would be the more advanced games http://www.java-gaming.org/ // alice would get you up and going with graphics with OOP http://en.wikipedia.org/wiki/Alice_%28software%29
  • 5 years ago

    C++ is the right way to go. Make sure you learn the fundamentals first although. Don't go instantly into 2nd photos. And, C++ wants APIs (Add-ons) to work with 2d pix. You could wish to start with SDL, after which move onto OpenGL.

Still have questions? Get your answers by asking now.