Tuesday, 17 December 2013

Sunday, 10 November 2013

NextCastle DevCup and November #1GAM

I took part in NextCastle DevCup, which goal was to create game in 7 days with theme HOTSEAT. The main requirement of the theme was that the game should be possible to play for a minimum of two people on one monitor and one keyboard. I ended up with the "Snake and Mouse" game. First player control a snake, second a mouse. The Snake has 20 seconds to catch the mouse, after this time, the roles will be reversed.

With this game I also join http://www.onegameamonth.com competition, and luckily, november theme "CHANGE" matches to my game.

https://dl.dropboxusercontent.com/u/214486571/unity/Paint.html *0.2mb

Start page and character icons: Magdalena DÄ™bowicz 

Sunday, 19 May 2013

How to find all objects that are in collision with specified object.

While scripting bowling system I had to solve problem to monitor amount of ball in the arm, and control new ball providing.

Every time, when on the upper arm there is less than three ball I want to provide new ball. To find out how many balls is actually on arm, I was searching in unity for something like getListOfObjectsInWhichImInCollision(). What I found is Physics.OverlapSphere which "Returns an array with all colliders touching or inside the sphere." The point is, that sphere is not the shape that I could use for my problem so I made class for arm and override functions OnCollisionEnter/OnCollisionExit.
 class UpperArm extends MonoBehaviour {  
   private var ballAmount : int = 0;  
   private var ballTag = "Ball";  
   function OnCollisionEnter(c : Collision) {  
     if (itsBall(c)) {  
   function OnCollisionExit(c : Collision) {  
     if (itsBall(c)) {  
   function itsBall(c : Collision) {  
     return ((ballTag == c.transform.tag) ? true : false);  
I needed only amount of balls on arm. If You need to have list of this objects: add a list variable and update it in onEnter/onExist function.

Monday, 13 May 2013

Importing models from Google SketchUp

After a little play with Unity, I realize that this is not good program for modelling.
I have luck to have fiancee who work with Google SketchUp, so She will be modelling for me.

I was very surprised how easy it is to import such model to Unity. You need to export it from SketchUp to Collada (DAE) format and simply drag file to Assets folder in Unity. Such imported model will not have material, and texture, so You have to copy textures from SketchUp project and drag them on the models in unity. This is how it looks:

Sunday, 13 January 2013

About me

Hi guys. I'm a Java programmer, who always want to make games.  My first game like project was a  simple football match simulator In Java, with 2D visualization by HTML5 + CANVAS + GWT:

I was researching how can I make cool 3D visualization using Java and found out that would be a way of pain. Then I decide to use some of game engines and found Unity is something I was looking for. My goals are to learn Unity, create small games with it, and make 3D view for my football simulator.
On this blog I want to show my experiments with learning Unity from the beginning.

So how to start.
After downloading unity4, I opened example project (AngryBots), play with it and think: ok how to begin?
I found that the best sources to learn are Official Manual and  Free Video Course.
Interesting think is also Unity cheat sheet  which is "collection of Unity doc links based on team member role". Then I create this blog, and start with manual..