Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Help porting a game — Gideros Forum

Help porting a game

Unknown Member
edited May 2012 in Game & application design
Hi,
I plan to change from flash (as3) to Gideros and need some help to start. I thought my first game should be based on an array of units that jumps around an other array of planets by clicking the planets. It is a strategy game so both the planes and units must be able to move, rotate and change appearance. Some of the code used to look like:

//add planets
var planet:Array = new Array();
for (var i=1; i < NumberOfPlanets + 1; i++) {
var TempPlanet:Planet = new Planet();
planet[i]=TempPlanet;
addChild(planet[i]);
//planet[i].addEventListener(MouseEvent.CLICK, clickPlanet);
planet[i].gotoAndStop(i);
planet[i].width = planet[i].width * GameScale;
planet[i].height = planet[i].height * GameScale;
planet[i].development = 0;
}

//Add units to the game
var unit:Array = new Array();
for (var j=1; j < NumberOfUnits + 1; j++) {
var TempUnit:Unit = new Unit();
unit[j]=TempUnit;
addChild(unit[j]);
unit[j].gotoAndStop(j);
unit[j].visible=false;
unit[j].width = unit[j].width * GameScale;
unit[j].height = unit[j].height * GameScale;
}

I would also like be able to click a planet and know witch element I clicked (i), collision between the units and planets. Is there a similar game example in Gideros?

Sincerely,
Max Tillberg

Dislikes: sdouglas, tuanleanh

+1 -1 (+0 / -2 )Share on Facebook
Sign In or Register to comment.