Wrapup

For the final step of the game itself, a snapping alligator now waits for kitty at the end of the level.

gatorbite

gatorwalk

There’s a slight cheat here; the snapping gator and the walking gator are two different entities go to sleep and tell the other two act when they’ve done their business.  But if I hadn’t said anything, would anyone have known?

Upon defeat, a diamond falls from the sky to end the game.

diamond

Title and ending screens are also included, but I wish I had more time to pretty them up.

title

ending

Of course, there’s many missing bells and whistles; the game has no sound effects, there’s no pause menu, the animation is choppy, the gator itself was rushed in drawing, and much more, but that’s stuff to learn in the future.

I cannot upload .zip files to WordPress (or if I can, I don’t know how), so I’ve included a link to download it from my personal blog.

Presentation Powerpoint

Downloadable game

Final Paper

Nearing The End

Kitty now has a full level to run through!

fulllevel

And shiny jewels to collect!

collectjewels

And hazards to avoid!

spikes

Also, the camera has been altered so there’s a space the cat can move in before the camera moves.  Hopefully this will reduce the motion sickness caused when the camera was directly following the cat.

cameralag

I wanted to be able to move the camera up and down so you could see further above and below the cat, but because of time it needs to be left out.

The trigger to change the music and move the camera to the boss field works, but the boss itself still needs to be implemented, along with title and “Thank You For Playing” screens.

Shinies!

Kitty now takes damage and faints after three hits, whereupon the level reloads.  If I had time I would change the health meter to hearts that disappear after each hit, but for the sake of this project it will be left as an HP counter.

ko

A jewel was also added as a collectible.  The base jewel is gray, and its color can be changed with a palette tool in Unity.

jewelcollect

The next step is to create a functioning level, then fill it with enemies and jewels.  On a sketch pad, I roughed out an idea.

levelsketch

When moving from paper sketch to game, I started out by using Quads to rough out the level.  In my Game Design class I made the levels too small, and particularly in the lava level the double jump allowed the cat to jump over everything, so this time I tried to make the level larger.  Except when I went to populate the level with enemies, I realized I went in the other extreme, and the level is too big for the cat to get through.

biglevel

After downsizing it and drawing it in Quads, I’ll go back over it with the level tiles.

I will probably have to scale the boss down from a flying, lightning-shooting griffin to something easy, like a crocodile to keep with the reptile theme.

Agile and Attacking Kitty

The cat’s movement and animation have been reimplemented, and she can now jump in the air.

airjump

However, there is a bug I noticed back in my Game Design class project where the cat will go into her jump animation when she crosses from one collider to another, as in when she walks along a ground made of tiles each with their own colliders.

floatingcat

One way to get around this is to make one piece of ground one large collider rather than many little ones.

The cat can also stomp the snake enemy off the stage

snakestomp

However, this doesn’t always work.  Sometimes the cat can bounce on a snake indefinitely.

unkillablesnake

Looking at the Inspector, this is because of a bug where the cat sometimes takes off two points instead of one, and because the snake’s HP is never 0 the knockout function is never called.  There may be a way to fix this by preventing the snake from being more than once in a certain time, but an easier solution is to change the code so the snake falls when its HP is equal to or below 0.  I may need to explore the invincibility period solution for enemies with more than one hit point.

The cat can also run, but currently the run option just doubles her speed.  A run animation needs to be added, along with animations to show damage and a knockout state.

ckstates

I experimented with the cat going on all fours when she runs.  For now I figure I’ll keep her upright, if only because it will be quicker to animate.

Next Steps: Add the running, damage, and knockout animations and build a simple level.  Remaining time needs to be invested into developing the boss.

Critter Jitter

This week focused on bringing the enemies to life.  All three enemies have animation now.  Not good animation, but I can devote the time to that later.

The snake wiggles around, but is a stationary enemy.  Meanwhile, the turtle and the thorny devil are programmed to turn around when they detect a gap…

turtle_ledge

… or hit a wall.

turtle_wall

The cat also reacts differently based on which enemy she lands on.  She’ll bounce off the snake and the turtle..

turtle_bounce.gif

… and take damage from landing on the thorny devil.

devil_hurt

Next steps are to fix the bugs in the cat’s double jump and get her turning and walking properly again.  I also need the snake to fall off the stage when the cat lands on it.  After that, I should look into spending a month on the boss.

Included is the rough draft of my final paper.  It’s seven pages plus a references page, so it’s a little short.

Second Guesses

In my continuing effort to uproot previous work, I started code on the collider-based cat, but didn’t get it fully implemented due to not having the funnest of weekends.  I’m still coughing up gunk, but some other issues came up over the weekend.

I also worked on artwork for the boss, although I need to tweak it because it’s much too lanky.

griffin.jpg

Finding Unity tutorials can still be a pain.  How do I code melee attacks? “Use this Unity asset store tool.”  “How do I generate dialogue with an XML file? “Use this Unity asset store tool.” Yay, thanks.

Focus for next week: Get the collider-based cat moving and interacting with moving enemies.  Maybe for now I should forget about getting the cat to having a scratch attack and just focus on getting her to stomp on enemies, and reacting based on if the enemies is vulnerable, armored, or spiked.

Illness

What should have been a week of schoolwork wound up being a week of coughing fits and head fog as I came down with something last Sunday that still hasn’t cleared up.

I was able to program the cat to acknowledge when she’s standing on different types of enemies, but while working on the code to hurt the enemy or cat is when I got sick.  In the following weeks I’ll have to play a bit of catch up.

I do need to get to work on the boss, its art if nothing else. Now that I know how to use the animator to trigger a command, that should make initiating attacks easier.

Revisiting the Project Plan

GameDevelopment

According to the projected plan, I should have completed an advanced test level and finished programming the first character.  I do have the advanced test level, but the cat can’t scratch yet.

Overall I’m not as far behind as I thought I would be, although I just realized the semester ends in April and this plan goes into May.  However, trying to get all of this done in four months is overly ambitious, and might be acceptable if I either already knew what I was doing or had no other classes.

Unity’s probably the best game engine around, but it can be hard to find tutorials because the program keeps updating and most of the tutorials I’m finding are for Unity 4.  They usually work and Unity 5 is good at updating Unity 4 code, but there’s little interface changes, such as with the animator moving the animation’s exit time to a checkbox.  Another headache is with Unity is the asset store making people lazy.  As an example, I want to know how to program dialogue between two characters, but so many video tutorials walk you through an add-on, such as Dialoguer, XML Importer with Articy:Draft, or the open source Fungus tool.

Towards the end of March my dad is going to New Mexico for a couple of weeks and I’ll have the house to myself.  That’ll be a golden opportunity to grind out work on this and other assignments.  Hopefully I don’t get a cold like the one I have as of writing this.

Animation, Yay!

First of all, the cat now animates when she moves and jumps, and the camera followers her. Yay!

animcamera

However, the camera seems unusually jerky and is giving me eyestrain.

I didn’t get a lot done on the cat game, as I was working through a tutorial based around a game with an astronaut.  It teaches moving blocks, switches, doors, how to link objects, and moving enemies (the last was incorporated after I made the following animation)

AstronautGame

The highlight of the tutorial, so far, was how to use the animator to call a function at a given frame.

animatorevents

As an example of how I can incorporate this into my game, say the boss is supposed to fire a beam after it finishes opening its mouth.

I’m starting to question if the raycasts a good idea.  This tutorial uses colliders, which then raises the question of how to incorporate these features into a raycast-based game.  I can figure out how to make the cat jump off enemies with colliders, but raycasts?  According to the raycast tutorial raycasts are supposed to give you more control over Unity, but right now I’m just trying to learn Unity itself.

More Motions for the Cat

By adding the velocity of whatever platforms the cat is standing on, she now rides the moving platforms.  I also tweaked the raycasts so the cat can jump through certain platforms.  Essentially, the cat is emitting two sets of rays; one set of red rays is coming out the top, button, and side of her and detects the “Solid” layer, while a set of blue rays only come out the bottom of her and detects the “One-Way” layer.

platformride

However, there’s a bug where the cat can get stuck in platforms if she doesn’t quite jump all the way through.

I tried to use an edge collider, but this causes her to fall through one-way platforms that were either moving upwards or at the slightest of angles.  By using very thin box colliders, the cat can stand on moving one-way platforms.  Except box colliders don’t allow for curved platforms.

Additionally, by using a raycast to calculate the angle of a slope and checking it against a limit, the cat can climb stairs.  However, she climbs the hill very slowly.

stairs

And lastly, a body of water was added to the stage, which the cat can swim around in.

swimming

This is done with an override class that changes the cat’s gravity and jump limits while in a certain trigger zone.  It should be possible to use a similar override with the hill so the cat’s base speed increases while she’s on the hill.

Three types of enemies have been drawn; a snake, a turtle, and a thorny devil.  The code for them has not been implemented, but the plan is that the cat can kill the snake by stomping on it, the turtle will be immune to stomping, and the thorny devil will actually hurt the cat if she lands on it.