Ruller <3 Owner
Posts : 284 Join date : 2009-09-24 Age : 29 Location : Netherlands, Rotterdam
| Subject: A little game I made Tue 6 Nov 2012 - 11:33 | |
| So here it is. It's still in VERY EARLY beta. all it has is the core game, Collisions, gravity, Menu. thats it. Time spent: 3 Hours. Source is Included, open with Notepad++ or with Flash or with the standard Notepad but I doubt you will be able to read it. Please I want to know what you think about it. TODO LIST: - Add Score tracking. - DONE - Add Horizontally falling blocks - Add random intervals between blocks appearing - Add Difficulty modes. - KIND OF DONE - open for Any Ideas, COME ON!!again, Soure is included with a shit load of comments about what and how the methods and commands I used to make this game as it is. please check it out. - Spoiler:
you need FlashPlayer to play this game: http://get.adobe.com/nl/flashplayer/
- Spoiler:
For those who are to lazy to open the .as file.... - Code:
-
/* Made by Frans van der Pol A.K.A. .RaF|Ruller<3|MoW A.K.A. Snarfi */
import flash.events.Event;
var mc_box:zwart = new zwart(); var mc_enemy:enemy = new enemy();
//enums for gameplay var gravity:Number = 10; var enemySpeed:Number = 4; var jumpPower:Number = 0; var isJumping:Boolean = false; var ground:Number = 200 - mc_box.height; var score:Number = 0;
mc_enemy.x = 650; mc_enemy.y = ground + 10;
addChild(mc_enemy); addChild(mc_box);
//setInterval(spawnEnemy, 2500); //not going to use this in this early state
//EventListners stage.addEventListener(MouseEvent.MOUSE_DOWN, doJump); //let he stage check wether we press the LeftMouse Button. stage.addEventListener(Event.ENTER_FRAME, update); //this is an update Method refer to function update()
//jump Function function doJump(evt:MouseEvent):void { if(!isJumping) //if the player is NOT jumping then... { jumpPower = 30; //The jumpPower will be set to 30, this is the power that the player will use to jump. isJumping = true; //this Boolean (true or false option) will let the player jump when the left mouse is pressed. } }
function spawnEnemy() //this function is spawning a red block of sudden death when it has passed out of the stage. { mc_enemy.x = 650; //just positions mc_enemy.y = ground + 10; //more positions addChild(mc_enemy); //adding the object to the stage }
//Update Function, Checks EveryFrame. function update(evt:Event) // here we will put everything that should be check constantly such as collisions, movements etc.. { mc_enemy.x -= enemySpeed; //the speed wich the enemy will use to move across the screen. mc_box.x = stage.mouseX - mc_box.width * 0.5; //positions your player where your mouse is and follows it. //evt.updateAfterEvent(); //no need for this yet, it only smooths the gameplay but there's not much in here yet so this save some RAM aswell. //jumping Functions if(isJumping) //if the play IS jumping then.... { mc_box.y -= jumpPower; //the position of the player is being pushed upward by the defined jumpPower. jumpPower -= 2; //and this will make sure the play won't keep going up and up, when it reaches 0, then it will lose momentum. } if(mc_box.y + gravity < ground) //if the Y position + the gravity (wich is 10 by the way) is BIGGER than the the ground other words: if the player is ABOVE the ground then.... { mc_box.y += gravity; //the player will be pushed down. } else //if what is stated above not the case then.... other words: if the player is NOT above the ground.... { mc_box.y = ground; //then the player's pos. will be set to the grounds pos. other words: the player is kinda glued to the ground untl you press the left mouseButton again. isJumping = false; //setting the player to NOT jumping. } //Repeater for mc_enemy if(mc_enemy.x <= -50) //if theEnemy'sX pos. is -50 wich is out of the screen then... { removeChild(mc_enemy) //remove that object that has left the screen. spawnEnemy(); //call the function spawn Enemy wich will make a new enemy for you to jump over... AWESOME ! W00T!! FuckYEAH!! YAYAYAYWHFAEIFGGAKJEKEGKLAJEGLKSELGK derp. } //Colliders if(mc_box.hitTestObject(mc_enemy)) //if the player hits JUST the border of the block of sudden death then.... { trace("--Hit--") //trace a --HIT-- text in the Debug window, just for Developing only. textBoxes are still comming. mc_enemy.x = 650; //sets the block of death back the beginning of the screen to begin his journey to hit you once again. }
}
/* More to come, Stay tunes guys this is project that has nothing to do with school. I do this in my free time and I like it :D */
- Attachments
- BETA_BlockDodger_oldskool.zip
- You don't have permission to download attachments.
- (12 Kb) Downloaded 5 times
- BETA_BlockDodger_V02.zip
- Score Game
- You don't have permission to download attachments.
- (3.7 Mb) Downloaded 4 times
- BETA_BlockDodger_V03.zip
- Inscreasing Difficulti
- You don't have permission to download attachments.
- (3.7 Mb) Downloaded 1 times
Last edited by Ruller <3 on Fri 16 Nov 2012 - 4:19; edited 3 times in total | |
|
Ruller <3 Owner
Posts : 284 Join date : 2009-09-24 Age : 29 Location : Netherlands, Rotterdam
| Subject: Re: A little game I made Tue 6 Nov 2012 - 12:59 | |
| /Fixed Download Link
- New version comming soon. added thus far in theyet unreleased version:
- score tracking - Code optimations
//Released the score included game in a .exe file. Flash is still requird. but this is easier to open for noobs *cough*THE MASTER *cough*
Last edited by Ruller <3 on Tue 6 Nov 2012 - 13:17; edited 1 time in total | |
|
THE MASTER Owner
Posts : 656 Join date : 2011-09-01
| Subject: Re: A little game I made Tue 6 Nov 2012 - 13:10 | |
| its realy simply indeed but its nice if you can make that:O:D great shot! | |
|
Pallas Master RaF -Member
Posts : 309 Join date : 2011-08-28 Age : 22 Location : Montevideo,Uruguay
| Subject: Re: A little game I made Wed 7 Nov 2012 - 3:29 | |
| Its simple and funny to pass time if you are bored, first time i didnt knew how to play it but now i know very good how to play it.Great job! | |
|
Ruller <3 Owner
Posts : 284 Join date : 2009-09-24 Age : 29 Location : Netherlands, Rotterdam
| Subject: Re: A little game I made Thu 8 Nov 2012 - 10:55 | |
| /Updated Current release: v0.3 Changes: Increasing Difficultly.
Have fun.
Next up! Decreasing Difficulty and Block coming from multiple sides and a Game Over Screen. | |
|
Dangerous Clan Leader
Posts : 594 Join date : 2009-09-21 Age : 29 Location : The Netherlands! - Breda
| Subject: Re: A little game I made Fri 9 Nov 2012 - 12:51 | |
| wow i reached 84, that was epic xd | |
|
Ruller <3 Owner
Posts : 284 Join date : 2009-09-24 Age : 29 Location : Netherlands, Rotterdam
| Subject: Re: A little game I made Fri 9 Nov 2012 - 13:03 | |
| - Dangerous wrote:
- wow i reached 84, that was epic xd
Congratulations; You have no life xD | |
|
Dangerous Clan Leader
Posts : 594 Join date : 2009-09-21 Age : 29 Location : The Netherlands! - Breda
| Subject: Re: A little game I made Fri 9 Nov 2012 - 13:26 | |
| lol it was really easy, i did it in one try | |
|
Sponsored content
| Subject: Re: A little game I made | |
| |
|