Skip to main content

Posts

Showing posts with the label Tools

Compressing PNG images recursively with pngquant

Do you have a large amount of PNG images and need to reduce the file sizes? Try pngquant , it's great! Especially for mobile apps and games it's really important to keep the final download size down. This because you can't rely on people around the globe having access to high-speed Internet connections and unlimited amounts of free mobile data. In it's simplest form you can just run the following command to compress all the PNG images in the current working directory: $ pngquant 256 *.png One "problem" with this command is that it creates new image files instead of overwriting the existing ones. This might be nice sometimes, but is usually not what you want. To overwrite your files, just add the --ext and --force options like this: $ pngquant --ext .png --force 256 *.png Ok, that's nice, but what if you have your images structured in a directory tree? Going into each directory to run pngquant can quickly become a tiring task if you have...

Creating animated GIFs on Windows the easy way

As a game developer you often want to show off parts of your work, for example on Twitter or Facebook. Sometimes plain images are enough, but other times you might have a cool game sequence that requires animation to come alive and get the proper attention. You could record video clips and share them with your followers on YouTube etcetera, but most of the times you're probably better off by just creating an animated GIF instead. Creating animated GIFs is of course nothing new, and not only useful to game devs. From my experience it's an excellent way to quickly demonstrate new features and ideas no matter what you're developing, without the need to have a working prototype. It took me a while to find my favorite tools that allow me to create GIFs of decent quality quickly and without hassle. Which tool to use depends on what you need to do. Basically, there are two different scenarios where animated GIFs come in handy. 1. Record an actual video sequence (e.g. gamepla...

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...

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...

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...

Ice Trap level editor

One of the mistakes I made during the creation of my first mobile game Dragonflies was to not spend some time building a level editor. I figured the time it would take to finish the editor would be better spent just implementing the levels the fastest possible way. In my case this meant playing around with pieces of colored paper on a hand-drawn coordinate system, and then manually do the conversion from paper to json files. It actually worked out quite well in the beginning, until I started making more complex levels... Not only did it take a lot more time than expected, but designing levels became so incredibly monotonous and tedious. That's not exactly what you want when you're trying to be creative and come up with cool, new level ideas. Lesson learned. For my upcoming game Ice Trap I started out the same way, by just hand-crafting the level files in json format. But this time I knew it was only going to be temporary. When I got to the point where the gameplay felt soli...

Use Bfxr to make 8-bit sound effects for your game

A really useful online tool that I came across during the making of Dragonflies is the free sound effect generator Bfxr found at http://www.bfxr.net/ . As the author describes it: Bfxr is an elaboration of the glorious Sfxr, the program of choice for many people looking to make sound effects for computer games.   You have full rights to all sounds made with bfxr, and are free to use them for any purposes, commercial or otherwise. This is truly awesome to get for free if you're looking to create cool 8-bit sound effects for your game such as exlosions, powerups, coins etcetera. I used Bfxr for almost every sound effect in Dragonflies , and I'm pretty satisfied about the end result. At least I know I couldn't have done better without spending way more time or having to pay someone else to create the effects for me. Bfxr online sound effects tool   So if you haven't already tried Bfxr , I think you should definitely give it a shot. Besides being a very useful...