Asset Store In-Depth: #4
Published: May 22, 2012
Greetings from the Unity Asset Store team!
We’ve been hard at work to bring Unity developers worldwide the greatest content known to mankind, to help you create awesome games efficiently, effectively, and affordably. Highlights from our May newsletter include an interview with Doppler Interactive, the team behind the popular Tidy Tile Mapper, and a tutorial to get you started with the ever-awesome 2D Toolkit, from Unikron Software. If you missed any previous newsletters, you can always check out our archive
Another milestone month!
The Asset Store continues to grow– both in terms of our catalog as well as our number of users. We are pleased to announce that in May, our customer base topped 100,000, while our catalog reached over 3000 packages!
Vivox C3 Lite Integration brings free voice chat to Unity games
By Vivox
Vivox is the market leader in providing solutions for integrating voice chat into games. So, we are thrilled that they are offering, for free, their plug and play C3 Lite Integration product in the Asset Store. C3 Lite Integration places a headset icon into any game allowing players to quickly join a voice channel and brings players together within your game. C3 Lite Integration is 100% free for Unity publishers and gamers.
Playmaker
By Hutong Games LLC
This editor extension is an easy and intuitive way to script game logic visually– without writing a single line of code! With extensive tutorials and example projects, Playmaker has a gentle learning curve yet incredible power and flexibility. Instead of writing code, you simply create game logic in Playmaker by laying out and connecting node boxes inside the Unity editor. What’s more, Playmaker can communicate with any Unity component, making it easy to use existing code you have created or perhaps downloaded from the Asset Store! This popular package also includes runtime debugging, with breakpoints and step-through state changes, and works with both free and Pro versions of Unity.
BIG Environment Pack
By Jacal
This package contains everything you need to create beautiful, elaborately detailed environments. Craft lush densely wooded forests, bushy scrublands, arid rocky desert scenes, swamps, tropical beaches, jungle ruins, castles, villages and dungeons! A dizzying array of trees, bushes, grasses, plants and flowers provide endless possibilities for creating beautiful, natural wilderness vegetation. An atmosphere system and environmental particle effects such as fog, pollen, leaves and dust add depth and realism to your scenes.Architectural elements and castle components allow you to build elaborate fantasy castles or keeps.
Tower Defense Toolkit
By Song Gamedev
Making a tower defense game? Get a head start with Tower Defense Toolkit from Song Gamedev. TDTK is a well-designed, open C# coding framework ready to be used to create any variety of tower defense game imaginable. Completely customizable, well documented, and fully iOS compatible, it is easy to understand why Tower Defense Toolkit is one of the top-selling complete project packages on the Asset Store.
Fantasy assets? We’ve got you covered.
So you want to make a Fantasy themed RPG? The Asset Store is full of awesome packages to set you off on your quest. Grab your lantern, as adventure awaits you! Lush forest, useful fantasy props and tools, ear-popping fantasy sound effects and detailed background scenery bring your world to life. What RPG would be complete withoutand the dynamic elements effect pack have all your magical needs covered.
Making a UI? The fantasy icon pack 1 and fantasy icon pack 2 will help you build your inventory and abilities interface, while the animated 3D energy bars will track your health and energy.Set forth, adventurer! Begin at a fantasy village, then make your way towards the mysterious and ancient wizard’s hill. Go not unarmed! Arm thyself with a mighty fantasy or MMO-style rune sword! Or fill your scabbard with the power of the elements with a red-hot flaming sword, an ice-cold frozen sword
or the awesome crystal sword.. Join forces with a wise mage, a heroic archer and his horse, an intrepid wizard or a mystical elementalist. Battle horrific ogres, rotting cadaverous undead knights, gruesome and foul-smelling hordes of orcs, hideous, sneaky goblins, rickety skeleton knights, and of course, fierce and ferocious fire-breathing dragons!
Interview with Joshua McGrath of Doppler Interactive
Asset Store customers have been delighted with the high-quality, time-saving tools created by Doppler Interactive, including Tidy Tile Mapper. Friendly Doppler developer Joshua McGrath was kind enough to set aside some time to be interviewed for the Asset Store newsletter. If you’re not familiar with Tidy Tile Mapper or other products from Doppler, we suggest you check them out!
Tell us about you, your creative passions and history.
We're a two-person team from Sydney, Australia - Jessica is the "artist", and I am the "developer"; but the titles are loose generalisations only. In reality - we just like to make things; it provides such an enormous amount of pleasure.
We came into Unity development and game design as a whole in late 2010 - and it proved to be the perfect combination of the design that Jessica loved, and the everything that I enjoyed.
Tell us about your products, their inspiration, why you decided to make them.Tidy Tile Mapper is our main product, an Editor Extension for quickly, beautifully creating tile-based 3D game maps - and hopefully having a very fun time doing it.
The philosophy of Tidy Tile Mapper ... and I guess it's aligned with Unity as an engine, is that... I saw an opportunity to "take one for the team", development-wise. Developing frameworks and systems for games is time-consuming work, when the fun lies in making the game itself.
So I thought: I'll put together this tool. I'll make it as fun-to-use, as straightforward and as pretty as possible. I'll restrict the functions right down to a core target use: "Make platform-games" - and I'll do my darndest to liberate anybody who wants to do this from needing to re-invent the platformer wheel.
Over time the (excellent) Unity community suggested new game types and functions, and Tidy Tile Mapper grew organically into a nice and robust tool for managing tile-maps... for platformers or for top-down styled games (with what I consider to be a pretty nice little Runtime API for procedural generation).
Oh man… It's hard to adequately explain my love for Unity without hand gestures. It's a beautiful engine. The API is fantastic… and it's so liberating to be able to just do anything.
And at a higher level... it's such a modern company. The support is excellent - the people are so open and honest about the engine and its future. That sort of transparency gives a developer a lot of faith in a company.
How did you hear about the Asset Store?I distinctly remember the day that the bolt of "Asset Store Inspiration" struck me. I was sitting in the audience at Unite11 - jet-lagged horribly from the 14-hour flight from Sydney to San Francisco.
I had a head-full of Unity user figures (the user base is growing so quickly!) and we were being shown the very positive Asset Store sales figures.
Combining these two facts I realised that the Asset Store was a very real, very exciting opportunity to develop for an awesome engine with huge momentum.
What role does the Asset Store play in your life as a middleware developer and game designer?My life is very Asset Store-centric these days. Actually, thus far - 2012 is "The Year of the Asset Store" for me, as a developer.
It's... coffee-and-sales-data, breakfast-and-forum-posting, lunch-and-support-emails and dinner-and-updates.
But beyond this, it's given me an opportunity to send Tidy Tile Mapper - a tool that I love, to an enthusiastic audience, and be able to gather feedback, develop new features and release updates in a super-fast manner.
Do you have any advice for developers who might use your tools?The best advice I can give is… get involved! Talk to myself and the users on the forums, send me an email, tweet me… I'm a friendly guy, and I love to solve problems. Community is such a valuable thing - the more you put yourself out there, the more easily you'll find solutions and kindred spirits in your quest for game development glory.And have fun. That's an important one.
What can Unity developers look towards in the future from your company?We have an ultra-exciting few months coming up, I'm super-psyched. I've had a vision. You could call it a spiritual awakening. Over the next few months, I've resolved to grow Tidy Tile Mapper from "ultra-smooth map painting tool" to "mega-smooth game painting tool".
So expect to be able to paint enemies, characters, pits of fire and all manner of game-specific objects with a single click - all the base functionality is provided, all you need to do is make it sing.
Oh, and in the background, slowly fermenting away... we've got our game: "Welcome to Nicetown". Call it "Animal Crossing"-meets-"Harvest Moon"-meets-"Apocalypse Now". It's so pretty I just had to mention it.
What is your vision for the future of creativity in game development?Ohh that's a tricky one. Much like Youtube has normalized the distribution of video content, I think mobile and web platforms are normalizing the distribution of games.
However - the barrier to entry for game creation is substantially higher, as it pulls together so many disciplines.
The progression I see is toward a mass "enabling" of the indie/small developer game market. Tools like Unity provide the mechanism, and entities like the Asset Store provide the content to supplement the creative individuals skillset.
In the future... I see this moving toward a grand "gamification of game design"... where the creation of the game is a game itself. I think we'll see a mass unveiling of hidden creativity (much like we see on YouTube). It's quite an exciting time to be alive.
Tutorial: Sprite Optimizations using 2D Toolkit.
2D Toolkit is an efficient and fast 2D sprite and text system developed by Unikron Software. The product provides heaps of features for mobile performance and workflow efficiency.In this tutorial we’ll introduce the new Sprite Collection Editor interface, and go through some of the optimization features provided by 2D Toolkit.
Installation
Once you download 2D Toolkit from the Asset Store and import it into your project, you should be ready to go. You can upgrade directly from the Asset Store – if you’re using JavaScript, follow the steps below to get everything going again!
What if I need to use JavaScript?
2D Toolkit is distributed as a full source package, and we’d like to keep it that way – it's great being able to dissect the source code, and customize it to your needs. There is a minor inconvenience if you’re using JavaScript – you will need to run to run the Setup for JavaScript menu command under the 2D Toolkit menu. This will move the script files to the correct directory structure to be accessible from JavaScript.
If you’re upgrading from a previous version - Make sure you restart Unity after importing the latest package, and run the Setup for JavaScript command once Unity has restarted.
What is a sprite collection?
A sprite collection is simply what the name says on the can – a collection of sprites. These sprites are run through a sequence of processes by 2D Toolkit and finally packed into one or more atlases and geometry cached for them. Sprite geometry doesn’t necessarily have to be square, which lets us do very interesting optimizations, some of which we will cover below.
Creating a new sprite collection
First, we’ll start by creating a directory to host the sprite collection. This isn’t necessary, but it's good practice. Select the directory, and click on Project Window > Create > tk2d > Sprite Collection.
Once you have created the Sprite Collection, it is important to name it so you’ll be able to quickly select it later. We called ours “Tutorial Sprites”. Click on Open Editor… in the inspector to bring up the Sprite Collection Editor window.
It’s a good idea to dock this window so you will be able to drag textures into it. What we will do now is drag a few textures as shown below. The sprites we are using are from /Assets/TK2DROOT/tk2d_demo/demospritecollection/sprites, which you should have if you imported the full package. Simply shift select all the textures you’d like to import and drag them to the Drop sprites here box as shown below.
The newly dropped textures will automatically be selected in the Sprite Collection editor. You can now perform batch changes to any of the parameters you see in the inspector panel to the right.
Once you are happy with your sprite collection, click on Commit to save and create the atlases. If you used the same textures we did, you’ll be presented with the following message – “Unable to fit textures in requested atlas area”.
The default atlas size is 1024, so we’ll increase this to 2048 temporarily to allow the textures to fit. Click on Settings and change Max Atlas Size to 2048, and click Commit again. You should see that the created atlas is 1024x2048 (10.7 MB), and there is 76.94% wasted space in it! This clearly isn’t a good use of texture space so we’ll try to fix this.
Click on atlas0_material in the materials foldout to locate it in the Project window, and then click on atlas0 in the same folder to view the texture. We’ve spotted the problem. There is one rather huge texture in the atlas.
Turns out this texture is used as a background texture, and has quite a bit of empty space (0 alpha transparent regions) in it and as such is a perfect candidate for Sprite Dicing.
Sprite dicing
Sprite dicing is a feature unique to 2D Toolkit which allows the system to split up a large texture into much smaller chunks, individually trimming these chunks, and seamlessly reconstructing the sprite in the viewport.
Select bg1 in the Sprite Collection Editor. Tick Dice in the inspector for this texture. The 2 parameters below are the chunk sizes to split the original texture into. Click on Commit with these default values, and look at the atlas texture again. It has now been reduced to 512x1024 (2.7MB), which is significantly smaller than the original texture. You can experiment with the 2 dice parameters to see what produces the best results.
Sprite dicing not only saves atlas space, but also fillrate and is a useful optimization on mobile platforms.
Creating sprites in the viewport
The sprite collection has been created by default to display pixel perfect on a 960x640 display, with an orthographic camera with a size of 1. This is set up in the Settings overlay in the Sprite Collection editor, and you may change them if you’re targeting a different resolution.
In this tutorial, however, we’ll simply use the defaults and set up a camera to match this.
- Create a new scene.
- Select Main Camera and change the Projection to Orthographic and Size to 1 to match the Sprite Collection.
- Create a sprite by clicking on Create > tk2d > Sprite.
- Set Collection to “TutorialSprites” and Sprite to “bg1” and on the Sprite inspector.
The background sprite we diced in the previous step should appear in the viewport. Zooming in closer shows what 2D Toolkit has done to optimize this sprite. (Image contrast increased to highlight polygons). The sprite has been broken down into smaller chunks, and the empty (0 alpha) space removed.
This is an incredibly powerful optimization – but 2D Toolkit 1.70 introduces another feature which lets you take this further.
Custom Sprite Shapes
Sprite dicing solves one set of problems, and is limited to shapes where the sprites can be reliably diced along the x and y axes. In some cases (hex and isometric tilesets), it may not work as well. Lets see what we can do to optimize the following sprite – it's called “starspike” and should be in your sprite collection if you’ve followed the steps so far.
Select it in the Sprite Collection Editor, and now, tick “Custom Shape”. You should see a green outline around the sprite. Hint – you can use the mousewheel / two finger swipe gesture to zoom in to the sprite preview area.
What we can do now is modify this geometry to tightly fit the sprite.
Click Commit, create the sprite in the scene view. You’ll find that it looks like this (triangle edges enhanced) – While this approach hasn’t saved any texture space, it has saved tremendous amounts of fillrate – always a good thing on mobile platforms.
Using custom sprite shapes also allows you to make sprites “solid” instead of semitransparent. This can be an important optimization for tilemaps. Consider the following annotated screenshot. The tilemap editor seamlessly works with these sprite collections and creates splits in meshes where necessary for transparent materials and opaque materials. That brings us to the last topic in this tutorial.
Material Overrides
When working mainly with tilemaps, and in other scenarios too, it may be beneficial to make some sprites solid where possible. Material overrides lets you do just that – it lets you share the same atlas, but use different materials for some of the sprites.
You can create a material override by clicking on the “+” button next to the Materials dropdown. This creates a duplicate of the current material, which you can then edit and reconfigure as you see fit. You will then be able to override individual or multi-selected sprites to use this material.
Conclusion
We’ve covered only some of the powerful optimization opportunities in 2D Toolkit. This great product provides many more features which make it easy and efficient to make your game.
2D Toolkit: http://www.unikronsoftware.com/2dtoolkit
Documentation and more tutorials: http://www.unikronsoftware.com/2dtoolkit/doc/
Support forum: http://www.unikronsoftware.com/2dtoolkit/forum/