March 23rd, 2013
The final update!
Here I am at 5. Pokemon Tactics is as done as it will get today.
You can move your Metagross around, and choose a target for his Psybeam attack. your opponent, Blastoise, will just kind of move around to avoid getting hit. You left click to set a place for Metagross to move, and right click to set somewhere for him to shoot at. The big red circle is the range of your Psybeam attack. You can set a target anywhere, but the Psybeam will travel in a straight line until it dissipates.
I set this up in a way that it will be easy to add new features in the future. As i said before, this will eventually become the boarding action part of ISIS, so a lot of the stuff I made here will make it into ISIS, even if it’s not still Pokemon.
Big thanks to Owen Goss for organizing the Game Jam, and to Innovation Guelph for buying our lunch! Thanks a lot!
March 23rd, 2013
It took longer than expected, but I got attacks working. You can right click to start using your attack in that direction. You’ll keep firing at the spot you right clicked until you choose a new target place. I also added some really simple enemy ai. He just jumps around so he’s not super easy to hit.
Next will be making attacks a little cooler. range limits and better animations.
Check it here.
March 23rd, 2013
Hey folks, just a quick update here before I eat some pizza out of a bowl.
I added movement to Pokemon Tactics. just click anywhere, and your Metagross will move there. if you click on the Blastoise, he’ll target him, but noone knows any moves yet, so no attacks will happen… yet! That’s next.
March 23rd, 2013
I’m here at Guelph Game Jam #5, making a game! What kind of game, you ask? A tactical pokemon game!
I’ve always loved pokemon, but I always found the tactics of the game to be kind of… flat. So, I’m making a simple proof-of concept game where you actually move your pokemon around the field, and the usage of techniques is much more nuanced.
For now though, I just have it drawing a couple pokemon to the screen – no battling yet! It’s running on my ISIS engine, and I plan on making this form the basis of the boarding action part of ISIS. You can see what I’ve got running here.
Welp, back to jamming!
March 10th, 2013
Lately, I’ve been pretty busy. Mainly I’ve been up to 3 things: my Pokemon Playthrough, some tweaks to my main website, and a major refactor of ISIS’ code base.
The Pokemon playthrough has been pretty neat. I’m starting with generation 1 (or at least a remake), and working my way through all generations in preparation for the release of X and Y versions in October. My friend has been strongly suggesting that I start blogging about my pokemon journey. I’ll get that started as soon as I can coax WordPress into running two blogs simultaneously. If you’re at all interested in this, I encourage you to check out the subreddit dedicated to it.
The second thing is some small changes I made to my website. I decided to work on my PHP skills a bit, and produced two changes: one visible, one not. The visible change is the short list of “fun facts” about me that appears under “Michael D. Hoyle, Level 24 Geek”. You will notice that it changes every time you load the page. I made a list of things to put there, and wrote a short script to grab a random list of them every time the page is requested. It always ends in a kind-of long one too, which I think is pretty cool. Originally, I wanted to do this in node.js, but I couldn’t find an easy way to make node.js and Apache play nice together. I need to keep Apache running so I can keep my PHP-based WordPress blog online. Eventually, I’d like to switch to a node.js-based blogging platform, or write my own, but I don’t want to spend the time on that right now.
The invisible change I made to my main page is related to the “Level 24 Geek” subtitle. Now, it dynamically calculates my age to decide what “level” I am. So, on my birthday, it will increment. Cool, eh? Obviously, these changes are trivial in nature, but they were fun to figure out and implement. I lied a bit about this being invisible. It’s just something you’ll have to wait a while to see in action.
The last thing I’ve been up to is a major ISIS refactor. I don’t think there’s a single line of code I haven’t run through the wringer, and I’m really proud of the result. I wont go into all the gritty details here, but I might devote a post or two in the future to what I did. Suffice it to say, it’s much easier to read, and integrates some groovy functional programming concepts. None of the changes are something the user will see, however. I’ll be making that sort of changes again very soon though. If you want to look at the code, you can hop on over to the repo on my github.
February 26th, 2013
This evening I was hacking away on ISIS, as I am wont to do when I’m bored. Right now, I’m in the midst of a pretty big refactor of a lot of my code, as it had gotten a bit messy. The main thing I want to talk about today is how I refactored the update function of my projectile object into something much more cunning.
If you took a look at those files, you would see that the old update method was pretty big and very hard to follow. The way I solved this problem was to break it up. A lot. The idea came to me when I first realized that I had a bunch of distinct cases I was if-ing around – outgoing, in transit, and incoming projectiles. First, I tried just moving these cases out into their own functions, but that ended up just sort of hiding the problem. I needed to think outside the block.
Since these functions would be called repeatedly and predictably until the next one would take over, I realized that I don’t actually need any switching logic here – I can use some kind of state. My solution is a member of the projectile object called currentUpdate, which contains the currently active update function. To replace the switching logic, I added a bit of code at the end of each function checking if the projectile should change state. For instance, if the sprite had left the bounds of the firing ship’s fleet window, it should switch to the in-transit state, and wait around until the bullet has traversed the considerable distance between the fighting ships. These state functions would then return themselves, or the next state function. The update method then became a very simple assignment and invocation to keep track of the state. It’s a textbook case of a state machine.
I still had one problem though, some things only needed to happen once (setting up where the projectile enter’s the target window, for instance). I considered putting them in the relevant state functions, but I would have to if around them, which is exactly what I was trying to avoid. To solve this, I wrote a couple of transition functions. Instead of returning the next state function directly, a function that has decided it’s done operating would invoke a transition function, which would set the object up for the next state and return the next state function.
This ended up working like a dream. I already had most of the work logic figured out, so it was really just a pure refactor. I spent maybe 10 minutes debugging it, and even then the only bugs were a few keying errors. I probably added some lines of code, but I feel like the result is much easier to read. I also managed to eliminate a few members of the projectile object itself, since it doesn’t really need to keep track of it’s state explicitly anymore. I expect that this pattern is more efficient, but I’m not 100% sure of that. I can’t think of a reason why it would be less efficient, but I haven’t spent much time analyzing it’s architecture.
So what do you think of this solution? Is it cool? Is it beautiful? Let me know. I’d love to hear from you.
 The ranges at which ships in ISIS will be engaging each other are quite literally astronomical. Since there’s no atmosphere to slow down and degrade projectiles, they’re going to be moving an appreciable fraction of the speed of light, which means you can pretty accurately hit a target really, really far away. Right now, I’m thinking the gun fights will be somewhere in the neighborhood of one light-second, which is a bit less than the distance between Earth and The Moon.
January 22nd, 2013
As you may have noticed, I changed my website again! My friend wcarss made a new design for his site and I just loved it, so I mercilessly stole it. Thanks a lot to him for permission to use his design!
January 20th, 2013
Quick heads-up on the progress of ISIS.
Health bars and hit feedback are in! The hit feedback turned out to be a bit difficult to do, since I had to add a couple new “classes” to the system. Next is animations for ships getting hit and blowing up, then I’ll make the projectile animations nicer. After that it’s AI and some interface polishing and the first version of ISIS will be complete! It won’t be fun, but it’ll be playable!
On another note, I discovered an INCREDIBLE way to make steak. I made it last night for dinner, and I simply cannot put into words how amazing it was. I highly, highly recommend trying it if you have the equipment for it. Thank me later.
January 18th, 2013
Just a quick post tonight, folks. I worked on ISIS a bunch again. It was mostly just some refactors and re-engineering, but I made the projectiles more modular and object-oriented. There’s still a bunch of work I want to do on them, but I’m pretty happy with what I have now. It’s probably smoother animation now too.
After the projectiles have been finished, Next will be some textual feedback on whether a shot hit or missed. Then health bars on the ships, then explosion and impact animations. It’s almost playable!
I also moved my currently in-development code to a different directory, so if i break my working copy it won’t go down on the main link. This way I don’t have to spend way too long making sure it works before I stop working.
I also made the github repo public so anyone can look at the code. I’m not 100% sure if anyone else can push to it, but if you can, please don’t! I’d rather not have to roll back changes I didn’t make.
Oh! one more thing. My site has a favicon now! I made a purple sigma, since I like sigmas and I like purple. I think it’s quite “me”, but I’m sure that I’ll be replacing it before long with something prettier.
January 9th, 2013
Today, I had an audition for a play. I didn’t go. Not because I forgot, or because I decided to not do the play, but because I was bit by the hacker bug! I was listening to This Developer’s Life again, and I just *had* to write some code tonight. And oh I did! (for those who care, there are more auditions tomorrow, which I will go to.)
So what did I do to ISIS? Animations! Well, just attacking animations. Nothing really flashy, just some projectiles, but they collide with the target if they hit, and fly past if they miss. Cool, eh?
You should go look at it!