Save and load data module for Corona SDK

Here is a dataSaver module for Corona SDK, that allows you to save and load files or separate app properties. app.data is file to store app properties and dataSaver.lua is a class itself. Just include module and store it in a...

Read More…

Change image on Corona Physics object collision

When you create newImage object, well basically you create image object, and you can't easily change it. So if you want, for example, change this image on collision, you should use sprites instead. Here is a quick example on how to do...

Read More…

Corona SDK - Next level, reset level logic

While developing games, you'll need to switch between levels and probably reset the current one, to let users another try. Here is how you can easily implement this logic to your game. In menu.lua file (or other main file you might have)...

Read More…

Create pause button for Corona Physics game

Corona SDK physics engine has built in start, pause and stop function. For game pausing will need two of them. So we simply create two buttons: pause and resume. function scene:createScene( event ) group = self.view --define button...

Read More…

Corona SDK - Hide body on collision

By default, you can't perform operations like removing or hiding Box2D object bodies involved in collision inside collision event handler. That's why you can either flag object and hide or remove it on next enter frame event, or simply...

Read More…

Reading json from file in Corona SDK

To read json string from file and parse it into table, you need to include json library, that comes with Corona SDK require "json" After that you can use this simple function to read string and parse it: function load( filename ) --...

Read More…

About Corona SDK

Corona SDK is so far most stable crossplatform SDK with most rapid development process I've seen so far, even without knowledge of lua language (all applications in Corona SDK are written in lua). This was so far the quickest way for me to...

Read More…