Thursday, June 26, 2014

Oops I forgot the double jump

So tonight I was happily finishing up a level, and getting ready to start on the next, and checking my paper map that I sketched out about a year ago, when I realized I made a mistake. The map is completely missing the Double-Jump item. Yes, it's required, but no, there's nowhere to find it.

I need to now rethink a little bit of my map design to figure out where that's going to fit.

On a completely unrelated note, today I added flame shooters. What's a 2d side-scrolling game without flame shooters? (And as my office-mate Tim said "clearly it wasn't hard enough already, you needed to add something else to kill you")

Robo-Ninja -- now with MORE ways to die!

Monday, June 23, 2014

Tweaking consumable items

The work for the past couple nights has been redoing how consumable items work. Like I mentioned before, the problem was that players would likely just stockpile their slow-mo and checkpoint items, saving them for the "who-knows-what" later in the game. I needed a way to encourage players to use them, but not overuse them.

The solution I decided on: every time you pick up a consumable powerup, it adds 1 to your max that you can carry of that item. Whenever you use one, a progress bar VERY SLOWLY starts filling, and when it finishes, you gain back 1 of that item. I can easily tweak the amount of time it takes to regenerate your items, to play with making the items more or less precious. Currently, it's set at 5 minutes of real game time, which feels about right to me as a first pass, but we'll see.

Here I just used my only slow-mo item that I've pick up so far.
The progress bar below the item (in the upper-right) shows how long I have to wait before I get it back.

This was one of those changes that was surprisingly easy. I had to track a few more pieces of overall game state (max # of an item, and how far along the regeneration counter is), and then slap a new UI on top of it, but it all fit together nicely into the current codebase.  It's always nice when things work.

Saturday, June 21, 2014

Ugh

So I spent about an hour tonight trying to get everything working for my factory/industrial zone. But the ramp tiles just wouldn't work properly.

Until an hour later, when I figured out that the new method I was using to identify and mark my ramp tiles was 1-indexed instead of 0-indexed, so I was off by 1 tile.

Ugh.

Thursday, June 19, 2014

iOS & RoboVM

Well, thanks to my office-mate Tim, I have an old nearly-useless iphone 3g that I decided to see if I could get Robo-Ninja running on. LibGDX can build to iOS using RoboVM, so as much as I doubted it would work, it sounded fun to try. (RoboVM is a tool for compiling java code down to iOS native code, the similarity in naming is purely coincidental)

Step 1, since I'm not interested in paying Apple a $100 yearly subscription to run my code, was to jailbreak the phone. That was painful enough, searching for information and jailbreak files for a phone that old. Piles of broken links and outdated information.

Then I had to borrow a Mac laptop, since it will only build on a Mac. I installed RoboVM and all the necessary tools, and relatively quickly got Robo-Ninja running in the iOS simulator. It was a little slow, but it was Robo-Ninja!

The next hurdle was figuring out to build the ipa file (the iOS app package file, equivalent to the apk files in Android) without actually signing it with a developer certificate. At first, it kept breaking because I didn't have an apple  developer account. It took about an hour of googling, but there's a newly-added flag in RoboVM that lets you skip signing. So I finally got the ipa built.

Then a good 30 more minutes futzing with the ancient jailbroken phone to figure out how to manually install an unsigned ipa file, only to find out what I suspected: I needed at least iOS 5, and this thing is stuck at 4.

Ah well, it was worth a try.  Supposedly there's a few hacks that can allow an iPhone 3g to upgrade to iOS 5, so I may try one of those for fun. Until then, if anyone has a jailbroken iphone on iOS 5 or greater, and is interested in helping me see if Robo-Ninja will run on there, let me know.

Until then, I'll keep chugging away at the game. I'm working on the factory/industry area now, trying to get the tilesets and background put together. I realized today, looking at my rough pencil sketch of the world map, that I'm about 1/3 done with the level design. And probably at least 75% done with the codebase. So I'm getting there!

Wednesday, June 11, 2014

Oops I did it again

Just I did with ramps, I suddenly decided I needed a new gameplay element that throws off my previous design. This, kids, is why you actually plan things out.

This time it was moving platforms. You know, like many games have, a platform that moves up and down or side to side. Nothing revolutionary here. Although my design, for convenience, originally assumed that everything was on a strict grid. So I took some shortcuts by, for example, snapping your character to the grid when he was standing on a platform. And I also got to assume that the gridded static map tiles were the only things that the main character could collide with for "wall" collisions.
You can't tell from the static image, but these platforms are moving!


Suddenly these moving platforms could cause collisions at any point, not just on the exact grid lines. And the platforms aren't part of my tile map -- they're actually set up as "enemies".  So I had to go back and update my collision code to allow it to both function off the strict grid, as well as to provide a mechanism for enemy collisions to function as a "wall" collision.

That part was relatively easy. Then I ran into an issue where, when the platform was moving downward, you'd do a funny "bounce" thing, where the platform would move out from under you, then gravity would catch up and you'd drop to the platform, and immediately the platform would move out from under you again. It just looked dumb. So I had to rig up some code to "glue" you to the platform if you were standing on it (or clinging to the side of it, which I'll get to in a minute)

Really, it wasn't nearly as painful as the ramps, but it did require some changes to how things worked.

A few other things from the past week or two:

  • I added a "cling" ability that lets you hold onto a wall if you jump onto it. (I tried to get a screenshot of it, but on my laptop it requires simultaneously holding space (to cling), and Fn + alt + insert/PrtScrn, which my computer refused to do)
  • I've had a suggestion from a friend to rework how my limited-use items (slow-mo and portable respawn) work. He mentioned (quite accurately) that nobody will ever use the items, instead they'll save them the whole game, not knowing when they'll need them (he's right). So I'm considering new designs for how that works. I'm currently leaning toward a system where each time you pick one up, it increases your max number you can hold. And every few minutes (5? 10?) you'l regenerate one of the items that you used. So the only penalty for using them is that you'll have to wait to use them again.
  • At the suggestion from pretty much everyone, I've removed my countdown that occurs at the beginning of each level or respawn. I guess it was too much waiting. (Did any of you ever actually play through Ghosts n Goblins? I think I spent at least 12 years of my life watching that level intro each of the 8 thousand times that I died. My game is supposed to be painful, but not THAT kind of painful!)
  • Next up is the "slam" ability, which lets you slam straight downward from a jump instead of continuing forward. (I'm thinking it may also kill enemies, but I'm not sure about that yet)

NES Anguna

Well, I had a little bit of time still, while Frankengraphics is finishing up her game Project Blue, to have a little downtime on Halcyon, s...