Re: Wizard v1.0
by Limbic~Region (Chancellor) on Sep 22, 2002 at 17:12 UTC
|
I am not sure if you had issues when you cut and pasted the code, but some things are missing:
print "The goblins have been zapped into toads!\n";
$gold=$gold+3;
"good job you got 3 gold!\n";
&freedale
There is no print statement in front of the "good job you got 3 gold!\n"; You do not use warnings or strict, and you didn't chomp $name.
If you do not mind, I would like to use your code as a base, and then build it up myself. I am not an RPG type of guy, but I think this would be a great excersise in developing my Perl skills because it is a large scope project. A couple of ideas that came to mind such as storing the information into a database if someone wanted to save their game. /msg me if it is ok.
UPDATE
I am not condeming you for the mistakes. The critism is/was meant to be contructive. I really like the game and think it is a very worthy project.
Limbic~Region | [reply] [d/l] |
|
Hey its fine by me if you use this code I don't mind although I would like to see what you do because I'd like to see the ways you modify it. I was actually thinking of posting the code on the web so all perl programmers can see it and modify it.
| [reply] |
|
| [reply] |
Re: Wizard v1.0
by barrd (Canon) on Sep 22, 2002 at 16:53 UTC
|
Just a quick note, you need an error trapping routine in the shop sub to ensure people don't type anything other than 1..3, and maybe add a "leave shop, don't buy anything" option. Oh, and the ubiquitous "use strict;" & warnings should be added ;)
Update: minor modified code: see my scratchpad, not meaning to tread on Limbic~Region's toes but I've fixed a couple of immediate problems and given you some clues as to furthering your code with a couple of minor error traps in the same style that you wrote the original programme. I had a tad of free time so had some fun as you suggested. I would have fixed other areas but time is fleeting... Thanks for posting it, I did have fun :-)
P.S. Limbic~Region will do a much better job I'm sure. :-) | [reply] [d/l] |
Re: Wizard v1.0
by katgirl (Hermit) on Sep 23, 2002 at 10:40 UTC
|
Your first line: #!usr/bin/perl -w
should be: #!/usr/bin/perl -w
I was trying to convert this thing so that it can print to a web page, and it took me nearly an hour to work out where the 500 error was coming from :) I'll paste the code when I've finished... I've always wanted a text adventure on my site, didn't know where to start!
UPDATE: http://www.queenfans.com/games/ogre_battle/wizard.cgi
I think it needs a lot more work though! | [reply] [d/l] [select] |
|
I LOVE IT!!!!!!! Could I please take a look at the source. I think that is awsome, I'd like to post it on my site if it is okay with you /msg me next time we are both on.
| [reply] |
Re: Wizard v1.0
by Mr. Muskrat (Canon) on Sep 23, 2002 at 17:05 UTC
|
Perhaps change Merlin to merlyn. ;) With his permission of course.
Also you should run the text to be displayed through a spellchecker.
| [reply] |
Re: Wizard v1.0
by xCodexWarriorx (Acolyte) on Sep 04, 2004 at 05:12 UTC
|
I've written a few Text-Based RPGs, but they were in C...haven't tried such a thing in Perl yet, so take my advice with a grain of salt.
One thing you may want to look into is some OO stuff. It's really nice to take out the abstractions of rooms, players, and enemies...that kind of thing can help a lot.
You also may want to look into using something like the d20 Open Source game engine to base your combat on...this would obviously be way over the scope of this game, but maybe just take some elements from it to base things off of. One of the hardest things about making games is balance. Making sure it's not too hard or easy is difficult (how ironic!), and basing your work off of an established system may help. | [reply] |
Re: Wizard v1.0
by void_Anthony() (Acolyte) on May 05, 2005 at 20:00 UTC
|
I have complete revised some of the additions to my code and the game itself. I have added a new area called the "Shadow Plane", which contains a different kind of monster called the demon. They are more numerous than goblins and are 6 hp stronger, but they give 6 gold when defeat them. You must have a magic level of 3 in order to travel there. I like the idea because it gives a player a quick 5-minute goal to reach :). To see the final version, refer to my scratchpad. I have added a catch all to make sure the program doesn't just die when someone enters something besides a specified number (at least in "freedale" anyway), but I can't figure out how to account for someone pushing enter without entering anything. Any suggestions would be helpful.
P.S. - I have also added a cheat sub (so I could quickly access Shadow Plane and do some testing) but I like the idea so I'm keeping it there.
please forgive the code errors that you find in the modified code. im only an initiate here at the forums and a novice at perl | [reply] |
Re: Wizard v1.0
by void_Anthony() (Acolyte) on May 05, 2005 at 23:13 UTC
|
With your permission Legolas, I would like to make these modifications (and maybe a few more debugging ones) and release Wizard v1.1. The new level, enemy, and error handling provides more variety to the game. I could possibly continue to add to (including enemies, spells(one that would only hurt the enemy but have a higher success rate), and areas) the game. Get back to me when you have time. | [reply] |
|
legolas hasn't been logged in for 28 weeks (as of this post). It may be awhile before he gets back to you.
| [reply] |
|
Because of this minor setback, Wizardv1.1 has already been released giving legolas credit for the original code.
| [reply] |