Some time ago I’ve posted a few tips & tricks when dealing with Corona SDK, and finally I got my hands on posting another portion of useful things in there! Below you can read about code style, saving persistent data, and getting community help.
Code style and work environment
- Keep all in module manageable functions
- Use camel-case style for functions and variables
- Keep in mind 200 max variables limit per module
- Always add one blank line to separate nested blocks, for example before the if block above (more than one line is unnecessary)
- Keep game settings as a separate class, so it’s not mixed with screen’s lifecycles
- Sublime 3 Beta is recommended for the development and for Sublime Corona plugin
Best Practices for Organizing Projects
Tutorial: The value of well-formatted code
Tutorial: Scope for beginners
Continue reading Best Practices in Corona SDK
Today I’m gonna share a few things which I have learned while working with Corona SDK. Those are things I wish somebody told me at the very beginning of my journey with Corona, so hopefully you find them useful as well 😉
Anchor points are the properties which allow you to change the alignment of the object within its own bounding box. As difficult as it may sound, we’re just changing a gravity of some control (it can’t be a group, as groups don’t respect anchor points).
Whenever you see
yReference in some tutorial, just know – they are deprecated. There are now
anchorY isntead, and they’re default values are 0.5, which can be changed with the call like:
Transforms and Anchors
Anchor Points in Graphics 2.0
Continue reading Tips and Tricks in Corona SDK
Today I’m gonna talk about a scrolling background in Corona SDK. I’m sure you’ve seen this effect in many games and most likely the time has come to implement it in your own one. So, how is this being done?
The first question that might be asked is How many images do I need? The answer is – as many as you wish. I’ve chosen 1, because it’s super easy and fast – there is exactly one graphics and it’s enough.
The second question is In which direction it should scroll? It can be any direction, really, but this tutorial focuses on a vertical top > bottom scrolling. It’s like we’ve been flying higher and higher in sky.
Continue reading Tutorial: Scrolling background in Corona SDK
Hello and welcome to the third and last part of my article! In case you haven’t read, the first part is here and the second is here.
Previously I have talked about elements which are essential for successful puzzle games, and now there’s time to talk about some extra things! It doesn’t mean those things are less important, not at all! You can publish a game without them, and it’s still will be a complete game, it just won’t be addictive enough and we don’t want that, do we? 🙂 So, what is left?
Moving crystals here and there isn’t exciting, unless the game provides some sort of a feedback, be it sounds or animation. Don’t be afraid of being creative and funny! We all remember a very deep voice from Candy Crash Saga, saying Delicious, Sweet, or Divine. This voice is very distinctive and this is what it’s all about – to stand out, so the players recognize your game 😉 There are thousands of puzzle games in mobile market already, so try to be different in some way!
Continue reading How to create an addictive puzzle game? part 3