Posts Tagged ‘unity’

As requested by a user who left a comment on one of my previous posts, I have zipped up my asset folder (which includes all scripts, models (even the couple horrible models I created!), scenes, etc. in Lerpz 2). Because of size restraints, I had to leave off the extra music folder (which had random songs by a band called Muse that I was planning on using in various places in the game). Because of this, the final scene (the game end scene), and the first scene (the game menu scene)  may cause the game to crash or otherwise not work because I used songs from that folder. You will have use your own songs, and drag the corresponding songs to their correct places in the menu.

I have never actually tried to share a Unity scene(s) before, so I may have done this completely wrong. If this is incorrect, please let me know in the comments so I can fix the download.

As always, if you have any questions on my methodology, or general questions on how I completed the tutorial, leave them in the comments!

Use the following link to download:

Just a small update to let you guys know about my progress do far. I haven’t made any new models, but have been working on the heavy programming that my simulation game entails.

I still haven’t decided on a name, but I have finished some milestones. I have finished simulating city desirability. In addition to that I have reworked how my building properties work, adding various methods to encapsulate things like adding city properties together.

I have also added a foundation for my achievements system, going from a few hardcoded achievements to abstracting the collection of achievements so I can easily add new ones.

For the future, I plan on working on a few things immediately. This includes simulating the properties of the rest of the world. I will use these properties to have something to compare to the city properties. I will use these comparisons to help calculate various things like desirability.
I also plan on adding some achievements and fine tuning my various simulations, like employment and population move in.

In the long term, I am considering translating my scripts to C#. I am considering this because C# has various features like operator overloading that I would love to take advantage of but unfortunately JavaScript doesn’t support.

If you have any suggestions please leave them in the comments below.

If you’ve never heard of Unity, and are into game development, I highly recommend checking it out. You can reach the website with tutorials, information and documentation at You can also download it.


Unity comes in Two forms, the free version and paid version. They both offer an extremely powerful environment for game development. They both also allow you to publish your games for a variety of platforms. The free allows you to publish for Windows or Mac, and the paid also allows you to publish for various mobile platforms, like Android and IOS. It provides an amazing 3D view for manipulating various game objects in the 3D world. It also provides a unique environment for coding, taking an object oriented approach where everything in the world (models, scripts, etc.) are all GameObjects. I won’t go too far into how Unity handles development (perhaps I will in a layer post) but rather how the experience was.

Development in Unity:

Developing in Unity was a very pleasurable experience. The 3D view in incredible, and makes things like positioning things incredibly easy when compared to positioning programmatically, which can be a huge hassle (change position, recompile, tweak position again, recompile, and so on).
In addition, the GameObject paradigm really makes organizing things super easy. Everything in the world is a game object, which can be composed of models, lights, models, and more, and can even be composed of child GameObjects. Because of this, it’s super easy to develop a specific part of the game, without mucking with another unrelated part. It’s also super easy for separate GameObjects to talk!

My Current Project:

My current project heavily relies on objects and collections interacting with each other. Unity has made developing super easy because Unity is set up in such a way as to make what I want to do super easy. For example, my script for building takes my builder object (A small avatar that builds things at its current cell) and creates a building object at the current tile, while checking the bank object and tile collection to make sure we have enough money and theres not already a building there. Normally, with a different game engine, like XNA for example, having these objects interact would be more complicated since I would have to explicitly create the communication system that is already there in Unity.

Also, importing models is incredibly easy and fast. You simply save the model in the correct directory (the assets folder in your projects root folder) and Unity automatically imports the model, and you can see how it looks in the game world, instead of having to compile the whole project just to see the size (god forbid you have to tweak the size repeatedly).

There are many reasons why Unity is incredible, and at a layer date I will further expand on it, but for anyone who is interested in game development, I strongly urge you to try out Unity. It’s free! Go to

It’s been a while since I posted an update, as I’ve been very busy these past few weeks, but I figured I’d give a quick synopsis of the progress i’ve made with the game I am developing. I’m not at my home computer, so unfortunately I can’t post any screenshots now. Perhaps I will later today.



The Environment in the game is like many other isometric simulation games. It takes a isometric top view, with a tiled board that you build things on. These buildings take up 1,2,4,etc. tiles (right now there are only 1 tile and 4 tile buildings). The models are more or less medieval style, with thatched roofs and simple architecture. This is part because I wanted to create a medieval theme to my game, and part because its easier to model simple architecture than complex!



I have been using Blender quite a bit these past few weeks, and have finally learned how to effectively create a model, texture it, and import it into Unity correctly. There was quite a learning curve, and I found myself frustrated at times, trying to decide whether to search for hours for a free model that suits my needs, or try to create one (which was a fruitless endeavor until I finally figured out the trick to texturing. The trick is unwrapping your models and getting the UV right!) I still have a lot to learn about Blender, but finally being able to create models and import them in game at the perfect size and height is making development go much smoother!



Probably the most fun part, a lot of the code I have written so far and plan to write revolves around simulating actions in the game. So for, I have very simple algorithms for people moving into your city, whether they are happy or not, when they apply for/get a job, etc. The game has a somewhat Sim City like quality in this respect, vs. other traditional RTS’s, where everything is based on resources, and buildings you create. I also have what I named achievements. These are akin to research in a normal RTS, but instead of going into a menu and clicking which item you wish to research and waiting X minutes, your civilization figures out various technology on its own, based on how you are building your city. For example, I have 3 achievements in game now.

Bartering system, which is achieved when you have a certain amount of citizens working (I think 100, maybe 60, don’t quite remember). This achievement lets your city be subject to supply and demand, and leads the way to other economic technologies.

The second is Community, which is achieved when you reach a certain level of happiness, and have no military buildings. This line of achievements would be for civilizations you wish to build as peaceful. It also unlocks a building (currently a shaman hut, but this may change).

The third is Chieftanism (I know, but I couldn’t think of a better word) which is achieved when you have a certain amount of soldiers/military strength. I haven’t fully ironed out the details for this achievement (or any of the others fully for that matter), but I plan on having military buildings reduce happiness less (currently, the only military building I have, a tower, reduces happiness by 25 points. With this achievement, perhaps it would be reduced to 10, or 12, or maybe 0).


Game Theme

I plan on this game being a sort of cross between Sim City, and Civilization. I didn’t want to have normal system of achievements like every other sim/civ game, so I will have research and technologies (and buildings) unlocked by how you build your city. Certain paths will have to be taken to unlock the best of a certain tree, or a middle ground to balance everything. I plan on having a fairly indepth governing system (similar to Sim city) where you can perhaps raise lower taxes, enact laws, etc. based on your achievements. For example, once the currency achievement is unlocked (which I figure will be the achievement after Bartering System) you can begin taxing your people (and taxes of course would depend on wealth level, type (ie income, residential, commercial, etc.), and others.


So far, the game is looking pretty good. I am god awful at modeling and am not afraid to admit it, but the models actually fit the theme and don’t look too bad. Hopefully i’ll be able to post a few screenshots later today.

The Lerpz 2 project is great fun, but I’ve been wanting to branch out into a different genre of games I find more interesting. I plan on making a medieval/fantasy themed RTS-like building game. It will be much like the games you can play on social networking sites (like Facebook or Google plus) and I plan to draw a lot of inspiration from the game I have been playing on Google plus lately, City of Wonder.

Now, I plan on making this a fairly ambitious project that I will develop in small iterations. I am starting with a bundle of Assets made available by Digital Roar, an indie game creation studio (read about their games here: who are very active in the Unity community.

The Asset pack is called Maelstrom (named from the game they were going to use these assets to make, but scrapped in favor of their latest project, Ascension War). You can download it here if you are interested in it: Note, that link takes you to a torrent download. If you would rather use a direct download, try : As of right now, this link still works.

Right now, I have yet to plan the core mechanics in full detail, but for the first simple iteration I plan on having

  • A resource system, to be announced.
  • Ability to build buildings and such.

I plan on this game being more if a civilization sim rather than a strategy game.

Since I am basically starting from scratch, I hope to learn a lot about Unity and scripting with it in the process.

Also, I do plan to keep working on Lerpz, but updates will be slower as I work on the other game also.

After quite a bit of coding, I was finally able to create my first Boss in Lerpz 2. I haven’t yet pushed the changes yet to media fire, but I took a video of me beating the boss in the Unity player. I still have a few modifications to make to the game before I release the next version. I want to add maybe one more power up, and add fix the movement of the boss. Perhaps I will make the regular enemies move. There is also a lot of unused space in the second level, which I want to fill with something besides level geometry.

I am well aware of the fact that the Boss can fly :P. Right now, its working as intended more or less (though I intend to fix this like I mentioned above). I may make the boss a little easier too, as it took my literally like 5-10 tries to actual get the video you see. But now that I have gotten both a rudimentary version of a boss, and autonomous movement to work, I have gotten over a hurdle that was stopping me from doing a few things before. I may also add a wander script to the normal enemies like I intended to originally do. Hope you enjoy the video, and if you have any questions/comments/suggestions, let me know about them!

Video below:

After creating the model for my blue bottle power up (which can be read about in the previous post) I added the code to make the bottle actual power the player up! Its a combat power up, and makes your attacks twice as strong. It also comes with a cool particle animation so you can tell when it starts and when it ends. I dispersed these power ups throughout both levels, so you can find them and use them. I also added another sound the signify when you pick one up.


Adding the power ups was much easier than I anticipated. Adding the particle animation was a tad bit challenging because of the way that the original tutorial handled particles, but still everything worked out well. Overall, this was good fun and a great learning experience for me. Adding future power ups should be a breeze now.


Anyways, if you want to download the new version (version 2.0.1) then follow the following link:


Hope you enjoy the new version, and let me know what you think!

Screenshot of Lerpz after grabbing the bottle powerup.

Lerpz After getting the bottle powerup