Table of Contents

I wrote this to improve my programming skills. There are a few things in C++ that I hadn't used since college so I thought I should really work on that. Hopefully it will be helpful to someone else. An image of serial output has been included near the bottom. Down at the very bottom are ideas for expanding the program should you choose to do so.

I will not do a step by step breakdown as the documentation and inline commenting pretty much does this already. The program should be fairly easy to read through.

This is a fairly basic demo of:

class inheritance

polymorphism

Also (partially) included is a template function.

If you are very new to C++ this may very well be a little over your head, but if you have played around with it a bit and would like to learn about these topics I hope this will be very easy for you to follow and understand.

This is a fairly simple game. It is nothing special but it is intended to be something you can work forward from and make into something better. Hook up your mbed, use TeraTerm (or some terminal program) to communicate and you should see the game (after compile). It is a very simple Action RPG (lol). Everything happens automatically in this initial version and there is no user input at all.

So, you've read through this junk gagging through my idiot sense of humor all the while and now you want to modify the program and add to it until it is the most awesome game ever to be on the mbed? Cool! I think you should go for it.

If that's true but you aren't quite sure where to go from here then keep reading for an extra few seconds (or minutes depending on how slow/fast you read).

Ideas for expansion of this program:

Really, playing a game in terminal isn't ideal. Consider any sort of external display/interface device (LCD, OLED, LED matrix, motorcycle engines and pulleys hooked up to punch you in the face when you lose, whatever you can think of).

Health bars are nicer than numbers (although you can draw numbers over or by the bars)

Events! Create yet another base class for events, and again create derived classes this time for your events. There could be traps (roll for traps), bonus events (meaning good things like health refills or extra crit chance), etc.

More than one enemy at a time. Final Fantasy style combat anyone?

Again with the FF gameplay, AI teammates.

Improvements to xp and health/armour calculations (lets be honest, I didn't put a lot of effort into them).

More xp for enemy's higher than your level, and less for enemy's lower than your level.

User input! Obviously that's a no brainer.

Dialog options (chat with the enemy...annoy the enemy).

Anything

Seriously, anything. If you can think it up, go ahead and throw it in.

Important Information for this Arm website

This site uses cookies to store information on your computer.
By continuing to use our site, you consent to our cookies.
If you are not happy with the use of these cookies, please review our
Cookie Policy
to learn how they can be disabled.
By disabling cookies, some features of the site will not work.