Its been a few weeks since my last blog post so I wanted to update you all on what’s been going on and also kick off a new series. First off, I’m working on a new production plan that should allow for more tech reuse between projects so that Rocket 5 can get more high quality games out on the market in a shorter amount of time.
Up until this point, each of our games has been very different and so they’ve all been written basically from scratch. We currently have 2 games in development that will test out this theory of tech reuse including some pretty big changes to XS Force (more on that in a future blog post).
In With The New
The biggest change that has happened is that I’m in the process of switching game development platforms from Unity3D to Corona SDK. Unity3D has served me well over the last couple of years and I couldn’t have shipped Giant Moto, Holeshot Drag Racing, Small Space and Walken on iOS without it. But I was starting to get bogged down with “too many features” and all of the overhead that comes with features that I’m not using – I’m at a point where I want to focus on making 2D games but since Unity is a 3D environment, there’s a lot of rule bending that I have to do to make my games. There’s also the issue of of build size – it’s very difficult to make an iOS game under the magic 20MB app size – even when making a very simple 2D game. And if I ever want to remove the Unity splash screen from the front of my games, I’ll need to cough up another $1,000+ for the pro license. I’m not going to turn my back on Unity entirely though, in fact I’ll be using it to build a game at the upcoming Toronto Game Jam since it’s still a great prototyping tool and a super fast way to build games for the web and desktop.
The Missing Link
Corona SDK has so far proven to be a nice lightweight development platform that has all (or most) of the features I need without a lot of extra stuff I don’t need. However one of the main differences between Corona and Unity is the lack of any kind of graphical editor in Corona – every object that’s displayed on screen has to be written into a .Lua script. I’m a Level Designer by trade and so I’m used to being able to lay out levels, place triggers, enemies and waypoints, etc in a graphical design tool. So after some early experimenting in Corona, I quickly realized that I was going to need some kind of tool for laying out my levels.
Maya Based Editor
My friend Mike suggested that I build out tile-based 2D levels in Maya and then export the information to a .Lua file with a Python script. Mike wrote the script and it worked pretty well, but there were some workflow issues with using Maya (It’s like using a jackhammer when you really just need a butter knife) and since I don’t know Python I’m pretty slow at adding new features to his script.
Photoshop Based Editor
I’m not going to get into all the details of the export scripts here since I’m still refining them – I’m planning to do another blog post later to show you them in action (notice this post is titled “Part 1”).
Photoshop Layer Renaming Script
My level exporter relies on Photoshop Layer and Group names for stuff like texture names in the exported .Lua file. But when you duplicate layers and groups in Photoshop it automatically adds ” copy”, “copy 1”, “copy 2” etc… to the end of the new layer name (I hear PS CS5 has an option to turn that off, but I’m using CS3). Since my levels are based on 16×16 pixel tiles, I’m duplicating a lot of layers and so I have dozens of these layers that need to be stripped of the ” copy 1″ text.
Rather than rename these all individually, I turned to the interwebs and found a couple of different solutions to the problem (honestly I thought I would find way more). The best one I found was RenameLayers.jsx by Mark Walsh. It works great for removing the extra text that Photoshop adds, but unfortunately his script executes on every .psd that’s currently open in PS and since the script can be a little slow if you have several complex files open it could take a while to complete. So I modified the script so that it only works on the currently active .psd file.
UPDATE: I found a way to make the renaming script significantly faster and it also works on any layer in the scene unlike my original script (which I have removed from this post). The new method requires stdlib.js which you can download from here.
And you can download the layer renaming script from github: Download Rename Layers.jsx
Save Rename Layers.jsx in /Applications/Adobe Photoshop CS3/Presets/Scripts if you’re on a Mac or C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scripts if you’re on Windows. And save a copy of stdlib.js in that same folder.
If Photoshop was running when you added the script to the folder, restart PS. To run the script in Photoshop go to File –> Scripts –> Rename Layers. It won’t be obvious that the script is running except you’ll get an hourglass and you won’t be able to do anything in PS. If your file has a lot of layers, the script can take a while so be patient. I suggest testing this on a smaller file first before you try it on a .psd with 100’s of layers just to make sure it’s working properly.
Feel free to modify Rename Layers.jsx to meet your own needs.
Show Your Support
If you find these tutorials useful, please considering buying one or more of our games and apps for iPhone and iPad. Your support helps to keep the tutorials flowing!
- Giant Moto: High flying arcade style motocross action!
- Small Space: Fly a spaceship, eat space creatures, score point!
- Holeshot Drag Racing: High speed drag racing action!
- Alien Booth: Transform pictures of your friends into awesome aliens!
- iSpoof Walken: A hilarious look into the world of Christopher Walken!
- Gaga Eyes: Transform pictures of your friends to give them huge anime eyes!