Loading PhysicsEditor and TexturePacker file in Corona SDK

In this post we continue with our previous two tutorials by loading the TexturePacker and PhysicsEditor data into our Corona SDK project. In case you missed the previous two tutorials you can visit them via the links below.

- PhysicsEditor and Corona SDK
- TexturePacker and Corona SDK

You should have the following TexturePacker and PhysicsEditor output files in your project:
- platformshapes.lua (PhysicsEditor, indicating the shapes of each display object).
- platformSheet.lua (a lua file with the definition of your image sheet) (TexturePacker).
- platformsheet.png (an png file with the images of TexturePacker).

Continue reading

PhysicsEditor and Corona SDK

In my previous post I introduced TexturePacker to handle a lot of images in a simple way to improve i.e. game performance, the developer of TexturePacker created another program called PhysicsEditor. With PhysicsEditor you can easily trace your display objects so when the object bounce with other objects in your game it looks like the object has the real shape and not some bounding box around it. Often images have a transparent background which determines the real “image”, but when two display objects collide we want to images to collide as there shapes and not a collision of the larger transparent backgrounds. Well, this can be solved with the tracing tool of PhysicsEditor. Besides the tracing, another great thing about PhysicsEditor is that you can set your properties of each individual display object.

In case you’re new to PhysicsEditor, you can download the program here: http://www.codeandweb.com/physicseditor

Continue reading

TexturePacker and Corona SDK

I used TexturePacker to organize some of my art work for Rolly Bear World. In the Rolly Bear World game the player needs to move around different platforms to guide Rolly Bear to the treasure chest. All the objects which can be dragged and moved by the player I included in one single image sheet using TexturePacker. Why? TexturePacker is a great tool to keep your project organized so you don’t get to many image files in your project; as TexturePacker creates one image sheet with a large part of my art work it saves memory and thus increase the performance of the game. Lets not forget it is super easy to create the required @2x files for re-scaling across devices. If you missed the discussion around re-scaling for different devices read this post.

In case you you dont use TexturePacker yet for your Corona SDK developments, check it out here: http://www.codeandweb.com/texturepacker/.

Continue reading

Rolly Bear World: First Game Play Functionality

Finally, I reached the first big milestone of my Rolly Bear World project. In the last couple of days I added the first gameplay interaction to the game. In this post we will start integrating the physics engine provided by Corona SDK, add the functionality to launch Rolly Bear into the physics world, and add some basic new art work to the game.

But first, below you can find some pictures of Indonesia. We rented a motorbike and explore the island Lombok. We zip through jungle roads, past palm trees and little villages. After a hour we suddenly found a very secluded beach called Tanjun Aan. Personally, this was the most beautiful beach I ever saw in my life. Besides a guy selling 2 Dollar coconut drinks we were the only two people on the beach. The water was turquoise and warm, it felt like heaven :).

Continue reading

Rolly Bear World: Re-scaling functionality for different devices

One of Corona’s strengths is the ability to deploy across different Operating Systems. In this post we make some changes to our code base to support multiple devices (iOS and Android). As this requires some changes in our config.lua and some understanding how it works I thought it would be worthwhile to write a post about this topic. Honestly, it took me a day to figure out everything despite the many articles already written about this topic.

Still in Indonesia, we travelled to Bali, which is one of the islands of Indonesia. The trip from Lombok to Bali took us almost six hours because the boat ride was longer than expected and we had some delays along the way. The problem with Bali is that it is hard to move around. There is barely any public transportation and you either take a cab or rent a motorbike. We visited some very nice rice fields and temples. Most of Indonesia is Muslim, but Bali is Hindu. Countries with a Hindu religion are often directly recognizable because of the many temples and shrines. So Bali is rich on random temples and some very large temples. One of the temples we visited was the Mother Temple of Besakih (Stunning!). Bali is one of these places, its good that we have visited it, but we won’t come back here. Bali is a tourist island full of western stores, prices and resorts. This is just not the way we like to travel. We probably will only stay for a few days and move out.

Continue reading

Rolly Bear World’s – Main Navigation Structure

In this post we will continue with the storyboard work we did in the previous post but we will be creating a more appealing look & feel by adding some art work and additional animations. Also we will add a level grid to the play game section.

Currently I’m in Indonesia, after clearing customs and security we both got very sick. We think we ate some bad chicken in Kuala Lumpur. Anyhow, we had severe food poisoning for a couple of days, resulting that we stayed for 4 days in southern Lombok. Getting food poisoning was part of our expectations, but being a first-timer I never thought it makes you feel that bad. We took 2 days ago a local boat to the Gili islands (northern Lombok). The boat was a really cool experience, we were sitting on a food supply boat for the islands, and beside another Dutch couple we were the only foreigners on the boat. Maneuvering with large backpacks between food and boxes with eggs was quite a challenge.

Continue reading

Create a Simple Space Shooter with Corona SDK

In this tutorial we build a simple space shooter by using the Corona SDK framework. By the end of this post you will find a download link for the complete source code. Feel free to grab it and use it for your own game developments.

In the video below you can see how this simple game works.

The following features are implemented:

  • Creation of Game controls
  • Spawning of enemy ships
  • Score and wave system
  • Power ups which are dropping from the sky
  • Checking for Collisions
  • Remove off screen objects
  • Sound effects and game music
    Continue reading
  • Part 3: Corona SDK: A Simple Race game

    If you have been reading and coding along, you would now have a start screen and a game background with a start time counter from 3 till 0. In Part 3, and final part, we will program the actual gameplay of the little game. In case you missed Part 1 or 2, please navigate to these tutorials if you like:

    Continue reading

    Android Tutorial: Photo app – Save bitmap to SD card or Share via Intent

    In this tutorial I will show you how you can make a simple photo app. First the app allow you to take a picture with the embedded photo camera app. Second, the app will place this picture in an ImageView and allows you to apply a Colorfilter. Similar, but not completely, like Instagram.

    When the user has applied a color filter the user can either save the picture to the SD card or share the photo via an Intent to for example Twitter or Facebook. In case of sharing, the picture will not be saved to the internal SD card (unless the user clicks the save button as well).

    The following concepts will be discussed:
    - Use MediaStore to take and grab a photo.
    - Use onActivityOnResult to set the photo to your ImageView
    - Save the picture either in the cache or save it to a new folder on your SD card
    - Use SeekBar and Colorfilter to apply a filter to the Photo.


    Continue reading