# 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 on other sites
Mushu    1396
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       WeatherHills      Grass        RainyMountain   Trees        CloudyPlains     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!