Share your repls and programming experiences

← Back to all posts
(OUTDATED, KNOWN BUG) I made a text rpg "engine", and here is a little "game" to demo it...
eidhernan (38)

Updated version:

It works, but I'm kinda annoyed with the backend side of things. You can copy my code if you want, but it's a slight mess. The only thing I'm proud of is the function, the cmenu() function, and so on. Oh, and the whole saving and loading thing, as well as the base.

I guess it isn't that bad, it just needs a tad bit of cleanup

The indent() function was supposed to indent text, but it doesn't do that, because it is ugly... I was going to remove it, but I ended up just rewriting it so it just returned whatever was passed into it.

I'm not proud of the backend code, and I'm not so fond of my state machine tactic, but it's better than using GOTO statements (euhhhh).

For the best experience, fork this, it will allow for saving. This was kind of rushed... haha

RomeroSchwarz (265)

Might have a little bug with the menu.

eidhernan (38)

@RomeroSchwarz That's on your side. Don't change the size of the console while in a menu, only change the size of it while in a regular "print" state, it's a limitation.

JacksonSmith2 (6)

It happened to me too, and I haven't changed anything. :/ @eidhernan

eidhernan (38)

@RomeroSchwarz It's a problem with whatever your terminal emulator is. I managed to reproduce it by replacing the getLocation() method for the cursor, with a 0. Whatever is happening, it is as a result of the cursor get method failing.

I don't know why this would happen, most likely it is as a result of slow internet. I'm going to replace the method

RomeroSchwarz (265)

@eidhernan Slow internet definitely would do it. I was at school at the time and the wifi there is slower than a paraplegic tortoise.

eidhernan (38)

@RomeroSchwarz Don't worry about it, many other had the same issue. I'm rewriting the engine, it's gonna have proper documentation too.

eidhernan (38)

@GageCase Don't worry, it's a known bug that is (hopefully) going to be fixed in the next version

GageCase (0)

@eidhernan Lol ok, still it's a lot better than i could do

VJPM (0)

Very well done. I hope I can get to this level someday.

nt998302 (132)

This is sick. How did you do it?

eidhernan (38)

@nt998302 I'll make a public release of the engine soon, with good documentation

NathanielCoble (0)

Best text-based RPG in python that I've seen. And this is just the engine!

eidhernan (38)

@NathanielCoble ikr... I think I'm gonna make an open source engine like this, but one that is much more user friendly.

AlphaWarhead (5)

This is a really interesting game, I hope you continue working on it

AJSullivan (2)

This was a little bit fun, but it supersized me when it ended so soon.