Parallax 3D effect with Corona

parallax_3d_effect

This morning I implemented a simple parallax system that creates the illusion of depth by using gravity data from the accelerometer with Corona SDK

First, I start to poll the accelerometer 100 times per second.

Gravity data from the accelerometer is then used to offset the angle of view. Illusion of depth is created by slightly moving the layers in the right direction, the magnitude of the movement depending on the distance to the eye.

To manage the scene I created 10 different layers. I placed the smaller shark in the front layer (layer 0), the larger shark in the middle (layer 5) and the back image to the background (layer 10).

Continue reading

Cool Development Tools

One of my favorite things about creating apps is finding the right tools to do it.

When I code, I spend a good amount of time making sure I am using the best designed tools for the tasks. Here is my list of must-have apps and tools for development.

Continue reading

Bitmap Font with Corona SDK

I created a Bitmap Font implementation using Corona SDK. This Lua module enables you to use a single sprite sheet as a font. Writing a string with your own custom game font is easy!

You can download the source code here

Here is a screenshot:

Corona Bitmap Font

A bitmap font using Corona SDK and Lua

Using CocoaPods FTW

I can’t tell you the number of hours I would have saved if I started using CocoaPods earlier!

If you are developing with XCode you might already know that linking libraries to your project is a major pain… Fear no more! CocoaPods is here to save your time and day.

There are lots of resources on how to install and use CocoaPods, so here is yet another one created by me:

Using the terminal do the following steps:

1. Update¬† the ‘gem’

2. Install CocoaPods

Continue reading

Back to top