Wednesday, July 28, 2010
Going Going Going Gaming
[code]
for each (var existingBlock:FlxBlock in levelBlocks)
{
collisionWithExistingBlocks = existingBlock.overlaps(newRandomBlock);
if (collisionWithExistingBlocks) break;
}
++loopCount;
}
while (collisionWithExistingBlocks && loopCount < MAXIMUM_RANDOM_PLACEMENT_ATTEMPTS);
this.levelBlocks.add(this.add(newRandomBlock)); }
[/code]
Yeah so much for a simple translation, since the android / java sdk does not like the FOR EACH statement, so I tried a few variations of this theme, but to no avail
[code]
for(int i = 0; i < this.map.lastIndexOf(newRandomBlock); ++i)
//for(int i = this.map.indexOf(existingBlock); i < this.map.lastIndexOf(existingBlock); i++)
{
FlxBlock existingBlock = (FlxBlock) map.get(i);
collisionWithExistingBlocks = existingBlock.overlaps(newRandomBlock);
if (collisionWithExistingBlocks) break;
}
++loopCount;
}
while (collisionWithExistingBlocks && loopCount < MAXIMUM_RANDOM_PLACEMENT_ATTEMPTS);
this.map.add(this.add(newRandomBlock));
}
[/code]
So, I am waiting for that eureka! moment to happen in which suddenly the fog of why its not working correctly hits me and I say BUT of course, while I research Java For Loops. Unfortunately I cant use a =< method because thats a boolean not an int and the commented statement did not work either. So I am thinking the block arrays never collide since it never actual maps to the last block. I also tried FlxG.collideArrayLists(newRandomBlock, existingBlock) however, I can not set a break because that is not part of a loop it would seem, which will not let me compile. Maybe I will try it anyway and see if it implies a break inside of FlxG core. Do not know; however, I did add the enemies and working on fixing up the spark.png since a 1x1 pixel causes Android to do crazy things.
Also been playing around on the Storm8 games (ALL of them to be exact). I like the format of the development and the text of the game. Its a like a mini game I can play for 5 minutes an hour and then not touch it for 4 hours and then come back and be pleasantly surprised. Just a word of advice, not always having a HUGE hoard is not a bad thing. Your companions need to grow with your equipment lest you be unable to defeat other players. My Ninja horde is 50 strong and I only have enough equipment for 10, OUCH. However, in the Rock Band game, I have a band of 4 and enough equipment for all 4 members to dominate everyone. So equipment / abilities have to grow with the number of players in your horde or you can not defeat other players.
Sunday, July 25, 2010
APK File Downloads
Flixel Defender / Flixel Tutorials
I finished two Flixel tutorials today. One is a Defender-esque demo shooter. It includes a simple enemy that floats at you which you have to kill. I need to read up on creating a high score record for between games, thus far my record is 1030.
The other tutorial is a semi-platform style game by Matthew Casperson, whom is resposible for porting Flixel to Android. Currently it is a simple platform with 4 enemies to kill. It is this work that got me excited to start building Android Flixel games. However, it also humbled me some as well, since it was my first run with Java coding and took me a little while to get my development enviroment up and running.
So I am contemplating placing the apk file links for download for those interested in playing around with the Demos. Just not sure since none of the work is mine, other than the porting to Android.
Saturday, July 24, 2010
Welcome to my Android Development Blog
welcome to my blog about Android application development. So far I have setup my development IDE with the Android SDK. I am also using Flixel as me primary 2D gaming engine.
I am also suprised at the lack of what I consider core games on the Android Market. Games like Asteroids, Defender, PacMan, Centipede, and 1942 classics.