Also on this subject, I found a very simple and easy way to do a pause option. Just bound the Q key to pausing everything that's going on, and luckily the coding is just as easy as I hoped. It's funny when you take something like pausing as being so simple, but what if you actually had to code that? The engine is checking code "steps" every single frame, so it's not like you can just write a line in every single object saying, "if not paused, do..." I was dreading it being tedious like this, but turns out there's a very simple function for it. Whew... bullet dodged.
As I've been thinking of the pause screen and what it will show on it (I don't want just a simple, game paused, screen. I want an info and option screen) I realized that my current set up with my variables and data wasn't going to work. Each object has its own variables, which all work just great! As I said last post, this game is playable for sure. There's no crippling bugs or crashes, and you can run around a kill the enemies with whatever spells you please. But, I have some big ideas and plans for the way I want this game to work.
I'm not sure if I have mentioned the object lore yet on my blog. If you watch that gameplay video you can see a little green glowing orb that the enemies drop. This will basically be a form of experience for the game. I'm still fleshing out the story line of everything, but lore is an aspect of the game that lets the player customize the gameplay a little bit. I eventually will make a total of six, to perhaps 8 or maybe 10 total spells for the player to use. I don't want to over do and complicate it, but I thought it would be cool if the spells you did use had some options of customization. Here's a side by side video to show you what I mean:
Normal Flame Jet
High-power, high-mana cost Flame Jet
Call it talents, call it specialization, whatever you want, but I think it would be fun for the player to tweak their spells' behavior a little bit. As a player progresses, kills a lot of monsters, and collects a fair amount of lore, there will be the option to unlock these specialized spell options. One might be a larger but slower moving fireball. One might allow gust to be charged for twice as long, but slow you down twice as long. You get the idea. It wouldn't be anything too game changing, but would allow the player to play off of their own strengths. It's a very prototype-esque idea, but I really think it could be useful and enjoyable in the game.
Anyways, this idea has been stewing in my head for some time now, and tonight I finally realized that I needed to delve into global variables. I have used a couple, but I took an hour or two tonight to go through and convert a bunch of variables from local to global. There were quite a few bugs involved, because changing variables this far in is very dangerous (big lack of planning and foresight on my part). Luckily since I'm so familiar with what is happening inside of these scripts, I was able to eventually iron everything out and get the variables lines back up. Now with where I'm at, I can change the basic mechanics of all the spells, as well as the player's max hp, mana, etc. all in one text file. The power of using global variables is quite impressive, and it's making the option of having a full blown lore system quite realistic! I'm really excited to play around with the variables and see what else I can do.
Here's a clip of the bug happening with my ice_speed variable. It's quite fascinating what happens when variables get out of whack :D

No comments:
Post a Comment