TechWire

Author - Manindu

Making your own games for Windows Phone

Windows Phone is one of the major smartphone operating systems available today. This article is focused on guiding anyone who is interested in game development to develop games for Windows Phone 8/8.1 devices.

Choosing a game engine

There are several game engines which support Windows Phone 8/8.1. These are some of the well know ones.

  • GameMaker – https://www.yoyogames.com/studio
  • Cocos2d-x – http://www.cocos2d-x.org/
  • Construct 2 – https://www.scirra.com/construct2
  • Corona SDK – http://coronalabs.com/products/corona-sdk/
  • Unity – http://unity3d.com/

In this case we are going to use Unity. Unity is game multiplatform game engine which allows us to create both 2D and 3D games. It has a free version which can be downloaded from here. The Pro version of Unity comes with more advanced features, but the free version is good enough if you’re working on a simple 2D game.

Setting up the development environment

  • Download and install Unity.
  • Download and install Visual Studio 2013 Express.

This includes the Windows Phone SDK which allows you to build your project.

Creating the project

1. Open Unity and create a new project.

File > New Project…

Browse for a folder to save the project and set the project defaults to 2D.

1

 

 

 

 

 

 

 

 

 

 

 

2. Create these folders to store different types of assets.

2

 

 

 

 

 

 

 

 

 

3. When you create a new project in Unity, by default the target platform is set to PC. We have to change the target platform to Windows Phone.

Go to File > Build Settings and choose Windows Phone from the list. Then click “Switch Platform”. Now the project has been converted to a Windows Phone project.

4. We are going to use some free graphics assets in our game. You can download them from here.

Visit kenney.nl for more awesome graphics.

Extract the folder and drag and drop the graphics into the Player folder you created in your project

3

 

 

 

 

Now we are going to create a simple animation. Select all the character sprites and drag and drop them into the scene. You will be prompted to save the animation. Save it with the name “Walk”.

Now select the character and change its position.

4

 

 

 

5

 

 

 

 

 

Select the Main Camera and set its size to 1.5. They hit play and you will see the animated character on the screen.

5. Save the scene and go to “Build Settings”. Press “Add Current” button to add the scene to the build. Connect your device to the PC and unlock the screen. Then hit “Build and Run”. Select a folder to save the Visual Studio project. Then the game will be deployed to your Windows Phone device.

I hope now you have a basic understanding about deploying your Unity projects on Windows Phone. Stay tuned for more tutorials.

Swing Copters, the return of Flappy Bird?

Flappy Bird was removed from the App Store this February. No one thought it would flap to the top position of app stores. However it became the most downloaded app in Apple’s App Store and Android Play store for some time.

Flappy Bird was developed by a Vietnamese developer called Dong Nguyen and it was available in Apple app store since May 2013. But it was unnoticed for months. Then some players started to tweet about its absurd difficult and the game went viral.

The game got global attention in February 2014. Flappy bird became an overnight sensation and reached the top position of App Store and Google Play. Once Nguyen claimed that the game was generating $50, 000 a day from ads.In the end the developer pulled the game out of the app stores saying that it had become too addictive.

Then he promised to re-launch the game with some changes according to the tweets below.

New-Flappy-Bird

Finally last week, Don released the next game called Swing Copters. However The dynamics are similar to flappy bird but instead of moving in the horizontal direction, you have to move in the vertical direction. And also it is much harder which is confirmed by the low rating and feedback.

Swing-Copter-Screenshots

Check out the new app and let us know what you think on the app.

Swing Copters Google Play, Swing Copters Apple store

AN INTRODUCTION TO ANDROID MOBILE GAME DEVELOPMENT – PART 2

This article is the 2nd part of the intro to android mobile game development. You can view part 1 here

I have developed two games using Corona SDK up to now and this is my experience as an indie developer.

Owy

I started developing games a year ago. First, I was playing around with XNA which is a game development framework developed by Microsoft. I developed some prototypes for an endless running game with three of my friends and that’s how I got into game development. After few months I wanted to publish a game for a mobile platform. By that time I didn’t have access to iOS and Windows Phone devices, so I chose to develop for Android. I started doing research on available game engines and frameworks such as Andengine, Unity3D and Corona SDK.

Andengine was not a good choice for me because I had plans to publish my game on other platforms in the future. Then I looked into Unity3D. By that time Unity3D didn’t have official 2D support. So, I had to use 3rd party extensions in order to work with 2D game assets and some of the best extensions were not available for free. After that I started playing around with the Corona SDK and I was impressed with that. Since I had plans for an iOS version of the game I decided to go with Corona SDK.

As a solo developer who was getting into game development, I wanted to create something simple but fun. An endless side scrolling game was my choice.

Design of Owy

As mobile game Owy has a simple storyline. Owy is little bird who loves cookies. The objective of the game is to fly as far as you can while collecting cookies while evading other birds.

I wanted to create an adorable character for the game and decided that it should be a bird. That was the birth of Owy. In the beginning it was named “Clivy”, but I found that name somewhat common on the internet. Then I renamed it to Owy. I chose that name because it was short and easy to pronounce.

Owy-icon

Figure 1: Icon

owy_gameplay

Figure 2: Early game play environment

I designed the game to be quite challenging. The enemy birds are spawned in random positions and they move in different speeds. The game uses the touch control. When you touch anywhere on the screen Owy goes up and when you release he goes Down. Most people liked this simple mechanism. Then I wanted to add a leaderboard and achievements to the game. Google Play Game Services API was available by that time and I chose it to implement achievements and the leaderboard for Owy.

owy_levels

Figure 3: Achievements

It took two months for me to complete the game since I was working on it in my spare time. Owy was launched on 6th of November 2013 and now it’s available on Google Play for free.

owy_google_play

Link : https://play.google.com/store/apps/details?id=com.boxfishgames.ProjectBirds

 

Ridiculous Juggling

Ridiculous Juggling is my second game and it was developed within a week.  As my second game I wanted to create something which delivers a challenging gameplay experience.

Ridiculous Juggling is a game where you have to juggle a small ball using a larger ball. Sounds ridiculous right?  That’s why it was named “Ridiculous Juggling”. This game is designed using flat colors and simple shapes such as circles and rectangles. I did this because I expected all the interfaces of the game to be simple and clean.

ridiculous-juggling

Figure 4: Main menu of Ridiculous Juggling

ridiculous-juggling2

Figure 5: Gameplay

The game uses the accelerometer of the device. The player has to tilt the device in order to move the larger ball left and right. An online leaderboard is also available for ridiculous juggling and it was implemented in the same way as in Owy. Players can sign in using their Google account and submit the best score to the leaderboard.

Ridiculous Juggling is now available on Google Play for free.

rj_googleplay

Link: https://play.google.com/store/apps/details?id=com.jawdroplabs.ridiculous

 

Tools I used for the development

ZeroBrane Studio

Link: http://studio.zerobrane.com/

Zerobrane Studio is a free and open source lightweight IDE for Lua. This IDE supports several Lua game development frameworks such as Corona, Gideros, Moai and LOVE2D.

zeobrane

Features

  • Portable and cross platform (Supports Windows, Mac and Linux)
  • Auto-Completion for functions and keywords
  • Live coding – It allows you to change the values of variables while the game is running in the simulator.
  • The easy to use debugger.

Corona Simulator 

corona

Corona SDK provides a simulator to run your games for testing purposes. The best thing about this simulator is that it simulates so many devices with different screen resolutions. This comes in handy when we need to know how the game looks on different devices.

 

Inkscape

Link: http://www.inkscape.org/en/

Inkscape is a professional vector graphic editor. It’s free and open source and supports Windows, Mac and Linux. I chose Inkscape for a reason. I was a complete beginner in vector graphic designing when I was developing Owy. I wanted to use a vector graphic editor which is easy to learn and I found Inkscape easier to learn compared to Illustrator and some other tools out there. So I used Inkscape to create all the graphics used in my games. However, if you’re familiar with other software such as Adobe Illustrator and Photoshop, don’t hesitate to use them for your projects. Just make sure that you export the graphics in png format. That’s the image file format used in most of the games.

inkspace

 Figure 9: Inkscape

 

Learning resources for beginners

Corona SDK Tutorials

http://coronalabs.com/resources/tutorials/getting-started-with-corona/

http://code.tutsplus.com/tutorials/corona-sdk-build-a-monkey-defender–mobile-19608

 

Unity3D tutorials

http://unity3d.com/learn/tutorials/modules

http://www.unity3dstudent.com/

http://cgcookie.com/unity/

http://walkerboystudio.com/html/unity_training___free__.html

An Introduction to Android Mobile Game Development – Part 1

We all love mobile gaming and it has become a booming market today. Majority of the smart device users use their device for gaming. Most probably you might be a mobile gamer too. But, have you ever wanted to make your own mobile game?  And still don’t have a clue where to start?  Then this article will guide you for a quick start. We will be focusing on the Android platform in this article.

How mobile games differ from PC games

Though they have a less processing power compared to modern personal computers, smart devices are considered as small computers. Some smart devices are capable of running high quality 3D games.

Games themselves and developing games for mobile differs from conventional PC game development in several ways.

Simple concept

Most of the mobile games are built on a simple concept and a storyline. Think of the popular game “Angry Birds”. The player has to destroy different structures using a slingshot. Another example is “Cut the Rope” where the objective is feeding a monster with candy. These games became popular because of the simple design and easy to pick up playing mechanics.

 Simple controls

Mobile games use easy to use controls such as touch, tap, swipe, tilt etc. These are actions which are familiar to all smart device users. So it makes the learning curve of a game less steeper.

 Development team size and development time.

Conventional PC/Console game studios use hundreds of individuals for the development of product. But most of the mobile games are made by small teams, sometimes by a single person.

Usually a mobile game can be developed in few weeks to few months (This can change depending on the project). But most of the PC games take years to complete (Eg. Skyrim V took 3.5 years).

Larger audience

The global smartphone users are expected to reach 1.75 billion in 2014. In most of the developed countries higher percentage of the population owns a smartphone than owns a personal computer. 2013 became a lousy year for PC sales but the mobile devices are on the rise. Another thing to consider is that most of the casual gamers tend to play game on a mobile device instead of a PC. Because of these reasons mobile games have a larger potential audience.

Available game engines and frameworks for Android game development

Andengine

andengine

 

 

 

 

 

 

Link: http://www.andengine.org/

Programming language: Java

Price : Free

Supported Platforms: Android

Pros

This is a free and open source game engine with an active user community. There’s a lot of tutorials and sample code out there to get started.

Cons 

The Major drawback of Andengine is that it lacks an official API reference . And it supports only for Android. You can make only 2D games using Andengine.

Cocos2D-x

cocos2D

Link: http://www.cocos2d-x.org/

Programming Language: C++

Price: Free

Supported platforms: Android, iOS, Windows Phone 8, Windows 8

 Pros 

This is a free and open source game engine so you can modify it according to your needs. And you can publish games on several platforms using the same code base. Cocos2d-x is one of the best engines out there when it comes to the performance.

Cons

Beginners may find the learning curve quite steep.

Libgdx

libgdx

 

 

 

Link: http://libgdx.badlogicgames.com/index.html

Programming Language: Java

Price: Free

Supported Platforms: Windows, Mac, Linux, Android, iOS, BlackBerry and Web

Pros

This is a free and open source cross platform game engine. This game engine performs well compared to other java game engines out there.

Cons

Beginners may find the learning curve quite steep.

GameMaker

Gamemaker

 

 

 

 

Link: https://www.yoyogames.com/studio

Programming Language: Game Maker Language (GML)

Price: Depends on the version (A free version is also available)

Supported Platforms: Windows, Mac, Linux, Android, iOS, Windows Phone, BlackBerry and Web

Pros

The GameMaker is one of the easiest game development tools to use. You can just drag and drop objects into the scene and apply pre defined behaviors to those objects. You can make more advanced things using the GameMaker’s own scripting language GML. This is widely used by hobbyists and professionals both.

 Cons

The free version of GameMaker comes with some limitations. You can’t publish on mobile platforms using the free version. The paid versions are pretty expensive compared to the other solutions out there. You have to learn a new language just for GameMaker.

 Corona SDK

coronalabs
Link: http://coronalabs.com

Programming Language: Lua

Price: Depends on the version (A free version is also available)

Supported Platforms: Android, iOS

Pros

If you need to program a complete game from scratch without dragging and dropping, this is the easiest solution you have. The language used is Lua and it’s very easy to learn. You can even publish for iOS and Android using the free version of the Corona SDK. It is documented well and provides sample apps to get started easily.

Cons

The free version of the Corona SDK comes with some limitations. You can’t implement in-app purchases etc. Another drawback is that you can only make 2D games using the Corona SDK.

Unity3D

unity3D

 

 

 

 

Link: http://unity3d.com/unity

Programming Languages: C#, Unity Script, Boo

Price: Free and a Pro version is available

Supported Platforms: Windows, Mac, Linux, Android, iOS, Windows Phone, BlackBerry , Flash,

XBOX, Playstation etc.

Pros

Unity’s main advantage is its cross platform capability. You can publish your games on every popular platform out there. Unity3D has a strong asset store where you can buy 3d models, scripts, sounds etc. And another huge advantage of using unity is that you can publish your game on most of the platforms even if you use the free version. However, when you reach a particular revenue limit you have to buy the Pro version.

Cons

Not observed.

Why I recommend Corona SDK and Unity3D

I’ve been using Corona SDK for a year and I believe it’s a good game engine to start game development for Android. Because of the very active community of developers and resources out there, you can get started easily. You can program the game in Lua instead of C++ or Java and this makes the development process fast. And it gives you the native performance. If you need to implement in app purchases in your game you have to buy the Basic version of the SDK which costs 16$ per month.

One disadvantage of Corona is that you can’t make 3D games using it. That’s where Unity3D comes into the action. Actually the latest version of Unity3D officially supports 2D game development. Unity3D is a game engine with an editor which allows you to create levels, manage game assets etc. It supports several languages such as C#, Unity Script (A modified version of Javascript) and Boo. Unity 3D is easy to learn but I recommend using something like Corona SDK because it improves the programming skills and gives you a better understanding of how things are tied together in a game. After getting some experience in game programming you can choose something like Unity3D.

Await Part 2 of this series!