Tuesday, June 26, 2012

Monster Madness

Some really great creature designs involved in our newest project called Jump Jump Cookie. These fellows are the main antagonists of our app.

These were drawn in SAI Painter and cleaned up in Adobe Photoshop 5. I created the initial sketches for all of them in a plain old sketchbook with a ball pen. Always go back to the basics when you create the initial sketch. An ink pen prevents you from erasing your mistakes so that you can look at them and learn from them. Plus it keeps your art looking fresh.


Saturday, June 9, 2012

Articulating a Dragon

I've been working with the Corona SDK this weekend trying to bring life to a water dragon character for one of our new mobile games.

We'd like to articulate the dragon using twenty-two pivot joints in order to allow the player's character to maneuver around the playing area in a convincing physic-sy way.

I ran into problems right away. After I rigged up the component images with joints in all their proper places and ran the app in the simulator, I noticed that the physics joints between the display objects seemed way too elastic, creating an unconvincing gap between each of the pieces of the dragon. Not only that, there was tons of twitching and stuff going on with some parts of the dragon.

After some searching I turned up this forum posting on ansca It is a long thread, but I found some solutions that improved things quite a bit.

The first problem was with the density that I was assigning each physics object. I found that to prevent gaps in joints you must fine-tune the density on objects on both sides of a joint. Specifically, if you have a super-dense object jointed to a series of less dense objects, or if you are hanging a bunch of objects that cumulatively have more density than the object they are jointed to, you may get elastic joints.

The second thing that helped was setting the frames-per-second from 30 to 60. This may cause performance problems for older devices, but it sure helped clear up some of the twitching problems.

The final thing (and the thing that seemed to make the most difference) is explained here. Basically, there is an undocumented method that you can add to your code right after starting the physics:
physics.setContinuous( false )
Apparently this method turns off continuous physics checking. The only potential side effect of this is that collision detection may not be quite as responsive. For example, a high velocity object hitting a one-pixel wall may go right through it. The fix for this is just to make the wall a bit wider (e.g. ten pixel width instead of one).

The dragon works pretty well now. He doesn't jerk around as much, and the joints are much tighter. There is still some joint weirdness I will need to figure out that occurs when you drag the character around too fast, but that should not be a problem since the game will not use continuous touch events (it will be single-tap game play).

Anyway, this proof of concept has been fun, and I have learned a lot about articulating characters and optimizing physics joints.

Wednesday, June 6, 2012

Friday, June 1, 2012

Nox Update

We have been working hard on developing Nox's game.  On the programming side we are using Corona SDK as the engine/framework, which seems to work pretty well.  I am noticing some lags that I didn't notice in our last game, Bubble Bounty, but Nox's game is an auto runner type game, so everything is moving and we have some intense graphics since we want the game to look pretty on the iPad Retina.  I'll have to investigate further and determine how to get rid of those lags.

Working with lua is ... ummm ... interesting.  I prefer a strongly typed language because of the safety and structure.  With lua I can do all sorts of things that I can't do in Objective-C or Java ( as far as I know ), which can be good, but it can also get out of control.

For instance, in lua I can create a table and then dynamically add fields to it.

local myData = {} = 100

--later on I can do this = "someIdString"

So lua is very flexible, which like I said has its advantages, but I am finding you HAVE TO HAVE DISCIPLINE!

We are using Corona's Box2D bindings, which is nice and easy to use.  Using the built in physics functionality speeds of development and allows us to focus on game design and game play. There are some little quirky things I am still learning how to implement though.  For instance, how to recognize when the player is leaving a platform.  I'll write more about the solution to that problem in another post.  For now, however, I'll leave you with another concept: Abigail.