I figured out the weird keyboard error in regards to flash
games and WASD controls not working. Turns out it's Comcast's Constant Guard
that messes up keyboards, changes screen resolution, crashes Google Chrome, and
a host of other problems. Now that
that's uninstalled, I quickly added WASD controls back. (You can still use the arrow keys if you
prefer, as well.)
I had thought initially that the problem was a Flash or
Chrome thing, but it was magically something that you would think would be
completely unrelated. If you have Constant Guard, uninstall it
immediately. The Norton product that
comes with it will still be installed and working on your computer.
Beyond that, I spent the majority of the week working on the
inventory system. I knew I wanted the
player to be able to look at their cards, open new booster packs they find,
hold onto cards not in their deck, and swap out cards in their deck. The player can't swap out cards, but the rest
is functional.
As I created the inventory, however, I also came up with an
idea to allow the player to change the rules.
The player will find rule sets that change some conditions, such as max
health, max/min cards in deck, and may also limit what cards the player may use
in their deck (I'll have to revamp the card system to allow another variable or
twelve that limits which cards are allowed with which rules).
At present, there is only one rule set, so it's mostly just
for display at the moment.
There is also functionality for unique quest items, although
I have none to test yet.
One bug is that when you pick up a new booster, the
inventory menu hasn't refreshed to show that you picked one up, so you need to
check your deck to clear the top level inventory menu, then click OK, then the
"New Booster" option will appear.
Currently, if I fix that bug, then a new bug pops up: if you leave the inventory while checking
your deck and then enter back in, you will see the cards you were looking at,
plus the top level inventory menu overlapping.
I figure the refresh bug is a nicer bug to deal with.
Also, I am sure that you can get the booster from the first
NPC an infinite number of times. That'll
be fixed next week.
I find that I spend a lot of time rearranging the code as I
discover it's necessary to do so to implement a feature. Oftentimes, before I can even implement the
feature, I reorder the code, then spend an hour fixing bugs that have appeared
as a result of that. This is definitely
due to the fact that I'm coding on the fly rather than preplanning or engineering
it beforehand. It's a lesson for the
taking.
But I'm enjoying it; I'm learning how to hack things to fit
my desires, even though I'm certainly not programming as the language was
designed. I think it's because I never
got a strong education in object oriented programming; most of my programming
skills come from learning Pascal in high school, and I can't say I was
"taught" any OOP in college, so only traces of the structure and
vocabulary stuck. I understand the
theory behind inheritance, for instance, but the implementation kills me, so I
avoid the headaches that come with it.
I've heard of structures called Singletons, though I never
learned them (they aren't in AS3 anyway), so instead of creating one for the
inventory, I just made static variables, while the overworld and battle systems
act as singletons in function, if not in name.
I also want to design the engine so that the user who wants
to make worlds/levels can edit one file without touching the rest of the code,
so the maps, npcs, enemies, card types, and more are all in one fairly clean file
of variables that can be edited without too much trouble. I bet this is terrible practice, so I may
split them up soon, but hopefully it will remain as user-friendly as I can possibly
make it.
You majored in computer science at your first college and they never taught you OOP? Damn, guess it worked out that you transferred, lol.
ReplyDelete