Home > Game Development > New Features

New Features

Ok, so I recently added quite a bit of new features to my game. Here they are:

  • I downloaded the SDK(Studio Development Kit), allowing me to add color to my text and use some nifty functions, particularly the Sleep() function, which basically stops the execution of any more code for a given amount of time. Now that I was able to color my text, I created a welcome/intro page, that just displays some ASCII graphics, the programmer(me), and the IDE used to develop the game. For example, my welcome page will be displayed for 10 seconds, then the screen will be cleared and the menu will be brought up. Here’s my welcome page:

  • I added a new attribute to every character in the game – the player and the enemies – Evasiveness. Along with this, I added a new step in the combat function: hit-chance. Now, before executing an attack, there is a hit check, which is simply a random number modified by the characters Evasiveness. This allows for misses to happen, which is a necessity in any game with combat.
  • I added a new attribute to the characters in the game – Gold. Upon creation, each character was given a random amout of gold. At the end of combat, if the player wins, then the gold that was on the monster they just killed is then taken from the monster and given to the player. To handle this action of gold transfer, I added a member function to the Player class that would take a Monster in its parameter, and then exchange the gold. Although this is set up, I currently don’t have a use for Gold in the game. Soon to come!
  • I also added round information to be displayed, so rather than entering combat and instantly have the winner’s name displayed, you enter combat and each rounds information is displayed…instantly. This was pretty annoying, since in order to track the fight you had to scroll up to the top of the DOS window and read down all the lines. Not only that, but there was no suspense since the winner was instantly announced. This is what I needed the Sleep() function for; to display the rounds information, then Sleep() for 2 seconds, clear the screen and display the next rounds information.So, after getting that to work, I colored the output, giving it a little flare, and making it easier to see who hit who for how much. Now with the combination of Sleep(), which adds suspense and provides some entertainment, and colored output, combat has been given a major upgrade!

Here it is in action(due to PrintScreen, I wasn’t able to get multiple shots of the same battle, so these are from several battles):

  • I’ve also done minor work, like wrapping the user prompts while in the menus within loops to only accept an appropriate input. For instance, when the user is asked whether or not they want to keep their randomly generated stats, which is a yes or no question, they could enter in anything other than “yes” or “y” and new stats would be generated. For some, this wouldn’t be a problem, but I had put a limit on the amount of times the user could re-roll their stats, but this limit would only count for the amount of times they entered in “yes” or “y.” So they could only re-roll for stats 5 times via the “yes” or “y,” but they could re-roll for stats infinitely by entering any other input. So to solve this I wrapped the prompt in an infinite loop, with the only exit to be an appropriate response to the question. This forced to the player to only re-roll for stats 5 times by entering “yes,” and any other input was ignored. I also added this same feature to several other prompts throughout the game.
Categories: Game Development Tags:
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: