Jump to content
  • Advertisement
Sign in to follow this  
hothead

random text battle screen

This topic is 5042 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!