Thursday, March 20, 2014

I'm still here!

Just wanted to say that I'm still around.  Things got a little crazy for a while.  I was pretty sick for a while and out of commission.

I've been feeling a lot better and getting back into the swing of things.

In the course that I am taking, one of my homework assignments was to add features to a text based RPG game, where the source of the base game was pretty much given as an introduction to classes.

The basic RPG asks you to pick a class, and gives you the option to move in four directions (it keeps track of your position using coordinates), rest, view your character's stats, or quit the game.  If you move, There is a chance you will be attacked by one of several types of enemies, from weak goblins to very strong orc lords.

Some of the features I was asked to implement were easy.  I had to add character classes and races into the game, and give bonuses and different stats to each.  One other thing they had me to was to add a chance of being attacked while resting.  This one was especially easy, but for some reason I was stumped for a while.  It turned out I was making things a lot more complicated than they really were, and when I figured out what I was doing wrong it took about 2 minutes to implement this.

I was pretty confused about passing pointers and references into functions, which was covered in the previous chapter, and while working on the assignments I had some ideas about things I could add in, but was having trouble doing what I wanted, and got a little frustrated.  Eventually I gave up on the assignments and moved on to the next chapter..  Progress was slow, though, because I felt bad about not finishing the assignments.

So finally, I've begun working on that game again.  So far, I've added a store, that will be randomly assigned to a set of coordinates from ([-5 - 5], [ -5, 5]), so that every game the store will be located in a different place, but won't be super hard to get to.  In addition, I've added a "check map" option to the main game menu, so it's easy to figure out where the store is.

I've also added a message and a new menu that comes up when you enter the store, and disabled the ability to be attacked when you're on the coordinate the store occupies.

The next step is to add inventory to the store in the form of weapons, armor, and potions.  Then I'll need to add the methods that will allow you to purchase and use the items in the store.  I think I'm going to hard code items into the store that will be available, but I'm also considering upgrades for weapons and armor instead of actual new items.  I feel like that will make it easier to keep progressing in the game after a few levels.

After I'm done with that, the last assignment I have is to make it possible to be attacked by more than one enemy at a time.  This one sounds tricky, and I'm sure I'm going to have to work at getting that one right.  I'm looking forward to getting this project out of the way.  Once it's done and working, I'll have something to be proud of.  It'll be a real morale booster!

I'll update this blog after a little more progress.

2 comments:

  1. Replies
    1. Thanks! There's still a lot of work to do. I can't wait until I can do more than just the console. It will be a lot easier to come up with ideas.

      Delete