The Enchanted Cave 2
Delve into a strange cave with a seemingly endless supply of treasure, strategically choos
4.39 / 5.00 38,635 ViewsGhostbusters B.I.P.
COMPLETE edition of the interactive "choose next panel" comic
4.09 / 5.00 15,161 ViewsSo I've been messing around a bit, looking at a few platformer game tutorials, and such... I whipped up a basic platformer test in a half hour or so, and I'm wondering what you guys think. It needs a lot of work (obviously), but I'm getting there. This is honestly my real first go at action script. I have no other choice though because it seems as if no one wants to help me with coding a game I really want to create.
PLAY HERE.
(Move around with arrow keys)
It's still in the beta stages, and no that ugly enemy won't be there in the actual game. This is beta, I repeat BETA.
There are a few things I'm wondering about. One of them is why does he seem to walk below the top of actual lining of the ground, but when you jump it gets him back into the right place? And also, I have to figure out how to make him pop up in his original spot if he falls off or whatever. I also have to create barriers so he can't run to infinity on the left side of the screen either. >_<
Well, this is about a few minutes worth of work. Cheers.
The features I really want to include in the game is the following:
+Health
+Borders/Barriers (so the characters don't run off the sides of the screen)
+Camera that follows the character as they run across the screen.
+Coin system that'll count up when you collect them
+Heart system that you'll collect to get your health back up when hurt.
+Lives - A system where you'll have three lives, but also be able to achieve more.
++Lives V2. - After you die, you'll be sent to a GAME OVER SCREEN.
+Scene activation - After you beat a level, a flash animation scene plays, than after it goes back into the gameplay.
+When you fall off a cliff or something of that sort, you pop back where you first started.
+Random movement for enemies
+Health system for enemies
+Boss battles randomization movements
+Pause button
+High Score button (goes with coins) For example, you collected 30/40 coins, and percentage
+Weapon pick up for character
+Key to use weapon
This is just only a few things I can pick up at the top of my head, but I really want to create a game. I have a silly storyline in mind for it, so hopefully it'll work. I totally don't mind doing the scripting, I just would like to know what kind of AS scripts I'm going to need to even complete the tasks above.
You can improve it putting some invincible frames to it, it's looking good.
..::: AS3: Little Essay :::....:::AS3: Programming Sex:::..
||Nosejobs only result in bigger noses.||
Just throwing it out there: I've got a rudimentary system int he works at the moment. It needs a bit more expansion but it's solid at the moment. If you want to team up I've got a game that needs an artist. :)
At 2/12/09 02:20 PM, Deathcon7 wrote: Just throwing it out there: I've got a rudimentary system int he works at the moment. It needs a bit more expansion but it's solid at the moment. If you want to team up I've got a game that needs an artist. :)
Hm... I guess PM me with details of the game, and the rudimentary system, and we can talk about it =)
Correction: Beta phase is when you've finalized all the features and have a running version which only needs tweaking and expansion.
What you presented to us would be an Alpha (first, testing build) or more accurately a pre-Alpha.
At 2/12/09 02:57 PM, ThePeasant wrote: What you presented to us would be an Alpha (first, testing build) or more accurately a pre-Alpha.
Hm, alrighty. Thank you so much for the correction. I'd love more takers to help me though =)
You should make a black square in the bottom of the pit, turn it into a movieclip and when the character touches it, you loose.
All the things you're asking for are just variable stuff. Once you learn variables, you won't even have to read the rest of this post.
+Health
You've already managed the health bar, but if you didn't use _xscale, you need to learn it. Simply create a Movie Clip with this script on it:
onClipEvent(enterFrame){
_xscale=_root.health;
}
Just make sure you create a health variable. Then put some script on your player like:
if(_root.health<1){
gotoAndStop("dead");
}
And of course set the variable to 100 on whatever frame you want.
+Borders/Barriers (so the characters don't run off the sides of the screen)
Stuff like this on the player:
if(this._x<0){
this._x=0;
}
The code is pretty self explanatory, and some things will vary if your screen size is a little funky.
+Camera that follows the character as they run across the screen.
VCam? Look up FeindishDemon's tutorial.
+Coin system that'll count up when you collect them
Make a variable score on the frame, by putting score=0; on the menu screen or the screen for the first level. On a Movie Clip for the coin, put:
onClipEvent(enterFrame){
if(this.hitTest(_root.player)){
_root.score+=1;
unloadMovie(this);
}
}
Make sure to give the Movie Clips appropriate instances.
+Heart system that you'll collect to get your health back up when hurt.
Health Pack Script:
onClipEvent(enterFrame){
if(this.hitTest(_root.player)){
_root.health+=25;
unloadMovie(this);
}
+Lives - A system where you'll have three lives, but also be able to achieve more.
On the script I gave you where it says gotoAndStop("dead"); change the entire line to:
this._x=whateverstartingxvalue;
this._y=whateverstartingyvalue;
_root.lives-=1;
And of course make the first menu screen or whatever say lives=3;
++Lives V2. - After you die, you'll be sent to a GAME OVER SCREEN.
On the player:
onClipEvent(enterFrame){
if(_root.lives<1){
gotoAndStop("dead");
}
}
+Scene activation - After you beat a level, a flash animation scene plays, than after it goes back into the gameplay.
if(whateverwinconditionhere){
_root.nextFrame();
}
Put a Movie Clip with your scene inside of it. On the last frame, put _root.nextFrame, and make the next frame on the main stage have your next level.
+When you fall off a cliff or something of that sort, you pop back where you first started.
On the player (within an enterFrame handler):
if(this._y>600){
this._y=startingy;
this._x=startingx;
}
+Random movement for enemies
Random movement? That would be pretty stupid looking if you scripted it the way I think you mean.
this._x+=random(10);
this._x-=random(10);
+Health system for enemies
Just give them their own health variables, and if you want, use the same health bar technique I gave you. Just make sure to give the variables a different name, like enemy1hp or something.
+Boss battles randomization movements
Same as before, be more clear.
+Pause button
Ouch, hard. There's something about it in the tutorial section, it's got something to do with suspending all listed script or something.
+High Score button (goes with coins) For example, you collected 30/40 coins, and percentage
Dynamic text box with the variable (called 'var' in the Properties panel) score like I gave you before, then put static text that says /40 or whatever many). If you want a leaderboard, ask MochiAds or learn sockets and PHP.
+Weapon pick up for character
Make weapons have the same script as health packs, but change _root.health+=25 to:
_root.player.weapon.gotoAndStop("whichever");
And make a Movie Clip inside the player with the instance 'weapon.' Put a stop action on the first frame and make each frame have a different weapon.
+Key to use weapon
On the player:
if(Key.isDown(keycode here){
this.weapon.gotoAndStop("whatever");
}
Key codes here: http://my.safaribooksonline.com/03213941 51/app03lev1sec1?portal=oreilly#app03lev 1sec1
If you created the platform engine yourself, you're pretty good for a newbie, but if you used a copy/paste tutorial, sorry kid, but you're hopeless.
If I offer to help you in a post, PM me to get it. I often forget to revisit threads.
Want 180+ free PSP games? Try these links! - Flash - Homebrew (OFW)
The jumping is wrong. It jumps higher when I hold down Up.
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
Needs a way bigger jump. You can't avoid the enemy. So work on that.
Um....PM me, cos over here i don't have time you know O_o
Slint approves of me! | "This is Newgrounds.com, not Disney.com" - WadeFulp
"Sit look rub panda" - Alan Davies