currently showing:
Click for Timeline Overview

Dynamic Character Sprites

This weekend, I separated out my character sprites into individual body parts. It didn’t prove to be too difficult for the artwork, but programatically speaking it was a bitch to do. Well worth it in the end tho; the sprite structure can be inherited by any character, and equipped items will now change the character’s physical appearance. Not to mention, it’s very memory-efficient!

Each sprite is split into the following sub-sprites: Head, Body, Legs, LeftShoe, RightShoe, LeftArm, RightArm, Weapon, Accessory. Here’s a sprite set that shows what I’m talking about

DESIGN:
I do everything in Illustrator now (no need to export to Photoshop). Even image slicing is easy!

Player Sprites

…decapitated characters are a good thing!

CODE:

Player Sprite Code

Each sub-sprite is added to a sprite display group (i.e. player.sprGrp), given it’s own reference name in the sprite object (i.e. player.sprite.body), and positioned independently based on the current state of the character (i.e. jumping, walking, etc). The downside: for each state, I have to manually position each body part. The upside: I only gotta do it once for each state.

Video Update! Graphics mini-Tutorial

Truth be told, I haven’t updated the blog in a couple weeks. Life’s been busy, and I’ve been working through bugs/ pacing myself at about 50% of what I used to do. That’s just UNACCEPTABLE, and seriously wish I could find more time. Even now I have some pre-planned arrangements coming up that will take time away from my game dev too (sister’s wedding, visit from relatives, etc etc). But time will always be a though cookie so I’ll keep pushing myself hard.

Today felt like a good day for a video update. Enjoy!

I’ve been using photoshop to get my sprite sheet coordinates (didn’t go into details about that in the video), but a good alternative is also through the use of Texture Packer, which gives you less control but does some of the work for you.

Staying Clean is Important!

This has nothing to do with my personal hygiene (although I have grown a programmer’s beard recently). I’m talkin about staying code clean!

This past week has be A LOT of code refactoring. Essentially, I’ve organized everything that used to be a hard-coded mess into an object-oriented/class structure; it’s all abstracted and encapsulated for easy use! That means, for example, adding a new character or object to the scene only requires me to make a function call in the main program (instead of copy/pasting repetitive code). Adding a character “player” to the scene works the same way, but calls the player class (which also inherits from the character class).

CODE:
Anyways, here’s what the body of my Scene1.lua file looks like:

Scene1.lua

It’s pretty structurally sound I think. I just attempted to draw out a flow chart for all the classes, but failed miserably. So instead, here’s what my project file system looks like now. This also needed a ton of organizing, especially since Corona doesn’t allow multi-directory dependencies.

File Directory

Project Timeline

The main question people have been asking is ‘when will the game be finished’? I usually reply around September, but I’m pretty uncertain. The fact is that creating this game is a dynamic/ explorative experience. I don’t want to spend too long on getting the app to the app store, but I do want it to be quality. To help aid with a more proper response, I’m implementing a SIMILE Timeline. I plan to spend a day or two in coding this, and it will allow you to click through the overall summary, graphics only, code only, and blog only (yes, the blog is part of this too).

While it’s possible that keeping you away from my planning has elevate your thirst for content, I hope that revealing my roadmap will somehow do likewise; regardless, it will surely motivate me to make the deadlines.