Forum Topic: Platformer Engine

(717 views • 49 replies)

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
Kissing

zrb

Reply To Post Reply & Quote

Posted at: 6/15/08 08:59 PM

zrb LIGHT LEVEL 11

Sign-Up: 08/08/06

Posts: 4,562

actually, i didnt use that tut! Never even knew it existed. i was looking thru gravity tuts around the net...and then while statements. and i are made this.

Ok well my applogies, since its a very popular tutorial. Since you did it by yourself, congrats.

School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||

BBS Signature

None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/20/08 10:39 PM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

**OMFG UPDATE**

OMG added basic AI omfg lolol. on the second level the lil block with arrow is the enemy. plz tell me how to improve the AI, cuz its kinda glitchy/awkward. i disabled dying bcuz its hard to test when u die every 3 seconds by trying stuff out. ul have to finish level 1 to get to level 2, u dont have to collect the coins if u dont want to.

ZOMG TEH ZOMG LINKZ: http://spamtheweb.com/ul/upload/200608/7 4210_Platformer_Game_engine.php

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 12:06 AM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

oh well, lol no body is teh postingz omgz oh wellz...

oh heres the link for it STARTING right at lvl 2.

http://spamtheweb.com/ul/upload/200608/7 9584_Platformer_Game_engine.php

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

Leering-Abstemiously NEUTRAL LEVEL 02

Sign-Up: 06/18/08

Posts: 130

Your no artist, but the code is solid and it runs pretty smoothly. Good job!


None

Toast

Reply To Post Reply & Quote

Posted at: 6/21/08 02:00 AM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,929

At 6/15/08 08:18 AM, CaiWengi wrote:
At 6/15/08 01:38 AM, dadancinman wrote:
At 6/15/08 01:30 AM, ThePeasant wrote: he kinda floats when he jumps... he needs to fall at an acceleration rate of 9.8 always. ALWAYS!
9.8? OKAY got it! lol!
I think he means 0.98.

I think it was a reference to earth's gravity force which is around 9.8m/s² in most parts of the globe.


None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 02:02 AM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

At 6/21/08 01:56 AM, Leering-Abstemiously wrote: Your no artist, but the code is solid and it runs pretty smoothly. Good job!

haa.
lol ive said this b4, and il say it again. GRAPHICS ARE NOT FINAL!! when i finish the engine, im gonna start again with a blank document, and remake ALL the graphics, then i already have to code so yeah.

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

Leering-Abstemiously NEUTRAL LEVEL 02

Sign-Up: 06/18/08

Posts: 130

At 6/21/08 02:02 AM, dadancinman wrote:
At 6/21/08 01:56 AM, Leering-Abstemiously wrote:
haa.
lol ive said this b4, and il say it again. GRAPHICS ARE NOT FINAL!! when i finish the engine, im gonna start again with a blank document, and remake ALL the graphics, then i already have to code so yeah.

sorry, I didn't care to read other posts. c: excuse me.


None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 02:07 AM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

At 6/21/08 02:03 AM, Leering-Abstemiously wrote:
At 6/21/08 02:02 AM, dadancinman wrote:
At 6/21/08 01:56 AM, Leering-Abstemiously wrote:
haa.
lol ive said this b4, and il say it again. GRAPHICS ARE NOT FINAL!! when i finish the engine, im gonna start again with a blank document, and remake ALL the graphics, then i already have to code so yeah.
sorry, I didn't care to read other posts. c: excuse me.

lol thx for postive comment tho. still working on the AI, and adding weapons..then im gonna mes around wiht it, i might make it so there will be like doors, and u need to get thru them to get to the next lvl, and to unlock doors u play minigames and such. along with running around shooting enemies and collecting coins. sound good?

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

Happy

rtb427

Reply To Post Reply & Quote

Posted at: 6/21/08 02:11 AM

rtb427 DARK LEVEL 10

Sign-Up: 03/12/08

Posts: 74

Try to make the controls Arrow Keys! Most of the games are Arrow Key controled. It is very confusing when you have to move with WAD!

rtb427

BBS Signature

None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 02:14 AM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

At 6/21/08 02:11 AM, rtb427 wrote: Try to make the controls Arrow Keys! Most of the games are Arrow Key controled. It is very confusing when you have to move with WAD!

how bout i make an option to select either one?

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

None

Toast

Reply To Post Reply & Quote

Posted at: 6/21/08 02:15 AM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,929

Found a bug where you can sometimes pass through walls or floors when you bounce off those red things.


None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 02:18 AM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

At 6/21/08 02:15 AM, Toast wrote: Found a bug where you can sometimes pass through walls or floors when you bounce off those red things.

what happend exactly? do u go rite thru, and fall forever? which one? all of them? how far do u go? i need to no these things.

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

Happy

rtb427

Reply To Post Reply & Quote

Posted at: 6/21/08 02:24 AM

rtb427 DARK LEVEL 10

Sign-Up: 03/12/08

Posts: 74

At 6/21/08 02:14 AM, dadancinman wrote:
At 6/21/08 02:11 AM, rtb427 wrote: Try to make the controls Arrow Keys! Most of the games are Arrow Key controled. It is very confusing when you have to move with WAD!
how bout i make an option to select either one?

Sounds good to me! I am sure I would get use to WAD but it would take awhile, since everyone is use to Arrow Keys the game would be more injoyable!

rtb427

BBS Signature

None

Toast

Reply To Post Reply & Quote

Posted at: 6/21/08 02:26 AM

Toast DARK LEVEL 09

Sign-Up: 04/02/05

Posts: 8,929

I couldn't get a screenshot of it, it's a pretty rare bug. I was basically jumping up and down on the trampoline and I went through the wall in the picture. I didn't fall into emptiness but I thought it would be worth mentioning it because you might be able to fix it easily.

Platformer Engine


None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 6/21/08 07:10 AM

GuyWithHisComp LIGHT LEVEL 27

Sign-Up: 11/10/05

Posts: 4,008

At 6/15/08 01:20 AM, LuxGamer wrote: Ive been trying to write something like this forever!!! Can you PM me the code???... lol i know that sounds like im going to copy your work but im not i just wanna study it xP

A simple platformer script, like that, is really easy to make.

Here, I'll share you a code I wrote right now in about 5-6 minutes, yeah it's that easy.

Draw your character, convert to MovieClip, place the registration point (the plus mark) at the bottom, in the middle of his feet. Instance name it: p

Draw your ground and walls and all that shiz, convert to MovieClip. Instance name it: g

Now put this on the frame's ActionScript:

// By GuyWithHisComp - Do NOT remove this line or your head will a splode!

var speed = 6;
var jumpSpeed = 11;
var fallRate = 0.5;

p.onEnterFrame = updatePlayer;
var yspd = 0;
var hitGround = 0;

function updatePlayer ():Void
{
	this._x += (Key.isDown(Key.RIGHT)-Key.isDown(Key.LEFT)) * speed;
	this._y += yspd += fallRate;
	
	var hitGround = false;
	while (g.hitTest(this._x, this._y, true))
	{
		this._y -= .1;
		yspd = 0;
		hitGround = 10;
	}
	while (g.hitTest(this._x, this._y-this._height, true))
	{
		this._y += .1;
		yspd = 1;
	}
	while (g.hitTest(this._x-(this._width/2), this._y-(this._height/2), true)) this._x += .1;
	while (g.hitTest(this._x+(this._width/2), this._y-(this._height/2), true)) this._x -= .1;
	
	if (hitGround-->0 && Key.isDown(Key.UP)) yspd = -jumpSpeed;
	
	_x += (-this._x-_x+275)/4;
	_y += (-this._y-_y+200)/4;
}

Couldn't be easier, so little code.

BBS Signature

None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 6/21/08 07:17 AM

GuyWithHisComp LIGHT LEVEL 27

Sign-Up: 11/10/05

Posts: 4,008

At 6/21/08 07:10 AM, GuyWithHisComp wrote: var hitGround = false;

Oh gawd, how did that get there?
Ignore that line. Stupid AS2 won't give me errors...

BBS Signature

None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 03:42 PM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

At 6/21/08 02:26 AM, Toast wrote: I couldn't get a screenshot of it, it's a pretty rare bug. I was basically jumping up and down on the trampoline and I went through the wall in the picture. I didn't fall into emptiness but I thought it would be worth mentioning it because you might be able to fix it easily.

oh yeah no, thats just cuz of the thickness of the wall, and the angle ur going at, no worries when i start to do final graphics, that will be fixed.

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 04:35 PM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

omg what shud i do...should i make it so u have weapons and u run around and kill teh enemies collecting coins and such...or shud i make it u run around collect coins and play teh minigames to get thru doors while avoiding enemies and u can kill enemies by jumping on there head. what shud i do!?

weapon, or minigames? im gonna go with minigames unless some 1 convinces me not to.

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

None

ZombieKangaroo

Reply To Post Reply & Quote

Posted at: 6/21/08 04:44 PM

ZombieKangaroo NEUTRAL LEVEL 22

Sign-Up: 04/21/06

Posts: 1,666

This actually has an awful lot of potential once you get proper graphics and a bit of a storyline to go along with it. Don't keep it as a generic platformer, put something new in like a choice of character, a vehicle for a level or two or something completely different like meteors or acid falling from the sky as you go along. Good luck.

BBS Signature

None

dadancinman

Reply To Post Reply & Quote

Posted at: 6/21/08 04:56 PM

dadancinman EVIL LEVEL 05

Sign-Up: 02/05/08

Posts: 414

At 6/21/08 04:44 PM, ZombieKangaroo wrote: This actually has an awful lot of potential once you get proper graphics and a bit of a storyline to go along with it. Don't keep it as a generic platformer, put something new in like a choice of character, a vehicle for a level or two or something completely different like meteors or acid falling from the sky as you go along. Good luck.

yes ur right! screw weapons, im keeping just plain old obsticals and ...yes the ideas are coming!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Click on my sig! The Boom! Headshot Collab!
Join now!

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 04:31 PM

<< Back

This topic is 2 pages long. [ 1 | 2 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!