Gone to Code

I’m still slowly chipping away at the isometric engine, and I’ve made a couple more changes to the Japan level after watching someone else play. I think I’m going to implement some sort of difficulty setting, which should make the game more fun for everyone, though it will take a lot of work to get it started.
I don’t have any new uploads yet, but I wanted to draw everyone’s attention to this video from Code.org, which is a nonprofit group dedicated to trying to bring programming classes to every school in America. I remember discussing with someone once how much differently programmers see the world- I remember distinctly watching my first hockey game, and in the back of my mind I was trying to design an AI behavior that would emulate what the players were doing. While fishing one day, I was looking at the surface of the water, and wondering how I’d go about implementing a 3D Ripple/particle engine in QBASIC.
After all the military uselessness I’ve endured, I feel like I owe it to myself to do something in life that I’ll actually enjoy, and I’ve been working towards becoming a math teacher. I love teaching, training, and explaining, and math fascinates me. In my high school, the programming teachers were always some other sort of teacher primarily, who also had a collateral job with programming, and so I never really thought that I could just BE a programming teacher. I’ve been toying with the idea- for a few months now- about trying to get some sort of basic computer science degree along with my math education degree and teacher licensing, so hopefully I can land myself in a similar position.
To teach programming- wouldn’t that be an amazing sort of experience?
Anyways, this video- it’s a really well-done little PSA-style thing with interviews from a lot of the computer giants- Mark Zuckerberg, Bill Gates, Gabe Newell, etc.

Also, check out some of those offices, man. How incredible would it be to work there?!

In Which Nicholas Learns About Pathfinding

I’ve always been pretty aware of pathfinding. A*, that’s a thing, right? And there’s some Russian dude with an unpronounceable name that starts with D? I’ve never really needed true pathfinding; if I made an AI who needed to get from point A to B, he’d use some sort of “randomly pick left or right” or just “follow the player” sort of method. I have a textbook called AI Game Programming Wisdom, which has never really offered up much wisdom as it has inspiration for ideas. It has multiple chapters on pathfinding, and every single one of them has to do with A*. I recognize A* as being the “best in the field,” but I’ve never really known for sure how it works. I’ve never needed to, really.
But a few days ago, I started working on code that would allow the player to click on a location in the isometric map, and the character would walk there. You know, like all the other old isometric games. Or any point-and-click adventure game. It obviously wasn’t that hard; people had been doing it literally for decades. Except it was. What made it worse was the fact that I’d “homebrewed” my own isometric engine; it didn’t really recognize that you could travel straight north and not deviate east or west- as far as it was concerned, you only went up, down, left, and right. And if you were traveling straight north, you were going up and over to the left, which confused the bejeebus out any sort of click-to-walk code I attempted. I realized after a while that I was going to HAVE to use some sort of pathfinding algorithm.
The textbook I have doesn’t do a very good job explaining A*; it assumes you already know what it is. All the forums for GarageGames (the makers of Torque) kept touting a resource that had been released 6 years ago that added A* functionality, but it didn’t apply to what I’m using right now. The more and more I read, the more I realized that A* was just too complicated for what I wanted to do. Dijkstra’s Algorithm was the precursor to A*, published in 1959 –1959!– and seemed far more suitable to my needs (and isn’t Russian, it turns out). I spent another couple days trying to find a good explanation of it in pseudocode, and it was finally the wikipedia page (of all places) that clicked with me. In not more than a couple of hours, I had a fully-functional click-to-walk code. The only problems is has is if the path it needs to take wanders too far off the screen; the algorithm essentially can’t “see” where he needs to go, and it calls it a null path (that is, a little red click-y target). So far, I can only find one place where that even applies, and you really have to go out of your way to click in the right spot to make it happen. Plus, I feel like that’s a pretty intuitive problem- just get closer to where you want to go first.

The isometric engine aside, I commissioned some artwork for the final boss in the Japan Dream level, so it’s a lot easier to see what’s happening throughout the boss fight now. It looks pretty good, especially just for prototyping graphics, and it’s courtesy of Lucas Onky of Puffergames. I found his portfolio in the TIGForums and he was an absolute pleasure to work with.
I also made it so the mouse can select menu options, since I saw so many playtesters trying to do that. I still need to update the “View Controls” thing to show the spacebar as jump, but aside from that (and graphics, of course) the level is pretty much finished.
The isometric level takes a while to load, but that’s because it’s generating all its geometry information at runtime instead of loading it from a file. Once I have the level design completed, I can save it and then load it whenever I like, cutting the level-loading time down by a huge chunk, but it needs to be done in-game for now. Just bear with me; it’ll get better.

Orthometric / Isographic

After watching someone else play through the main game, I felt compelled to make some more changes:
1) The dialogue that shows up after you (unsuccessfully) hit the Ronin-phase 1 with the katana 5 times wasn’t happening. I fixed that, and changed it so you only have to hit him 3 times, instead of the 5 from before
2) When I changed the way melee weapons worked, I made it so you can effectively make a “pitchfork umbrella,” thus avoiding any damage from the ronin. That’s weird, and it shouldn’t happen, so I fixed it. Meanwhile, “pitchfork umbrella” will be added to the list of amusingly-named bugs I’ve encountered, along with “rocket ladders.”
3) The mini-boss will show that he’s vulnerable during the jump by flashing the notice-me!-color as he flies from wall to wall (maybe the inside of his cloak/wrap thing). But the point that was brought up is that it’ll be the player’s first encounter with the color, and might not know to pay attention to it. So I added a switch to the first guard tower that heads over the bridge; you’ll have to hit the switch to open the door, and the switches will have that color also, helping to reinforce that the color means “hit me with a sword!”
4) Some people weren’t even noticing that the player blinks after he’s been damaged, signifying the short period of time he’s invulnerable after a hit. I tried to change it so he flashes white instead of just on-off, but the best I could get was a weird blending-mode thing with a copy of his sprite that stays in front of him. Because of this, I’m sort of expecting issues with it. When you play, look for animation issues with the player’s sprite!
5) During phase 2 of the ronin fight, if you stay away from the walls, you’ll never see him run into one and stun himself, which means you won’t be aware that there even is such a thing as him being stunned, which means you’ll probably die wondering “Why can’t I hit him with the katana?” I changed the battle so the Ronin just walls from wall to wall, hoping to catch you in his charge. This made it a little easier than I was hoping for, so to compensate, I added another fire-guard, but decreased both of their firing rates. Play through this part a couple times, if you will, and let me know if it’s too unbalanced.
6) I’d been waffling for a while about making the “climb up a ladder” button separate from the “jump” button. I was trying to avoid adding an extra key, but it was pointed out to me that the space bar, or shift, or some other second key just feels more natural. So now the “w” and “up” keys are only for ladders, the spacebar makes you jump.
7) I’ve seen a few people now try to click the menu options, and that’s not something that can be done (not yet, anyways. Maybe someday.) So I hid the mouse cursor any time the menu is up. However, I’ve noticed some weird issues where if the menu comes up because the window lost focus, the mouse cursor doesn’t come back when you resume, and you have to bring the menu back again to make it happen. Still looking in to it.
8) I also spent forever working on a new swirly “I died and now the screen is turning black” bit, instead of just the radial fade-to-black thing that happened before. It needs more frames; it looks a little stuttery, but I guess if I hadn’t said anything, you’d’ve just assumed that it was supposed to look like that and was kind of artsy. I dunno; like all the other graphics in the game, it won’t be sticking around. But this has helped me create a framework so that I can add any animation I want there, instead of relying on black blocks that converged on the player like before.

Also, you’ll see that I’ve updated the “waking” isometric download as well. The layout is complete, the isometric tile-filling function works, and I’m currently in the middle of adding the actual game functions. You can walk into your apartment, but it’s pretty bare right now. The walls turn translucent when you walk in front of them, but not the buildings, and I think I’m going to leave it that way.
Also, some of the buildings have some weird clipping issues where they sometimes show up in front of or behind the player when they’re not supposed to- that’s just laziness on my part. I need to split them up into separate images and control which ones appear on top when. That’s just not at the top of my priority list right now.
I need to make a map function, so you can press a key and see where everything is. I need to start adding little wandering NPCs and a way to talk to them. I need to make it so you can interact with objects, such as your phone, the library, etc.

Torque 2D just released the newest build of their engine, and I find myself unsure as to whether or not I want to convert.
Pros: It comes with built-in isometric support, as opposed to the bastardized thing I had to whip together. It merges animated and static sprites into one easier-to-use class. It also, likely, fixes some of the weird issues I’ve seen with tilemaps and particle effects.
Cons: It’s not backwards compatible with the level editor. In fact, there isn’t a level editor for it, so I’d have to make my own. Not to mention that the perks that come with a merged static/animated sprite means I’d have to go back and recode everything that deals with displaying and animation. Also, it’s still super-new, so there are likely to be little bugs and issues that haven’t been caught yet.
The longer I wait, the more work I’m going to have to go back and redo. But I don’t want to have to spend all my time porting everything over to the new version only to find that it’s really not that much different from what I already have. Not to mention that everything I’ve done with the isometric engine will have to go away, since it supports its own version of that. Really, the only reason this is an issue for me at all is because I’m afraid that the help forums I’ve been relying on will start to go away once everybody makes the change. If I have an issue, I won’t be able to ask about it in the forums, since the first question they’ll ask is “Are you using the newest build?”
I’m still going to think about it for a bit, but I’m honestly leaning more towards just sticking with what I have.

Before I wrap this up, I have a couple links to share. The first one is one of those “Top 6 blahblahblah” articles that Cracked makes- I’m sure you’re all familiar with them. This one is about how video game designers messed with people who downloaded illegal versions of the game. It’s pretty impressive, actually. Read the one about Earthbound!
6 Hilarious Ways Game Designers Are Screwing With Pirates
The second link is a presentation that someone gave during the Game Developer’s Conference in 2011 about depression and game programming. He talks about finding motivation and inspiration, and a lot of his talk focuses on methods to use when you’re just a one-man game studio, which is especially applicable to me.
How To Function As A Depressed, Solo Game Developer

As usual, download and play! I need feedback!