Exilian

Game Design and Project Resources: The Workshops Quarter => Computer Game Development - The Indie Alley => Topic started by: Tom on May 28, 2013, 02:24:56 PM

Title: My python text based game
Post by: Tom on May 28, 2013, 02:24:56 PM
Hi guys, I recently decided to try and pick up a programming language and after browsing the forum I decided to learn python.
Anyway, I made a text based game where you have to try and get out of a dungeon alive. It's really basic and probably really clumsily done but I wanted to make it all random so it is, the combat is done randomly and so is almost everything else.
If you want to take a look at it the files are below. You will need python 3.2 or later, just place all of the files in the same folder and run dungeontrudger.py to play. Tell me any bugs and also any much needed improvements (I am sure there will be many).
So yeah, that's it really. Please give me some feedback on it if you can, I plan on using pygame to develop the concept further in the future.
Thanks, Tom  :D
Title: Re: My first python game :/
Post by: Jubal on May 28, 2013, 04:22:32 PM
I enjoyed it! Certainly a lot better than my early attempts at Python stuff.  :)

The only "bug" per se is that it'd be good if you fixed it so you at least have to choose a or b or c or whatever (the fact that you can currently hit enter or select "apple sandwiches" with no different effects kind of dispels even the illusion that you're actually choosing between paths). Using an "else" statement that says "you can't do that!" or similar and boots you back to the choice would probably be an idea.

Main features on my wish list from a few games:
- An option to see my stats, progress level, etc. This could be done kind of along with the above bugfix.
- Healing potions or food or something as a possibility in chests

More generally, maybe an option to run from enemies that gives -2 to your progress through the dungeon but at least doesn't mean you die so easily? Making the combat more interesting should possibly be the next thing to look into.

Hope to see future versions of it, it's most definitely a neat starting point.  :)
Title: Re: My first python game :/
Post by: Tom on May 28, 2013, 04:31:44 PM
Thanks for the quick reply, I'm out at the moment but when I get home i will try to implement your.ideas, I also want tto add some sort of XP system and different looter. This is the longest program I've ever written so it may take me a while to sort through the mess I've made of the program. V2 with improvements will definitely be up at the end of the week with improvements :) - Tom (I typed this on my phone so please excuse stupid errors in grammar)
Title: Re: My first python game :/
Post by: Tom on May 29, 2013, 11:12:38 AM
Okay, here is version 2.0 with:
A mechanism to try and keep you following instructions (it will hopefully be a fun little surprise ;)),
Potions de la health,
An xp system that I haven't implemented properly and is currently just hanging around doing nothing,
More choices in combat which actually work (but if you don't type a, b or c it will just proceed like you just pressed enter)
More  choices with the loots
Potion drinking and a longer dungeon (it loops 25 times now XD) but with the health potions it is possible to make it out alive (just)
I should be getting on with some revision now so I will leave this with you. You will need python 3.2 or higher to run this, just click on the dungeontrudger.py file to open it and get started. I would recommend removing all files of previous versions from your computer before you try and play because otherwise the program will get confused about which files to import.
That's it, I think it is now a lot better, hope you guys do too - Tom :)
P.S. Please excuse my horrendous programming skills and liberal use of copy and paste :)
Title: Re: My first python game :/
Post by: Tom on January 20, 2014, 04:21:15 PM
Okay, so I've been gone a very long time but I dug this up and I wanted to get back in to Python. This is a complete re-write of my dungeon crawler. It has one or two bugs but I'm at a loss for the minute about fixing them. It needs the most recent python to run and has got quite a lot more depth. I'm sorry for necroposting but I thought I should re use my own thread rather than start a new one nobody wants to look at.

To run the game just unzip it all in to one folder and run the RUNTHIS.py file.

I've been away for a while so in reality there is not much advancement at all but meh.

If anyone can be asked to take a look it would be really appreciated, thanks.

Quick note, if anyone is going to play this, obey all commands if possible unless you're ready for a boss fight.
Title: Re: My first python game :/
Post by: Jubal on January 20, 2014, 04:43:11 PM
Ooh, welcome back! Good to see you again. :)

I'm writing an essay currently but will have a play later this evening and post again on thoughts/ideas.
Title: Re: My first python game :)
Post by: comrade_general on January 20, 2014, 04:46:43 PM
New title. ^
Title: Re: Slightly remaid python test based game
Post by: Tom on January 20, 2014, 05:27:43 PM
Thanks, on the weekend coming up I will be able to troubleshoot it a little bit and try to iron out the bugs but tbh i'm probably going to start over.
Title: Re: Slightly remade python test based game
Post by: comrade_general on January 20, 2014, 05:34:11 PM
Oh, I didn't mean for you to change your title, I was just saying I changed your unsure face to a smiley face on my post. :)
Title: Re: Slightly remade python test based game
Post by: Tom on January 20, 2014, 05:45:24 PM
Oh ok thanks, i'm still unsure about it all though :/   :D
Quick note, if anyone is going to play this, obey all commands if possible unless you're ready for a boss fight.
Title: Re: My python text based game
Post by: Jubal on January 20, 2014, 07:10:00 PM
Well, I fairly rapidly accidentally hit enter at the wrong time, the manticore killed me, and now I'm dead, but still fighting the manticore somehow...  :P

EDIT: so I opted to +health after my corpse killed the manticore, which seemed to restore me to life somehow. And then I fought another couple of battles, then the game crashed when I tried to search the surrounding area after killing a giant rat.
Title: Re: My python text based game
Post by: Tom on January 20, 2014, 08:24:10 PM
Oh man that sounds like a lot went wrong none of that has happened to me before :/ oh well I'm going to make one from scratch, that used far too many recycled parts from my old one, thanks for giving it a go, the feedback is really useful. Its sounds like I've got some issues with my if and while loops ir maybe just the way I coded the game. I'm hopefully going to learn from my mistakes and make something based on dust :).

Thanks again Jubal I know its a waste of your time but I really appreciate your help.
Title: Re: My python text based game
Post by: Jubal on January 20, 2014, 10:00:10 PM
Not at all a waste of time, It's fun and I really like these sorts of games :) Reminds me that I should get back to work on Adventures of Soros again...
Title: Re: My python text based game
Post by: comrade_general on January 21, 2014, 01:56:27 AM
I died after throwing thermal pods. :)

Spoiler (click to show/hide)
Title: Re: My python text based game
Post by: Tom on January 21, 2014, 06:45:51 AM
Thanks jubal and cg, I think I should add that in to my next attempt as an Easter egg for you :) I'm probably going to go for a more story based game next time :) I'm going to remove the attachment if I can to save myself from the buggy hell that is my game :P
Title: Re: My python text based game
Post by: Othko97 on January 21, 2014, 07:44:31 AM
Hey, at least you actually developed something :P I'm still trying to stop procrastinating and finish a zombie game...
Title: Re: My python text based game
Post by: Tom on January 21, 2014, 02:10:53 PM
Is that the text based one? It sounds like a really nice idea, go for it :). I'm going to start work on a new text based game but take my time on it, I made the buggy one in a couple of weeks if not less, hopefully if I take more time on it it will be a lot less buggy and more fun to play. I've found that a lot of a text based game is if and while loops which seem to descend infinitely if you don't break it up in to seperate modules :). Good luck anyway, I bet it will be good.
Title: Re: My python text based game
Post by: Jubal on January 21, 2014, 04:37:16 PM
(http://i.imgur.com/uD5GKZ2.jpg)

:D
Title: Re: My python text based game
Post by: Tom on January 21, 2014, 04:59:21 PM
I'm going to grace that with a proper answer when I get home :D
Title: Re: My python text based game
Post by: Jubal on January 22, 2014, 09:06:45 AM
I love the avatar :D
Title: Re: My python text based game
Post by: Tom on January 22, 2014, 09:18:37 AM
Thanks man I would've replicated the whole meme if I could be bothered. :)
I wonder if I could do some illustrations for my game in text?
Title: Re: My python text based game
Post by: Jubal on January 22, 2014, 06:58:56 PM
Do it! There must be loads of easily copypastable ASCII art around on the web...
Title: Re: My python text based game
Post by: comrade_general on January 22, 2014, 07:05:55 PM
Then we could see exactly what a thermal pod looks like! :)
Title: Re: My python text based game
Post by: Tom on January 22, 2014, 08:30:26 PM
I'm going to give some of it a shot I'm trying to get mobs and stuff working before any storyline/quests/locations though so it may take me a while and I'm not the most artistic.  :D
Title: Re: My python text based game
Post by: Tom on January 23, 2014, 09:38:10 PM
Don't worry it's sorted  :D