Skip to main content

Posts

Showing posts from November, 2016

Generate app icons using bash script in Windows

Generating an app's icon in all necessary sizes for both Android and iOS can be really time consuming and boring. It would be ok to do this work manually if you'd only have to do it once for each app just before release. Unfortunately that's not the case since the final app icon is most likely something that evolves through iteration. Needless to say, there is time to save by finding an efficient way to automate the icon generation. There are many tools out there that can help out with this. I've tried a couple of them and they've all worked just fine. The problem is that I've found that they don't actually save me that much time in the end. For iOS, you need a completely square icon and iTunes/iOS will handle the rounding of the corners for you. For Android on the other hand, you have complete freedom when designing the shape of your icon. I prefer to have my Android icon look as similar to the iOS icon as possible, which means that I'll have to cre

Ice Trap is making progress

Lots and lots of new levels have been created for Ice Trap  in the last couple of weeks. Countless types of varied puzzle mechanics and level designs have been tested. Some of them went straight to the trash while many of them ended up in really cool levels sure to give the players loads of tricky puzzles to solve. That's some neatly stacked boxes! Right now I think that I might actually have too many levels for v1.0, so I probably need to sit down and prioritize which levels should make the final game and polish them into perfection. I guess that has to be a lot smarter than creating even more levels just because it's so much fun... The ice bubble seems to do just fine instead of a helmet.

Organizing display objects in layers in Corona SDK

Working with display objects and display groups in Corona SDK is fairly straightforward. Every Corona developer probably knows the basics of this and how you can organize your display objects in a hierarchy of display groups. All this is also pretty well documented by Corona Labs right here , so I'm not gonna go into details about any of this. Instead I'll show you how I've created a simple helper class called DisplayManager which I find very useful when it comes to leverage the concept of layers and to keep track of all display objects to avoid creating memory leaks by not cleaning up the display objects properly. What I want the DisplayManager class to help me with is basically a few things, that otherwise requires quite a lot of attention when coding: Leverage the concept of visual layers, and encapsulate functionality concerning layers in an object-oriented way, making it easy to extend when needed. Make sure that all display objects are cleaned up as they shou

Testing GameAnalytics v2 for Corona SDK

I've been trying out the new GameAnalytics v2 plugin for Corona SDK recently. It has some nice new features, especially the progression events which simplifies tracking your players' progression through the game. After the initial setup of the plugin, which is really simple (unless you make stupid typos...), you can fire progression events like in this example: gameanalytics.addProgressionEvent { progressionStatus = "Complete" , progression01 = "world01" , progression02 = "level01" , progression03 = "phase01" , score = 100 } For Android I got my events flowing pretty quickly, but when testing on an iOS device, no progression events at all showed up in my GA dashboard. Searching through the log file from my device I found the following error message: Nov 8 14:27:36 iPhone Ice Trap[1869] <Notice>: Info/GA/Analytics: Validation fail - progression event - progression02: Cannot be empty or above 6

Converting wav files to mp3 the easy way

I have often found myself in need of converting audio files from wav to mp3. As you all know, mp3 files are a lot smaller than wav files, which make them a much better match for mobile apps where you want to limit the final bundle size as much as possible. Another very important aspect is that Android devices seem to have a lot of problems playing wav files. I'm not sure why this is and haven't dug any deeper to find out. Instead I just accept the fact and make sure that all my audio files are in mp3 format, since that's better when it comes to file size anyway. There are probably a gazillion options available to convert between differents audio formats, both desktop tools and online tools. I've tried a bunch of these tools, and my favorite tool is by far  http://online-audio-converter.com/ . It's super easy to use, it's fast, completely free, and there are almost never any problems during format conversion. One of the best features that many other online to

Creating a game video

Yesterday I decided to create a little teaser video for Ice Trap , showing off different ways of dying in the game. I believe that failing in a game should be almost as fun as playing it, so I try to put some extra attention and details into that part of my games. Being primarily a programmer, my expertise when it comes to video editing is - to put it nicely - very limited. I had a clear idea what I wanted to achieve, but no clue which tools to use. Also, my tight budget limits me to use free or very inexpensive tools which heavily reduces the number of available options. What I wanted to do was: Record some actual gameplay sessions where I fail in different ways Trim each session to only a couple of seconds Crop each session, zooming in on the area where the actual dying is going on Compile all the short clips into a single video file Add some sound effects Convert the video file to an animated gif I won't go in to details about all the different approaches I tried.

Avoiding pixel overlap between sprite frames

When working with sprites in Corona SDK I've quite often run into a problem with sprite sheet frames occasionally overlapping each other. When I say occasionally I mean that it doesn't happen for every new sprite I create even though the same sprite sheet is used, and it doesn't happen on all device resolutions. This is what it might look like when the overlap happens. Not pretty... The sprite's image sheet Sprites in action, pixel overlapping between frames To work around this problem in the past, I've just padded my sprite images with a couple of transparent pixels so that the possible overlap won't be visible even though it might still be there. This has caused some additional work both to set up the sprite sheet images, as well as calculating the frames' positions within the sheet. So I figured I was gonna look for another solution to be able to create sprite sheets without padding that still look good. Tough luck it turned out. The pixel o