Sign in to follow this  

random text battle screen

Recommended Posts

I wanted to make text-based rpg when I finish my book what i wanted to know is how you make the battlefeild and also how to make you get in a battle randomly.

Share this post

Link to post
Share on other sites
When you say "text based", are you looking for ASCII graphics or no pictures at all - just text?

If you want ASCII graphics, usually one draws them on a bitmap, then converts it to ASCII characters with a conversion program (the gradient would look something like #@&%*"' or whatever you want). Sometimes color is included as well (depends how good your console skills are).

If you want no graphics (REAL text-based) then battlefields can be randomly generated by using lists of adjective phrases, then randomly choosing one from each group. ie:

Type Plants Weather
Hills Grass Rainy
Mountain Trees Cloudy
Plains Bare Earth So sunny you can't see straight!

Then you can randomly choose one from each category to make a descriptive phrase: (hills, trees, sunny):

Monsters attack from behind hills! Only scattered trees provide shelter from the shining sun!

As for how to decide when the random battles occur, just have it check every 2 steps (or something) to see (randomly) if one occurs. That way you can adjust the frequency of battle however.

Or you can base it on time, say in rand() * x seconds a battle will occur.

Play with it. That's the great thing about making your own game - you can do it HOWEVER you like... you are restricted by nothing (excepting your boss [wink]). So play with it and use what suits you best!

Good Luck!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this