GameDev Challenge @ SMIIT
12Feb/120

St. Martin’s Teams win Gamezing 2011 again

Posted by Neville Attard

Well done to Team Minja with their game Pibbit for winning Gamezing 2011, and also for Barbagann Games for coming 2nd place with their game Scarfish.

You can see and play all the games from St.Martin's

Filed under: Uncategorized No Comments
20Aug/110

Custom textured text in Unity

Posted by Neville Attard

Unity by default will create boring solid colored text, both for GUI Text and 3d Text. If you ever wanted to modify with Photoshop the texture generated by Unity from the font's you're using, you can use this very handy SaveFontTexture script.

It adds an option in your Unity editor which will save the selected font's texture to disk. Then you can open it up and modify it with Photoshop to give it gradients, strokes, textures... the works. Make sure to keep a PSD version for later tweaking just in case. If you're adding stroke, I suggest to use "Inside" not "Outside" stroke.

In the link above make sure to also add the mentioned custom text shader to your project as well.

Filed under: Uncategorized No Comments
20Aug/110

Using Trac with Agilo for your game development projects

Posted by Neville Attard

In game development you cannot really use the waterfall method. The game needs to adapt as you are getting feedback throughout development. You need to be agile to adapt to any changes in your project. We have set up Trac with Agilo for all of our teams.

I will be giving some guidelines on how to better track what your team members are working on and how the project is moving on (or not!). Let's start with what's Trac, Agilo and Scrum

Trac is an enhanced wiki and issue tracking system for software development projects.

Agilo for Trac is one of the most widely used Scrum tools

Scrum is an iterative, incremental framework for project management often seen in agile software development, a type of software engineering



In very lame terms a Product Backlog will contain the features of your game. Every week or bi-weekly, you should review your Product Backlog (add/delete/modify) and see which features/requirements you are going to implement in the next Sprint by creating smaller tasks extracted from the features/requirements into the Sprint Backlog. You can set the length of the Sprint as much as you want but I would suggest a bi-weekly Sprint.

Usually in a production environment, a daily 5min stand-up meeting would be held between the team, and see what’s been done the previous day, any issues, and what’s going to be done during the day. Communication is crucial so any stumbling blocks are overcome ASAP. In the case of the game-dev challenge, keep your leader informed of any issues.

How does this translate in Agilo for Trac?

Milestones

First start at a very high level and think how you are going to divide your project into milestones. Typical milestones might be:

  • Concept (game mechanics, concept art)
  • Prototype (paper and code prototype)
  • Alpha (most of game mechanics are there and assets are being introduced)
  • Code Freeze (all the features have been implemented and no more code will be added)
  • Beta (fixes and polishing of code/art)
  • Release (game is released… next is marketing!)

To set your milestones click on Roadmap and by default you have 4 milestones set. Click on each milestone and then click on the Edit Milestone button to rename it and set a date as well. (If you need more than 4 milestones, click on Admin->Milestones and add them from there.)

Requirements

Next step is to add Requirements to your Product Backlog and associate them with a milestone. An example of a requirement might be to have the camera follow the player’s avatar for 3rd person should view using smooth movement and the camera should never go inside the avatar or surrounding meshes.

To add a requirement click on New Requirement from the side bar. These Requirements will be listed in the Product Backlog automatically.

Sprints and Tasks

Once you got your Requirements, you need to choose which ones you’re going to produce in the next 2 weeks, i.e. next sprint. Each requirement will need to be split into smaller tasks.

To create a Sprint in Agilo, just click on Roadmap and under each listed Milestone you have Add New Sprint.

After creating your Sprint, start creating the tasks which would accomplish a Requirement. I suggest that you create tasks with an estimate remaining time of not more than 4 hours. If it is greater than 4 hours than probably it can be split into smaller tasks. To create a task just click on New Task. Remember to set the Sprint, Remaining Time and also Assign To field.

Remaining Time: This is your initial estimate of the task you’re creating. If you allocate 4 hours, the teammate can update the value of remaining hours after he has worked on it. It might be the case that after he worked for one, he estimates that only 1 hour worth of work remains (GOOD!). Or he might estimate that 5hours are left (BAD!).

IT IS VERY IMPORTANT THAT ALL TEAM MEMBERS UPDATE THEIR TASKS WHENEVER THEY WORK ON IT… mainly because of the Burndown Chart. More on this later.

Assign To: Just type the username of the team member that will be working on this task. After all users have logged in you can actually turn on an option on Trac (through XP-Dev.com) to have a drop-down of the users.

Viewing and Prioritizing a Sprint

In the Side Bar you can select a Sprint Backlog and view it. You can prioritize the tasks by just drag and dropping. The team members can also update the time left of their tasks from this view by just clicking on the hour number

Email Notifications (IMPORTANT)

For users to be automatically be notified of any updates of their tasks, they should go to the Preferences page of Trac and their name and email address.

Burndown Chart

To access the Sprint Burndown Chart just click on Dashboard (and not on Burndown!)

The Burndown Chart is the coolest thing invented since sliced bread. It shows you how the sprint is going. Since you are allocating the hours for the tasks in the Sprint, ideally the number of hours left will come to zero at the end of the sprint. Ideally it is a linear graph (Ideal Burndown). If instead you are seeing a horizontal Actual Burndown as days are passing by, it means no one is working! I would start pinging them and see what’s happening :) If the Actual Burndown is going upwards, it means that people are having trouble and the sprint is in trouble… EMERGENCY!!

Wiki

Another interesting feature of Trac is the wiki. By default it is just some help on Trac and how to configure it etc.

You can use the wiki to create a knowledge base on your project. Everyone can edit and create pages, and a history is kept as well.

I suggest you have a look at the Wiki Formatting link you have already in your default Wiki. Then delete the default wiki page and start with your own wiki page.

I will just give you this tip: To create a page you just type a link like so:

[wiki:coolidea Our cool idea so far]

It will be displayed with a ? something like this Our cool idea so far?

To actually create the page, you will need to click on the link and edit the page.

 

Filed under: Uncategorized No Comments
10Aug/110

Using SpriteManager for 2d games or for HUD

Posted by Neville Attard

I had done a post last year on my SoftwareProdigy dev-blog regarding using SpriteManager effectively for a HUD. Have a read through it.

You will need Sprite Sheet Packer. This will take all your images, and merge them into a one image, aka sprite sheet, aka texture atlas. It will also produce a text file. More details in the above mentioned post.

Here is a demo unity project using the SpriteManager and also demonstrates how to use animation offsets for any characters, since you might want to have to offset the frames to make them more flowing.

If you just need to place sprites (without animations) you will use the SpriteBase script. If on the other hand you have animations, you will have to customize the Avatar script.

The sprite sheet was generated with SpriteSheetPacker, and the animation was tweaked within Unity itself, by adding an edit mode where one can modify the offsets of each frame of the animation.

Feel free to improve on the classes provided, but the characters in the spritesheet are copyrighted :)

Filed under: Uncategorized No Comments
7Aug/111

Toon Shading for iOS

Posted by Neville Attard

If you want cartoon shading you have three options

1) Use a shader such as the one given in Unity, but then you are restricted to iPhone 3Gs+

2) Create sprite sheets by pre-rendering in your favourite 3d renderer such as Maya and 3dsMax using some shader plugin FinalToon or postprocess using tools such as ToonFX.

3) Create your own models, but be warned that the frame rate may decrease drastically, as you need double the amount of vertices.

This post will focus on the latter after reading a forum on unity3d.com and a tutorial on cell shading in 3dsMAX.

The above model which can be tested from a unity package provided in the mentioned forum gave me the following stats:

8 draw calls, 10k tris

iPod Touch 2g: 18FPS

iPad1: 48FPS

As a texture it's using environment mapping to give the illusion of cell-shading which also hits the iPhone's performance. This model is not using a programmable shader as such. The model is pre-built from an editor like 3dsMax.

Referring to the tutorial mentioned above, to create the model to have an outline, look at the last part of the tutorial:

Next go into any viewport and select your teapot. Hold shift and click on it to make a clone. Don't move it anywhere though. Go into your modifiers panel and add a push modifier to it. Give it a value of 1.5. That's what I usually give it but if you can change it depending on how thick you want your outline. Then add a normal modifier to it, and make sure Flip Normals is checked. Go back into the material editor and select a new material. Make the self-illumination value 100, and then change the diffuse to pure black. Put this material on the second teapot and you can instantly see the outline in the perspective viewport. When you render, make sure that Force 2-sided is off.

 

Filed under: Uncategorized 1 Comment
28Jul/113

Unity workflow with SVN for small teams

Posted by Neville Attard

In this post we are going to highlight what needs to be committed to SVN and also about the workflow of a small team (5-6) people using Unity (free).

If you want to have a better understanding of what Unity is doing underneath you might want to have a look at the links found at the end of this post.

Getting started

Let’s start with a new project.

  1. Create a new project
  2. Create a prefab
  3. Create a cube
  4. Drag cube into new prefab
  5. Create a material
  6. Import a texture
  7. Assign the texture to the material
  8. Assign the material to the prefab
  9. Save scene
  10. Quit

In your scene you should have a camera and a prefab instance.

Testing rebuilding of library

Let’s try removing some files, and try relaunching Unity afterwords. Before launching Unity, create a copy of the trimmed project. You’ll soon know why.
In the project folder (if you launched Menodevelop) delete the following:

  • Temp
  • *.csproj
  • *.pidb
  • *.sln
  • *.userprefs

In Library folder you need to delete the following (DON’T DELETE METADATA!!!)

  • cache
  • previews
  • ScriptAssemblies
  • assetDatabase3
  • AssetImportState
  • AssetServerCacheV3
  • AssetVersioning.db
  • AudioManager.asset
  • BuildPlayer.prefs
  • BuildSettings.asset
  • DynamicsManager.asset
  • EditorSettings.asset
  • EditorUserBuildSettings.asset
  • expandedItems
  • FailedAssetImports.txt
  • guidmapper
  • InspectorExpandedItems.asset
  • MonoManager.asset
  • NetworkManager.asset
  • ScriptMapper

DON’T DELETE METADATA!!!
The files in Library should look something like this

After launching Unity, you should see that it’s re-importing and compiling everything. The textures and prefabs should appear fine in your scene.

Your first commit

If it loaded fine then you can import the trimmed version (the copy you had made) into your SVN repo. I would upload it in a folder called unity, so you can have other folders for art (like PSDs, 3dsmax files etc) and docs separate from the unity project.
Once it’s imported, delete your project since it is not associated with SVN yet. Do a checkout of the project folder. Launch Unity and open the SVN project. You should see it reimporting everything and you should get everything as it originally was.

Set up your ignore list

The main idea is that we don’t commit anything which can be automatically generated by Unity. This will also eliminate a lot of useless conflicts. We can set up an ignore list so that the SVN client doesn’t bother us with.
To the ignore list add the files that you had deleted and that now have reappeared because of Unity’s recompilation process

Workflow

The 7 commandments

Here are some commandments the team should follow:

  1. thou shalt not modify the same asset (scene/prefab/material/texture). Do this by doing an SVN lock on any binary file BEFORE doing any changes.
  2. thou shalt not forget to add any new assets and related metadata to the repository
  3. thou shalt not forget to remove any deleted assets and related orphaned metadata folders. Keep SVN repo clean
  4. thou shalt close Unity before doing any SVN operations
  5. thou shalt do an update before committing
  6. thou shalt run the leanAndMean batch file after an update
  7. thou shalt not save the scene, if you actually didn’t modify the scene’s hierarchy or instance values in some way (avoids useless commits)

The 1st commandment is the toughest. Try to communicate between you who is modifying what. If you are working on some tasks which will finally end up in one scene, you might want to create a temp scene for each individual, sort of prototype scenes. Then the leader should merge all the assets in the main final scene. This could be done by dragging of prefabs, or importing unity packages in the main scene. Also locking will help (see below)
To keep it from getting messy, only programmers should interact with SVN. For the artists you could have a separate folder, or only give them instructions to upload directly in Assets/Sounds or Assets/Textures folders. But PSDs should not be part of Assets as it would take much more time when Unity is rebuilding the Library files after you run the clean batch file.
If the artists in the team are not technical and you think that SVN is going to drive them nuts, then set up some shared Dropbox folder and the leader would need to commit any art done by the artists.

Adding/Deleting

Be diligent when committing and add any assets you’ve created, and any new metadata files/folders in the Library/metadata. Also when delete a file which is not part of your game anymore, delete files through SVN, relaunch Unity and their related metadata will automatically deleted. Keep SVN clean.

When you delete assets, their related metadata is removed but their associated folder will not be removed. You can safely SVN delete empty folders in the metadata folder.

Updating

After doing an update, you should get the Library folder lean and mean again. The easiest way will be by doing a script or batch file.
Here’s one for Macs. Call it leanAndMean.sh and place it in your Library folder:

rm assetDatabase3
rm AssetImportState
rm assetservercachev3
rm AssetServerCacheV3
rm AssetVersioning.db
rm AudioManager.asset
rm BuildPlayer.prefs
rm BuildSettings.asset
rm DynamicsManager.asset
rm EditorSettings.asset
rm EditorUserBuildSettings.asset
rm expandedItems
rm FailedAssetImports.txt
rm guidmapper
rm InspectorExpandedItems.asset
rm MonoManager.asset
rm NetworkManager.asset
rm ScriptMapper
rm -r -d -f cache
rm -r -d -f previews
rm -r -d -f ScriptAssemblies

Remember to do chmod 777 leanAndMean.sh in some terminal window.
For Windows the leanAndMean.bat will look something like this:

del assetDatabase3
del AssetImportState
del assetservercachev3
del AssetServerCacheV3
del AssetVersioning.db
del AudioManager.asset
del BuildPlayer.prefs
del BuildSettings.asset
del DynamicsManager.asset
del EditorSettings.asset
del EditorUserBuildSettings.asset
del expandedItems
del FailedAssetImports.txt
del guidmapper
del InspectorExpandedItems.asset
del MonoManager.asset
del NetworkManager.asset
del ScriptMapper
rmdir /s cache /q
rmdir /s previews /q
rmdir /s ScriptAssemblies /q

Also don’t forget to add it to your SVN repo on your next commit

What happens if you forget to run this batch file?

Let’s say you create a new material with a new texture and associate with a prefab, and you commit. The other guys after doing an update would see a pink color instead of your texture.
Running the batch file/script will solve this issue.

Resolving a Conflict

Even if you are going to try your very best to avoid people working on the same assets, it will inevitably happen at some point in time. Let’s think of a scenario.
If A modifies a scene (e.g. a value of a script within a prefab instance) and commits, AND B modifies the same scene, and tries to do an update he will get a conflict. Since it’s binary it will not be merged automatically. You will have 3 files, e.g:
• scene.unity
• scene.unity.r3
• scene.unity.r5
These are basically your current version and the previous 2 remote versions.
Since it’s not text, it cannot merge it. You will have to decide which is the best version by inspecting them in Unity. So you will have to play around by opening the different versions. For the case of scenes, perhaps renaming them to scene_r3.unity and scene_r5.unity might help to open them quickly within Unity.
Once you merge them manually, delete the remote versions (r3, and r5 in this case), mark your scene file as merged, and commit.
Prefab conflicts will be similar. Let’s say you have your version called test.prefab, and the last two remote versions, test.prefab.r5 and test.prefab.r7. You have to manually decide which is the best one or merge manually by inspecting the values within unity and creating the merged prefab.

Avoiding Conflicts Altogether (VERY IMPORTANT)

So far we didn’t mention anything about locking a file. What we covered so far is Copy-Modify-Merge flow (update, do the changes, commit and hope no one touched the file).
A better workflow would be for binary files such as scenes, textures, material, prefabs (but not scripts as they are just text files and easily mergeable), we should use the Lock-Modify-Unlock approach (lock, do the changes, commit and should automatically unlock the resource).
So if person A wants to modify test.prefab, he first should do an SVN lock on the file. While he is doing the changes, if person B wants to also modify the test.prefab he needs to first try to obtain the lock. If the file is still locked by A then SVN will warn B that someone else has the lock and so shouldn't modify until A commits and releases the lock.

So lock, do any changes, commit. If the lock fails don't do any changes. Needs some diligence but this will avoid any conflicts.

References

http://bitflipgames.com/2010/09/13/tips-for-working-with-unity-1-source-control/
http://answers.unity3d.com/questions/22604/which-unity-project-files-can-be-ignored-for-versi.html
http://svnbook.red-bean.com/en/1.5/svn.advanced.locking.html

Filed under: Uncategorized 3 Comments
16Jul/110

Logo for St.Martin’s GameDev Challenge

Posted by Neville Attard

Lighthouse + Ashley, who is the official sponsor of this year's GameDev Challenge, has designed several logos and we let our students vote which is the logo they want to represent this great challenge.

And the winner is:

Filed under: Uncategorized No Comments
14Jul/117

Getting Unity Remote for Android working on Windows

Posted by Neville Attard

Some students encountered some problem when they came to connect their HTC Wildfire S it wasn't connecting with Unity 3.3

The process should have been as easy as this

  1. Install Android SDK
  2. Set path to Android SDK from Unity Edit->Preferences
  3. Exit Unity
  4. Connect Android using the USB cable
  5. Set the Android device to be using debugging mode
  6. Download from Android Market and Launch Unity Remote
  7. Launch Unity again
  8. Hit Play in Unity and viola! NOTTTT!!!

We tried all kinds of crazy stuff like killing the firewall and antivirus which didn't effect anything. Then we noticed that the adb Android SDK Platform tool was reporting the device was offline even though it was connected.

The solution was the following. From command prompt kill the adb background process by going to the Android SDK platform-tools folder and running

  1. adb kill-server
  2. adb devices

It should tell you some serial number of the device followed by "device" (not "offline"!)

Run the above adb commands mentioned above everytime you start your pc, before loading Unity. You can easily do a batch file for the commands.

Once that is done, then business as normal. Just launch Unity Remote on your android first, then launch Unity and hit Play.

Another mishap

Another student noticed that whenever we were running "adb devices" from the command prompt it was giving him "adb server is out of date". From Task Manager we noticed that at some point there would be two or three adbs listed! If you killed it, it would automatically be respawned. This was being done by HTCUPCTLoader.exe process. Ending this HTC process and re-running "adb devices" manually solved the craziness.

Hope this helps solve your Unity Android Remote problems. Thanks to Fabian Fenech and Robert Cassar for this post.

Filed under: Uncategorized 7 Comments
20May/110

GameDev Challenge 2 Launch

Posted by Neville Attard

Poster for GameDev Challenge 2

After this year's SMIIT students' success of developing 4 games and also winning the national Gamezing competition, we are organising the second edition of the GameDev Challenge.

This year we will try improving on the art side and also on game design.

Once again, Gareth Lewis, ex-engineering manager of Lionhead Studios, will be joining us to share his expertise in game production.

Sign up to show your interest in this challenge. You have till 31st May 2011 to sign up.

We will be sending those who sign up further information in due course.

Enjoy the summer developing and designing games :)

Filed under: Uncategorized No Comments
11Apr/110

Bucket Ball of CVI Studios won the national Gamezing competition

Posted by Neville Attard

Saturday 9th April 2011 saw a throng of game developers gather in a hotel in Sliema anxiously awaiting the announcement of the national Gamezing competition winners. This competition saw a number of local teams competing in developing a game with an educational bias using the Microsoft XNA and Kodu frameworks over the past nine months. A lot of effort and time was invested in this venture and expectations were high with six teams participating in the XNA competition alone.

The judges included Jason Della Rocca, former IGDA president and Ambassador Award winner at the 8th annual Game Developers Choice Awards.

The first prize of the national XNA game development competition went to CVI Studios, from St.Martin’s Institute of I.T., for their game Bucket Ball. The team consisted of Jonathan Aquilina, Blair Avellino, Andrew Brincat and Leon Cassar.

The runner up place of the XNA competition was also won by a St.Martin’s Institute of I.T. team, Barbagann Game Studio with their pirates game Battles on the Horizon. The team consisted of Clive Ciappara, Anthony Demanuele, Duncan Mercieca and Ryan Sammut.

Two more teams from St.Martin’s Institute of I.T. participated : Kinetic and Zarox, who are congratulated on their hard work.

Bucket Ball from CVI Studio

Download Bucket Ball

(For instructions and other info on the game a Readme.pdf can be found inside the rar file)

Runner up is Battles on the Horizon from Barbagann Studio

Download Battles on the Horizon

(For instructions and other info on the game can be found in this README)

Check out the other games from St. Martin's Institute of I.T.

Filed under: Uncategorized No Comments