Share your repls and programming experiences

← Back to all posts
[GAME] Python Text RPG (Fun Adventure!)
h
RayhanADev (1967)

A neat little Python Text RPG heavily based (like literally using lines from the characters) on Shakespeare works, mainly Hamlet! I coded this one to be reminiscent of older types of RPG’s, and personally it’s my best work in Python to date (of course with a bit of help from my teacher creating the game engine!). Enjoy!

Presenting... Python Text RPG (based off Hamlet)

Commands

Like I mentioned, this is based off older RPG style games (Zork, CCA, etc.) so you have to enter commands like so:

Look Directions:
n or north ~ Look North
e or east ~ Look East
s or south ~ Look South
w or west ~ Look West

Inventory:
take ~ Take an item and place in inventory
items ~ List items in inventory

Movement:
enter or to ~ Go to an area (Ex. enter door or walk to courtyard)

Other:
talk ~ Talk to an NPC for information
search ~ Attempt to find an object
trade ~ Trade an item (Ex. banana for boat)
kill ~ Bring death to something
hint ~ Gives a hint about where to go (Ex. something like DOOR and then you’d type enter door or the likes)

Save:
save ~ Saves your location (Please note that I don’t know how this will act of Repl.it, but if you download the game to play on your computer it will save fine)

Thoughts, Comments, or Just Hello?

Drop a comment, and if you enjoy this game feel free to say so! Should I make a Part 2? Enjoy!

Please note there is very minor cursing because I tried to keep this as close to Shakespeare as possible.

Comments
hotnewtop
potatostomatos (302)

so... ray

CAN

python
good job :)

RayhanADev (1967)

@potatostomatos don’t get your hopes up too high. This was the most advanced Python project I’ve ever made in my 5ish years of coding.

potatostomatos (302)

@RayhanADev pauses

just one little question:


what?

RayhanADev (1967)

@potatostomatos ah, well lemme explain how these older rpg-style games work. You have to specify what to do (the first command is enter castle or walk to castle. If you get stuck, type in hint! All the commands are in the post and the README.md! Still confuzzled?

RayhanADev (1967)

@firedragondnd lmao, it’s an older-style rpg game. You basically look n, e, s, or w and walk to the thing you see. There is a bug I have to fix tho. Tell me if anything I said makes sense xd.

ThisUserTaken (237)

PLEASE STOP USING PRESENTING.... IN THE BEGINNING OF EVERY PROJECT. ITS GETTING EVEN MORE ON MY NERVES THAN THE DANCING FURRET kewl.

[deleted]

Noice, loved the story

[deleted]

BTW today is opposite day @RayhanADev

[deleted]

oof pause opposite day let me explain... so if today was oppise day and i said good that means good is bad is good so it isn't bad or good understand so it would be good is bad is good is bad is good is bad continues infinity @RayhanADev

[deleted]

ok here...Opposite Day refers to a game usually played by children. One can declare that today is Opposite Day (sometimes retroactively) to indicate something which will be said, or has just been said should be understood opposite to its original meaning (similar to the practice of crossed fingers to automatically nullify promises).

The game has also been compared to a children's "philosophy course."[1]

The date Opposite Day occurs upon differs with who one asks. Some sources refer to it as lying on January 25th each year, while others insist on its occurrence every month, on the 25th of that month. To highlight the topic's disputed claims, it would be wise to mention that still others assert that the date(s) of Opposite Day ly on the last day of the month. [2]

Self-referential paradox
An extreme over-analysis of this concept would conclude that Opposite day causes a self-referential paradox. In theory, the statement "it is opposite day", if uttered on opposite day, should mean "it is not opposite day". However, the statement "it is not opposite day" also does not clearly communicate the meaning of "it is opposite day", since it must first be communicated that it is opposite day before the statement can be interpreted this way. Therefore, there is no unambiguous way to communicate that the current day is opposite day. However, this issue can be rectified by acknowledging that when the statement "it is Opposite Day" is made, it is exempt from the normal system of reversal as its purpose is to inform others of Opposite Day, and to be better at [email protected]

realTronsi (913)

At least you didn't nest a bunch of if statements

RayhanADev (1967)

@realTronsi yeah, I hate that in Python. Me and teach made an rpg engine lmao!

RayhanADev (1967)

@realTronsi obtw do programmers like C++ 11?

realTronsi (913)

@RayhanADev wdym by

obtw do programmers like C++ 11?

RayhanADev (1967)

@realTronsi well how there is Python and Python2.7. Do C++ Devs like the current version or 11?

realTronsi (913)

@RayhanADev I'm not a C++ guy as you can probably tell from my profile, but you should be fine using the latest version, although you can use older version to learn the basics. Just beware some may not have support for the latest version yet, but it's kind of like Python where you can technically learn either and you should be fine. Take my word as a grain of salt though, ask C++ people like DynamicSquid and Coder100

JKE010 (23)

I don't know if it's just me, but an error occurs when I press run.

RayhanADev (1967)

@JKE010 hmm, try it again. I was messing with something it should work though!

RayhanADev (1967)

@JKE010 sweet! Play it a bit and tell me what you think?

JKE010 (23)

@RayhanADev Sure, just give me some time. I have to finish a couple other assignments first.

JKE010 (23)

@RayhanADev It's hard, but fun! Still haven't beat it. When I enter a place, how do I exit? Ex. I entered the church, but when I wanted to leave, "exit" cancelled the game and "enter courtyard" didn't work.

RayhanADev (1967)

@JKE010 I won’t tell you but try hint to get a hint!

RayhanADev (1967)

@JKE010 I love that you enjoy it!

JKE010 (23)

@RayhanADev That's strange. I used enter courtyard earlier and it didn't work, and I used it now and it works. I probably misspelled it or something. Thanks!

JKE010 (23)

Also, this is a bit random, but do you have any ideas of what I should do as my first actual project on repl? All these complicated RPGs and Among Us programs have got me overwhelmed and confused, LOL. @RayhanADev

RayhanADev (1967)

@JKE010 lol so I assume you use Python, try making a basic RPG or terminal test/quiz game. Something like that?

JKE010 (23)

Hm yeah, that could work. Thanks! @RayhanADev

DynamicSquid (4636)
<?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?><?>

Huh, that's a really interesting story you have there

lol xD

RayhanADev (1967)

@DynamicSquid ahhh darn what happen lmao? Was it the save because it works fine for me?

RayhanADev (1967)

@DynamicSquid is C++ v11 prefered over the latest C++?

DynamicSquid (4636)

@RayhanADev In my opinion, C++11 is old, C++14 is okay, C++17 is good, and C++20 is still experimental. So try to use the latest version of C++ if you can

RayhanADev (1967)

Let me know if you finish the game!

conkon300 (3)

@RayhanADev How do you get past the three caskets though?

RayhanADev (1967)

@conkon300 omg you actually got that far!! GG and I won’t tell you what to do but try hint to get a hint! Thanks for playing the game xD.

conkon300 (3)

@RayhanADev I tried hint so many times, I keep on getting you can't do this thing or something like that though!

conkon300 (3)

@RayhanADev Wait a minute, do we have to trade with the guy?
because when I try trade, it says you can perform trade here!