Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 28 Sep 2011
Offline Last Active Jan 03 2012 09:15 PM

#4885552 Text Based RPG help

Posted by on 19 November 2011 - 03:11 AM

Hurry up!!! :angry:

Just, kidding, man. :D

Never did say I dig your ASCII art! Pulpfist explained to me how to set my window size in my C# text-based RPG. You may wish to consider doing the same at some point. That way, your ASCII art is certain to display correctly. On my screen, the top is cut off.

Also, just a single line giving us play-testers a simple objective or goal to focus on would be helpful -- a quest, that is (I know you're working on "real" quest right now, this is just something for the play-testers to do right off the bat). That way, when we reach the goal, we know we've tested everything you would like. Something like, "Go from the store to the dungeon."

An overall game loop that will keep the game from closing would be nice. That way, when you die, it goes back to the title screen. The player could (Q)uit from there.

Getting to the store is hard freaking work! :D I made it to level 2! Yay for me! A "level up" message at some point in development would be nice; just saying.

I've not made it to the dungeon yet. The spell seems to do less damage than my weapon (a long sword, at the time, but I bought a scimitar). I know it's not time to balance the game out, but I'd suggest having spells with limited uses do twice both the minimum and maximum damage of your unlimited melee attack. I think the rule of thumb for a generic RPG was to have spells cast-able about five times, but I can't remember.

When I first got to the store, I didn't have enough money to buy anything. But, since I was already in that menu with no way out, I tried to buy the cheapest thing. The game crashed. Maybe have 0 go back to the shop's main menu?

When you exit the store, you have no way of going back in without chancing the dangers of leaving 2,3 -- you probably already knew that, though. Just saying.

Well, on level 2 with a shiny new scimitar, I'm off to brave the wilderness on my quest to the dungeon! Wish me luck!

EDIT: Made it to the dungeon and level 3! :D

Do you think you could add numbered grid spaces to your map? Something like this (whitespace will be messed up in code tag; see pastebin link):

	cout << endl;
    	string a = "  	0   	1   	2   	3   	4"; cout << a << endl;
	string b = "  /---------------------------------------\\"; cout << b << endl;
	string c = "  |   	|   	|   	|   	|   	|"; cout << c << endl;
	string d = "2 |   	|   	|   	|   	|   	|"; cout << d << endl;
    	stirng e = "  |---------------------------------------|"; cout << e << endl;
	string f = "  |   	|   	| STORE |   	|   	|"; cout << f << endl;
	string g = "3 |   	|   	|   *   |   	|   	|"; cout << g << endl;
	string h = "  |---------------------------------------|"; cout << h << endl;
	string i = "  |                                   	|"; cout << i << endl;
	string j = "  |                                   	|"; cout << j << endl;
	string k = "  | 	dungeon                       	|"; cout << k << endl;
	string l = "  | 	*                             	|"; cout << l << endl;
	string m = "  |                                   	|"; cout << m << endl;
	string n = "  \\---------------------------------------/"; cout << n << endl;


#4877316 Seeking Beginner Advice for Text-Only Dungeon Game in C# and Python

Posted by on 26 October 2011 - 01:48 PM

Version 0.102611.01 -- I've began to open up the weapons and armor shop! :D Only thing on sale is leather armor, though. Here's the new version's code: http://pastebin.com/1gPNQcFb

Once I get that done or at least more so, I'll open up the healer's and the inn so the player can recover from wounds and keep fighting.

Then, more monsters! :)

That will fun-up my game a little more for my friends who are on my back to see progress. Then, I'll go back to working on the combat mechanic. The biggest thing that needs done right off the bat is allowing the target of attacks to defend. Right now, the attacker only has to roll equal to or less than his attack skill to hit. The target should be able to block with a shield, parry with a weapon, or dodge out of the way. Only failing in their defense does the target take damage.

I don't think I'm going to get to code much today, though. Have to go do "stuff."

Beginner stuff?!?! O_o Well i guess what i've been learning is really, really basic. I did notice that you changed languages, but i didn't know it was C#.

I see you've made a lot of progress! Congratz! This project looks like it's going somewhere. I hope that i could move to C# or Java after learning Python. After i do my own projects in Python of course! :)

Welp, you have to start somewhere!

Honestly, if you go through that beginner Python tutorial we've been talking about, you'll know as much in Python as I know in C#.

If you check my sig, you'll see I've been programming now for two days shy of one month. You can use that as a benchmark. :)

Now -- get to coding!!! I want to see a simple, playable number or word game in Python out of you by Monday, Ace!!! :angry:



public Character(string name, int strength, int dexterity, int intelligence, int health, int maxHitPoints, int hitPoints, int weaponSkill,
            int armor, int gold, float speed, float swingDamageType, float thrustDamageType, bool alive)

Description of constructor parameters incorrect
 		static void Main(string[] args) //The Main function.
            // Create instances of the Character class:
            // (string name, int strength, int dexterity, int intelligence, int health, int maxHitPoints, int hitPoints, int speed, int weaponSkill, int armor, float speed, bool alive)
            Character player = new Character("", 0, 0, 0, 0, 0, 0, 0, 0, 0, 0F, 1.5F,2F, true);
            Character goblin = new Character("the goblin", 10, 13, 9, 12, 10, 10, 14, 1, 250, 6.25F, 1.5F, 2F, true);
            Character orc = new Character("the orc", 12, 11, 8, 12, 12, 12, 13, 2, 500, 5.75F, 1.5F, 2F, true);

Your 'player' Character is assigned a ThrustHitType of 2F instead of the 1.5F you are looking for. The order of the constructor arguments changed and you are assigning 'speed' to 'thrustDamageType. I believe that your damage function is working properly.

Oh, impaling damage is x 2. Sorry. I just meant x 1.5 (cutting damage) as an example. I should have been clear on that. My bad. :unsure:

I don't know, man. I must have done my multiplication wrong. :rolleyes:

Thanks so much for going over my code like that, though! I really, really appreciate it. It makes me feel "safer" having someone look closely at what I'm doing. If you think that my function is working properly, we'll call it good for now and that's a load off my poor little mind.

Thanks again! :)

#4876940 Building simple battle system

Posted by on 25 October 2011 - 04:09 PM

Here is a reply I made in another thread:

When I made games with RPG Maker, a front-end for Ruby, the generic advice for non-boss monsters was that you should kill all appropriate monsters in about five hits and all appropriate monsters you fight should kill you in about five hits. That means if you're fighting a "weak" monster, it won't take as many hits to kill it, but if you're fighting a "strong" monster -- i.e., one on a "higher level" than your character is ready to face -- it will take more hits to kill and chances are, it'll kill your character in fewer hits too.

Another generic piece of advice was to have a 20% range above and below base-damage and chance-to-hit stats. So, if your base damage is 100, that means the attack will do between 80 and 120 points of damage, if my math is correct. :wink:

One last piece of generic, standard advice was to have weapons raise the character's base damage by half. So, if his Strength stat (or whatever you use to determine base damage) is 100, a magic sword of normal power level would add 50 to that stat, making his base damage 150.

That's all assuming you're going to have a character that "levels up," or becomes categorically more powerful as your game progresses as classical, console-style RPGs do.

Have you never played Dungeons and Dragons, though? Pretty well all of D&D's stuff is OGL and can be accessed here: http://www.d20srd.org/

That's basically a complete character generation system, combat engine and compendium of monsters with which almost all sword-and-sorcery players are already familiar.

If you haven't, I doubt you'll want to learn an entire pencil-and-paper RPG system just to make a game, but...

#4873616 Seeking Beginner Advice for Text-Only Dungeon Game in C# and Python

Posted by on 17 October 2011 - 02:23 PM

Oh, oh wow, pulpfist. You've really outdone yourself. This... this is enlightening to say the least. I don't have time to read and comment on it now, but just on first glance I've learned a lot. Thanks so, so very much for poring so much time and effort into my betterment!

I hope you two guys don't get burned out trying to help me. I know I'm a slow learner and am rather dim witted. My strong grasp of the English language and expansive vocabulary can obscure that fact, but the truth remains that I was in LD classes all throughout school, that I dropped out of high school (to work full time, but I was failing all my classes anyway), and that I couldn't even get a 'C' in any college class I attended including programming.Yes, I'm creative in a flighty and imaginative way, and I'm a fish out of water in the classroom environment, but the truth of the matter is I'm a poor student because I'm not all that bright.

I'm not saying that to ingratiate myself. I say that so everyone may know that I'm not ignoring, disregarding or disagreeing with anything anyone says on here; I just sometimes cannot articulate my lack of understanding even when information is presented to me plainly. Add to that the fact that I often try to do this while beyond sleepy and that I can not do in hours what I can do in minutes otherwise, and I can see trying to help me as being highly frustrating.

So, thanks again for sticking with me! I really appreciate it! :)

EDIT: Wait, pulpfist, you had C# code showing me static variables in your post before, didn't you? Was there a problem with it?You quoted me saying I was beginning OOP, and you said, "fair enough."

EDIT x2: I'm printing your game and taking it with me to study. :)

#4873139 Seeking Beginner Advice for Text-Only Dungeon Game in C# and Python

Posted by on 16 October 2011 - 10:15 AM

Wow. I got it to work in like, less than one minute today. Sleepiness was destroying me last night. :lol: My already weak brain was just not capable of doing the work no matter how hard it tried. "The body is weak, but the mind is willing!"

Thanks for once again setting me on the correct path, VH! I knew I wasn't using that "ref" business correctly.

Please take a look, anyone interested, at my UseHealingPotion function up at the top, and my "U" case for using it down at the bottom. I still need to make the function check to see if the player has a healing potion and if so, take one from his inventory -- and I still need to incorporate a maximum value for hit points. Also, I'll make the amount it heals random. The function as it is now is as simple as I could make it for testing purposes because I only have about 45 minutes before I have to leave, and I still have to shower!

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
	class Program
    	static int UseHealPotion(int number2) //number1 = heroHealingPotions, number2 = heroHitPoints.
        	Console.WriteLine("\nYou drink a healing potion!");
        	int healing = number2 + 20;
        	return healing;

    	static void Main(string[] args)
        	Random rand; // Declaring the Random class and giving it the name "rand."
        	rand = new Random(); //Making a new instance of the Random class.

        	string name, choice, attackOrDefend;
        	int heroHitPoints, monsterHitPoints;
        	int heroAttack, monsterAttack;
        	int heroDefense, monsterDefense;
        	int heroDamage, monsterDamage;
        	int heroSpeed, monsterSpeed;
        	int heroHealingPotions;
        	int roll;

        	heroHitPoints = 100;
        	heroAttack = 1;
        	heroDefense = 10;
        	heroDamage = 0;
        	heroSpeed = 10;
        	heroHealingPotions = 1;

        	monsterHitPoints = 80 + rand.Next(0, 20);
        	monsterAttack = 1;
        	monsterDefense = 10;
        	monsterDamage = 0;
        	monsterSpeed = 8 + rand.Next(1, 3);

        	Console.WriteLine("Debug information: \n");
        	int[] initiative = { heroSpeed, monsterSpeed };
        	foreach (int i in initiative)

        	// Begin game:

   ___________ __            	_____                          	
   \__	___/|  |__   ____ 	/  _  \_______   ____   ____ _____  
 ╔═══|	|═══|  |  \_/ __ \═══/  /_\  \_  __ \_/ __ \ /	\\__  \════╗
 ║   |	|   |   Y  \  ___/  /	|	\  | \/\  ___/|   |  \/ __ \_  ║
 ║   |____|   |___|  /\___  > \____|__  /__|	\___  >___|  (____  /  ║

                        	...IF YOU DARE!

                  	The Arena by Richard D. Sharpe
                        	version 0.101611.1");

        	Console.WriteLine("What is your name?\n");
        	name = Console.ReadLine();
        	Console.WriteLine("Greetings, {0}. \n\nDo you want to fight the goblin? (Y/N)\n", name);
        	choice = Console.ReadLine();

        	if (choice == "Y") //"Y" = Fight!
║ Hit Points:  	{0}
║ Healing Potions: {1}
╚══════════════════════╝", heroHitPoints, heroHealingPotions);

                	Console.WriteLine("(A)ttack, (D)efend, or (U)se Healing Potion?\n");
                	attackOrDefend = Console.ReadLine();
                	switch (attackOrDefend)
                    	case "A":
                        	Console.WriteLine("\nYou attack!");
                        	roll = heroAttack + rand.Next(1, 20);
                        	Console.WriteLine("\nDebug: {0} \n", roll);
                        	if (roll >= monsterDefense)
                            	roll = heroDamage + rand.Next(1, 12);
                            	Console.WriteLine("\nThe monster loses {0} hit points!\n", roll);
                            	monsterHitPoints = monsterHitPoints - roll;
                            	Console.WriteLine("You miss!\n");

                        	Console.WriteLine("\nThe monster attacks!");
                        	roll = monsterAttack + rand.Next(1, 20);
                        	Console.WriteLine("\nDebug: {0} \n", roll);
                        	if (roll >= heroDefense)
                            	roll = monsterDamage + rand.Next(1, 8);
                            	Console.WriteLine("\nYou lose {0} hit points!\n", roll);
                            	heroHitPoints = heroHitPoints - roll;
                            	Console.WriteLine("The monster misses!\n");

                    	case "D":
                        	Console.WriteLine("\nYou defend!");
                    	case "U":
                        	int heal = UseHealPotion(heroHitPoints);
                        	heroHitPoints = heal;
                        	Console.WriteLine("\nNot a valid choice!");

            	} while (heroHitPoints > 0 && monsterHitPoints > 0);

            	if (heroHitPoints > 0)
                	Console.WriteLine("\nYou won! \n\nGAME OVER");
                	Console.WriteLine("\nYou died! \n\nGAME OVER");
        	else //"N"
            	Console.WriteLine("\nCoward! \n\nGAME OVER");


Now to figure out how to get a function to return two numbers...

#4872620 Help with jumping

Posted by on 14 October 2011 - 12:20 PM

Let me just say that as a beginner who has been graced with generous amounts of help here on GameDev.net, please don't let this spoiled child "DrNicholas" and his horrible attitude and disgusting sense of entitlement ruin it for the rest of us who are truly grateful for this community's openness and kindness to new members.

I've seen communities wherein the members get battered down over the years by whiny, unappreciative moronic children like Nicholas. Members begin to think, "Why help this person? Look at the way the last one acted!" They slowly become more and more closed to new members until the moderators and the old guard are so spiteful and elitist they become worse than the trolls.

Beernutts, JustinDaniel, Cornstalks, Serapth and others who have offered advice, your skill and willingness to help is greatly appreciated -- if not by Nicholas, who is probably too young to realize his shameful behavior, then by many others for whom you have so graciously donated your time and efforts to help.

Thanks, guys!


#4872194 Python game - Hangman

Posted by on 13 October 2011 - 07:29 AM

I'm a programming newbie. But, I thought I'd add some non-programming advice.

When you start the program, you're confronted with some funny-looking symbols an a command line: "input." The user isn't even told they are playing hangman. You might say something like, print "Welcome to Hangman! Guess a letter. You have X wrong guesses. If you guess all the letters in the word before your guesses run out, you win!"

Also, were you looking for ASCII art? Here is a very simple hangman (the white space will display incorrectly):

|/	 |
|	(_)
|	/|\
|	 |
|	/ \

When we were kids, you had seven guesses, one for each letter of hangman. We'd draw the rope/noose, head, body, left arm, right arm, left leg, right leg and write each letter of hangman under the gallows for each wrong guess.

#4871102 Seeking Beginner Advice for Text-Only Dungeon Game in C# and Python

Posted by on 10 October 2011 - 09:55 AM

Please, VH, don't be offended. You've helped me so very much and you've always been spot on with all the advice you've given me. I couldn't have gotten this far without you and pulpfist. Well, I may possibly have eventually gotten this far, but it would have taken me much, much longer with way more frustration and who knows if I would have been doing things "right" in the end.

But, I am worried about this aspect of developing in Python.

I'm not the only one:


I've been concerned about this fact since before I chose Python over C#. Until last night, I didn't even know how to pronounce C#. I had been reading it as "see pound." Then, I got curious if that was the correct pronunciation, and I found that it's actually called "see sharp." That's pretty novel for someone who shares the same last name!

Real quick, I looked at a tutorial just out of curiosity. I found that due to my experience in Python, I was able to better understand C#'s syntax...

You may see where this is going...

I downloaded MS Visual Studio C# Express 2010 and made a "Hello, world!" program. :unsure:

I feel like I just admitted I cheated on my girlfriend.

What I liked was that when I hit F5, there was my .exe ready for the vast majority of computer users to simply double click to run.

I'm not saying I'm dumping Python. I'm just saying we might have entered an open relationship where we see other people use other languages.

From a complete beginner's standpoint, I've learned so much and came so far with Python. It's really close to my heart. I've had a lot of fun with it and that's the main() thing. Also, I've learned how to think like a programmer better. I understand the basic concept of object oriented programming. I've learned how to learn programming better. If it weren't for the simplicity of Python, I don't think I would have tried to do so. While I couldn't have got this far without tutorials and your guys, I don't think I could have learned a different language without first going through Python.

I'm going to explore C# just a little bit. Maybe I'll quickly find that I'd rather come back to the simplicity of Python. Maybe I'll find that C# is the one for me. Who knows unless I try?

This isn't the end of this thread. I still want very much to work with pulpfist's code above and see where that will take me. But, for now, I'm taking a detour in another direction. It might be just a short one, though! Heck, I expect to know by the end of today or tomorrow if I want to continue working with C# now, or continue further with Python.

Thanks again to everyone for all your help so far. :)

#4870734 Seeking Beginner Advice for Text-Only Dungeon Game in C# and Python

Posted by on 09 October 2011 - 04:23 AM

Good luck, and happy hacking. :) You've let yourself in for years of fun and frustration. :)

Thanks! :)

I haven't done a lot of game programming in python but I believe pygame has all you need for this...

...including sound. I can only imagine the sound of that snoring Ogre Posted Image

I'll sleep beside a tape recorder tonight! :lol:

#4870061 Seeking Beginner Advice for Text-Only Dungeon Game in C# and Python

Posted by on 07 October 2011 - 05:03 AM

I should say that you really want to read up on the basics like lists, dictionaries, loops, functions and classes before you dig too deep into the game. It won't take you that long as python is easy to learn, and you will enjoy it a lot more.

That said, I do get exited by the prospect of text-based dungeons. Throwing all the boilerplate of graphics and animations aside and focus on story is so cool.
You will soon realize that your game world is a grid of locations, and that such a location is perfectly modeled by a class, and that those locations can be connected to each other, and that you can set up a loop that will allow your player to move around in that world by simple commands. Attacking monsters at will Posted Image

Thanks for your help again, and thanks for your encouragement, too!

I've read up on dictionaries and I must say they are truly a powerful tool. I think I'll try and implement them next. With dictionaries under my belt, I'll have completed the beginner tutorial I've been referencing. Not saying I won't still be a beginner, because I most certainly and absolutely will. But, it will be a landmark achievement for me.

I'm pretty sure I'll complete this project as it is an updated version of a story game titled Zuul's Tower I wrote from the beginning of 2008 to the very end of 2009.

I wholeheartedly agree that for some people, the mental images inspired by writing can be much more profound than even the most stunning computer graphics. The human imagination is more powerful than any video game ever produced!

Zuul's Tower was a solo quest (no game master) was for use with a complex pencil-and-paper RPG system quite unlike Dungeons and Dragons. It consisted of several hundred numbered entries like those found in the Lonewolf game books. It was much more like a paper computer program than a "choose your own adventure." It used a ton of variables and if/else statements.

I wrote it in Notepad. It was roughly 40 pages long type written (10-font monospace), if I remember correctly.

At one time, I had nearly a dozen play testers. Almost half of them constantly updated me for more than a year via e-mail with play-throughs, error reports, suggestions and requests.

I never published it. :rolleyes:

For old time's sake, I got it out and looked it over. Here are some random excerpts:

1. Zuul's tower looms before you, its high crenellations haloed by a sinister crimson moon. Dark thunderheads swirl above, their cyclonic eye focused on the tower's pinnacle. Lightning flashes inside those hellish clouds, whipping the howling wind with thunder-cracking lashes. The ancient, foreboding tower appears long-abandoned; no light of torch or fire flickers within the high window slits of its crown. There is a short set of dilapidated stairs leading up from the barren ground to a small, square landing. The landing rests beneath a half-open set of double doors on the south wall. Like a row of dragon's fangs suspended from a gaping maw, the portcullis is raised so that only its black, spear-like tips show above the doors' arching threshold. If you want to climb the stairs and enter through the doors go to [2] if this is your first time entering the tower; [22] otherwise. To scale the 150-foot tall tower's wall to its roof, go to [3]. If you want to seek another entrance, go to [87].

7. This must be the great hall -- a huge rectangular room with a high ceiling supported by more than a dozen massive pillars. Sleeping near a small, flickering bonfire in the large, round hearth at the room's center, an ogre snores loudly. His mountainous paunch, covered by a bearskin blanket, rises and falls with each deep breath. Shadows dance across the hideous features of his pig-like face. One hand rests on the handle of a wickedly-spiked mace; the other is curled around a big ceramic jug. There are two doors on the south wall: a large set of double doors in the center and a smaller wooden door to the west of them. There is also a door on the north wall. To approach the ogre, go to [29]. To search the room, go to [17]. To enter the door to the north, go to [38]. If the GEM is RED, the set of double doors in the center of the south wall is barricaded. You may lift the barricade off and pass through it with a successful roll to remain silent (Stealth, spell, etc.). If you do so silently, the GEM becomes WHITE; go to [22]. If you fail the roll to do so silently, the GEM becomes WHITE; go to [18]. To take the other door to the south, go to [59].

8. Suddenly, the doors swing open revealing a huge, roaring ogre wielding a wickedly-spiked mace! In his other hand, the massive ogre clutches a lit torch, the firelight from which gleams in his fierce red eyes and casts frightening shadows across his hideous, scowling, pig-like face. So enormous is the fat, brutish monster that he fills the entire threshold. In some harsh, guttural dialect, the nine-foot-tall giant booms a quick threat or insult. If you wish to engage the ogre, go to [141]. If you wish to use an Influence skill, roll against the skill you wish to use now and then go to [11]. If you wish to Evade the ogre and run past him to the north, go to [14]. If you wish to retreat, go to [26].

47. An overpowering stench of death and decay surges forth when you first enter this long, north-south hall. Even more terrible than the smell is its source: a horrifying walking corpse shambling towards you, arms outstretched, head cocked to one side resting on its shoulder, black, worm-ridden tongue lolled out through a hole in the side of its rotten cheek. Its pupil-less eyes, sunk deep into their sockets, are a sickening off-white. What few teeth are left in its gaping maw are blackened and jagged. No sight of this insult-to-life is spared your eyes; the hideous monster is completely nude. Part of its lower ribcage protrudes from the hole in its belly where it looks as if a scavenger or rodent ate out most of its innards. Maggots, fat from the decaying flesh, fester and writhe in every rotten hole.


82. Loathing and sorrow stain this heinous chamber; unheard screams of intense agony and excruciating, prolonged pain echo in your imagination upon seeing the torture rack leaning at an angle against the south wall. How many victims' joints had been dislocated upon that horrible wooden frame? How many had suffered their muscles stretched to permanent separation? How many heard their own cartilage, ligaments and bones popping and cracking loudly as they snapped? How many limbs were completely pulled from their body? Other instruments of torture are arranged about the room including a rough wooden table near the center of the room caked with black, crusted blood. No doubt, it has seen and heard unimaginably gruesome horrors. A large knife (treat as Cheap Quality), an iron hook, and a pair on pinchers lay on the table. There is a door on the east wall. To take it, go to [84].

155. Though this chamber is cluttered and packed with oddities, it also contains an extensive -- if highly disorganized -- library. Columns of books stacked waist high stand in piles around the room. Shelves twice a man's height are filled with long rows of ancient tomes and dust-covered texts. 
There are a number of small chests and large trunks in this room. Some have heavy padlocks hanging from their latches. 


Unlit candles are everywhere; some stand in tarnished candelabras, others hang in plain iron chandeliers -- and a few sit atop human skulls. It is a grizzly sight: tall, slender, white candles spiked in the center of what was once a living man or woman's head. Long wax trails run down the skulls' sides like hair. Several of such desecrations serve as grim decorations. 

Scrawled on the floor in what appears to be black, crusted blood is a large pentagram; a star shape with the points of its five intersecting lines contained within the perimeter of a circle. A skulls topped with a black candle sits at each of its five points. In the center of the circle is a dark scorch as if a beacon fire was lit there. However, there is no ash. 

Then, you find what might be the most gruesome, sadistic sight of all. Suspended by a heavy chain from the ceiling hangs a large, cylindrical cage made of rusted iron bars. Beneath the cage is a rack for firewood. Inside the cage is a charred and blackened skeleton -- a child's skeleton. It's painfully obvious that the child was slowly roasted alive.


And so forth. :) It was more dark fantasy than horror, but it dealt a lot with necromancy and undead -- Zuul is a powerful sorcerer and undead knight of demonic evil.

Anyways, off to code another version of my dummy program! :)

#4869268 I'm designing an RPG game (With graphics) in Python and pygame

Posted by on 05 October 2011 - 12:16 AM

I am using GIMP as of now. It's not really very friendly as a fat bit editor which is more optimized for pixel and tile based graphics, which is what I really want. But there seems no fat bit editors in Linux.

I am using the zoom feature in GIMP at around 800% to 1000% to draw the smaller tiles.

The biggest problem with GIMP is that there seems no way to display "Tile boundaries". It is a pain to count pixels on screen.

Would it help if you set your grid (Image>Configure Grid then View>Show Grid) to your tile size?

#4868099 I'm designing an RPG game (With graphics) in Python and pygame

Posted by on 01 October 2011 - 04:33 PM

Awesome! Wow! You're on your way to accomplishing a long-term goal of mine: to make an old-school, console-style 2D RPG.

I don't really have any advice -- I'm way behind you in experience -- just wanted to give some well-deserved encouragement.

What is the game's genre, background story and goal? Normally, RPG's are medieval fantasy, but this appears to be contemporary fantasy.

#4867978 Seeking Beginner Advice for Text-Only Dungeon Game in C# and Python

Posted by on 01 October 2011 - 08:32 AM

Greetings and thanks for taking the time to read my first post here on GameDev.net.

Straight to the point: I'm 30 years old and have no programming experience other than basic HTML in notepad back in the late-90's, early-2000's. I'm seeking to make a Rogue-like single player dungeon exploration game. I'm much less concerned about implementing 2D graphics than I am about making my own turn-based combat engine and random dungeon room generator. The first version of the game could be text-only or ASCII.

I've ran part way through one online tutorial for Python and have enjoyed the experience so far.

In reply to the question posed in the FAQ: "[Do] you want to make games or learn to program," the answer is that I want to learn to program. I thoroughly enjoyed programming in either C++, C, or C# -- whatever programming class it was that I took in school some 10 years ago and never used again -- just as I enjoyed coding basic Web pages back in the day. I don't recall anything I learned from the class other than that I couldn't stand re-making the same business/accounting programs again that we made in all the other languages, such as Visual Basic. Instead, I used the text book to help me figure out how to use the random number generator to make a gladiator-like text-only game. Once I started going off in my own direction, the class became excruciatingly tedious in its slow pace and focus on repetition.

Now, I didn't come lightly to the conclusion that I wanted to program rather than just make games. Some time ago, I started making simple games with RPG Maker VX, which is a front end for a form of Ruby. Long story short, I felt confined by it. I didn't want to learn Ruby just to make games with RPG Maker. Instead, I decided I wanted to learn to program using a language that would support my designs in the long term. So, I chose Python.

To be honest, though, I actually am the type of person who rarely finishes what he starts. I have a short attention span. I'm not very intelligent and math is my weakest subject. I'm unmotivated and I procrastinate. I am more of the creative type, which, as I understand it, is the opposite of the type who do well at programming.

But, I digress.

Programming is fun, in my opinion, so even if I quit before finishing a full-fledged game -- as I probably will -- I'll have fun while I learn and work on my project.

Enough about boring ol' me and on to my request for advice.

So far, after a quick Google search, I learned that the following code will allow my game to generate random numbers in Python 2.7.2:

from random import randint
a = randint (0,0)

So, with that knowledge in mind, I made my first "game" (please don't laugh):

loop = 1

while loop != 0:
	print "Guess a number between 1 and 10 or guess 0 to end program."

	number = input()

	from random import randint
	target = randint (1,10)

	if number <= 0:
    	print "End of line."
    	loop = 0

	if number == target:
    	print "You guessed correctly!"

    	print "You guessed wrong. The correct number was", target

Even as simple as that is, I'm sure it's full of problems or aspects that that can be improved.

I've not yet learned anything about functions or classes; I made it half way through the Loop section of the tutorial I'm following.

After I make it through the tutorial, I would like to learn:

  • How to go about the process of making a save file for a game;
  • How to make my game in Python, but save it so that it can be played on a Windows-based PC;
  • How I should go about structuring a simple text-only dungeon game with monsters and rooms and treasure;
  • How I should go about coding a Rogue-like random dungeon room generator.
To save my little game above, I tried using py2exe but my understanding of Python isn't great enough yet to be able to follow the instructions. This is the part I had trouble with:

Importing setup and py2exe to setup.py and call setup() function with the name of entry point script as argument. Now it is time to run the script and create the executable. To build the executable, run "python setup.py py2exe" on the command prompt. You can see lots of output on the console. In the end you can see the output as in the picture below.

As I didn't try very hard, I'll probably figure it out myself. For that matter, I've not searched for an answer to my first question either, and the third and fourth are too advanced for me to tackle right now.

However, for the random dungeon generation, for now, I'm considering a text-only game where the size of the room isn't important; it's abstract.

Instead, I am considering a five-by-five-room (or larger) dungeon grid something like this:

-- -- -- -- --
| 1| 2| 2| 2| 3|
 -- -- -- -- --
| 4| 5| 5| 5| 6|
 -- -- -- -- --
| 4| 5| 5| 5| 6|
 -- -- -- -- --
| 4| 5| 5| 5| 6|
 -- -- -- -- --
| 7| 8| 8| 8| 9|
 -- -- -- -- --

1 = May have doors going right and down.
2 = May have doors going left, down, right.
3 = May have doors going left and down.
4 = May have doors going up, right, and down.
5 = May have doors going in all directions. 
6 = May have doors going up, left, and down.
7 = May have doors going up and right.
8 = May have doors going left, up, and right.
9 = May have doors going left and up.

Not all of the rooms should to be accessible, but there must be a path from the entrance to the exit. I guess I should have the game first decide how many rooms there are, then what the path of doors is from the entrance to the exit (up, left, left, left, down, etc), and lastly have it branch off any other possible rooms from existing rooms with doors. I dunno.

After the game decides where the entrance and exits are and what rooms exist, it populates the rooms with doors, monsters, treasure, traps, etc.

I have a long and detailed plan for the game, but here is neither the time nor the place...

Well, thanks again for taking the time to read this. It was really more of an introduction post than a search for advice or answers, but if you feel like giving a complete newbie some help, know that it will be appreciated!