Forum Topic: I'm making a platform game...

(325 views • 19 replies)

This topic is 1 page long.

<< < > >>
Happy

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 05:16 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

I am making a platform game. Thanks to Newgrounds, I was able to learn the script I needed to make it. It will have an adjustable camera. The game is 2d and will have poor graphics and no animation on the character, but I'm getting better in flash. Any advice would be helpful.


None

Cybex2

Reply To Post Reply & Quote

Posted at: 6/21/06 05:17 PM

Cybex2 NEUTRAL LEVEL 02

Sign-Up: 06/20/06

Posts: 100

At 6/21/06 05:16 PM, Teh_Noobz_Killa wrote: Any advice would be helpful.

In advise you to improve the graphics and add animation.


None

Snubby

Reply To Post Reply & Quote

Posted at: 6/21/06 05:18 PM

Snubby FAB LEVEL 20

Sign-Up: 12/04/04

Posts: 3,145

Good luck! I would suggest not submitting it until those 'poor graphics' are improved. good luck, though.


None

AAF

Reply To Post Reply & Quote

Posted at: 6/21/06 05:19 PM

AAF NEUTRAL LEVEL 09

Sign-Up: 06/14/06

Posts: 538

add good graphic with animation on character .. this make a game good :)

.


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 05:20 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

At 6/21/06 05:18 PM, Snubby wrote: Good luck! I would suggest not submitting it until those 'poor graphics' are improved. good luck, though.

I'm not good at animation or graphics yet, but heres a preview

Controls:

Arrow keys to move camera

A to go left

D to go right

S to slow down in mid air

W to jump


None

EdpR

Reply To Post Reply & Quote

Posted at: 6/21/06 05:23 PM

EdpR DARK LEVEL 22

Sign-Up: 04/13/06

Posts: 598

1.- good graphics
2.- Sounds & music
3.- fun and entertaining

good luck.

...

BBS Signature

None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 05:24 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

At 6/21/06 05:23 PM, EdpR wrote: 1.- good graphics
2.- Sounds & music
3.- fun and entertaining

good luck.

What kind of music?


None

takumidesh

Reply To Post Reply & Quote

Posted at: 6/21/06 05:38 PM

takumidesh LIGHT LEVEL 08

Sign-Up: 06/11/06

Posts: 11

i think it would be better if you let the ball roll down hills and the camera should follow the ball but dont listen to me im a noob


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 05:58 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

At 6/21/06 05:38 PM, takumidesh wrote: i think it would be better if you let the ball roll down hills and the camera should follow the ball but dont listen to me im a noob

how do u make the camera follow the ball? and second how do you make him roll down hills?


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 06:00 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

At 6/21/06 05:38 PM, takumidesh wrote: i think it would be better if you let the ball roll down hills and the camera should follow the ball but dont listen to me im a noob

Oh yeah I forgot the code in the ball.

onClipEvent (load) {
grav = 0;
// sets falling speed
speed = 7;
// sets movement speed
jumpHeight = 15;
// sets height that you can jump
scale = _xscale;
// sets size
slowfall = .8;
// sets glide
}
onClipEvent (enterFrame) {
// happens every frame
grav++;
// makes you fall faster
_y += grav;
// makes your _y go up by the varaible grav
while (_root.ground.hitTest(_x, _y, true)) {
// when this is touching the ground
_y--;
// makes the y keep on going up, this enables slopes
grav = 0;
// make it so you dont fall
}
if (Key.isDown(68)) {
// when the d key is down
_x += speed;
// makes the x go up by the speed
_xscale = scale;
// makes it face right
if (_root.ground.hitTest(_x, _y+3, true)) {
// if it is touching the ground
this.gotoAndStop(1);
// goes to frame 1
} else {
// otherwise
this.gotoAndStop(2);
// stops at frame 2
}
} else if (Key.isDown(65)) {
// if that isnt happening and the a key is pressed
_x -= speed;
// makes the x go gown by the speed
_xscale = -scale;
// makes it face left
if (_root.ground.hitTest(_x, _y+3, true)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
// see other code for movign right
} else {
if (_root.ground.hitTest(_x, _y+3, true) && !Key.isDown(79)) {
// if this is touching the ground and o isnt pressed
this.gotoAndStop(3);
// stops at frame 3
}
}
if (Key.isDown(83)) {
// if the s key is down
grav *= slowfall;
// slows down the gravity by multiplying it by the slowfall varialbe
}
if (Key.isDown(79) && !Key.isDown(87) && !Key.isDown(65) && !Key.isDown(68)) {
// if 0 is down, and a s d w arent
this.gotoAndStop(4);
// goes to frame 4
}
if (Key.isDown(87) && _root.ground.hitTest(_x, _y+3, true)) {
// if w is pressed and it is touching the ground
grav = -jumpHeight;
// makes gravity negative jumpheight, causes jump
_y -= 4;
// makes the y go up by 3
this.gotoAndStop(2);
// stops on frame 2
}
if (_root.ground.hitTest(_x+(_width/2), _y-(_height/2), true) || _root.ground.hitTest(_x+(_width/2), _y-((_height/6)*4), true)) {
_x -= speed;
}
if (_root.ground.hitTest(_x-(_width/2), _y-(_height/2), true) || _root.ground.hitTest(_x-(_width/2), _y-((_height/6)*4), true)) {
_x += speed;
}
if (_root.ground.hitTest(_x, _y-_height, true)) {
grav = 2;
}
// these all check for 2 points along the sides and top, to see if it is hitting a wall
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) {
_x -= 10;
} else if (Key.isDown(Key.LEFT)) {
_x += 10;
}
}
onClipEvent(enterFrame) {
if(Key.isDown(Key.DOWN)) {
_y -= 10
}
if(Key.isDown(Key.UP)) {
_y += 10
}
}


None

MadGiraffe

Reply To Post Reply & Quote

Posted at: 6/21/06 06:01 PM

MadGiraffe NEUTRAL LEVEL 10

Sign-Up: 01/07/05

Posts: 1,350

At 6/21/06 05:58 PM, Teh_Noobz_Killa wrote:
At 6/21/06 05:38 PM, takumidesh wrote: i think it would be better if you let the ball roll down hills and the camera should follow the ball but dont listen to me im a noob
how do u make the camera follow the ball? and second how do you make him roll down hills?

I got the slight feeling you copy and pasted that code, because if you didn't you'd be able to figure that out yourself. You even left in the notes.


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 06:13 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133


I got the slight feeling you copy and pasted that code, because if you didn't you'd be able to figure that out yourself. You even left in the notes.:

I did copy and paste it. Thats why I'm asking.


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 06:39 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

Anyone know how to make the camera follow the ball?


None

phyconinja

Reply To Post Reply & Quote

Posted at: 6/21/06 06:40 PM

phyconinja EVIL LEVEL 25

Sign-Up: 09/18/04

Posts: 2,838

At 6/21/06 06:39 PM, Teh_Noobz_Killa wrote: Anyone know how to make the camera follow the ball?

just move everything else!!


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 06:42 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

At 6/21/06 06:40 PM, phyconinja wrote:
At 6/21/06 06:39 PM, Teh_Noobz_Killa wrote: Anyone know how to make the camera follow the ball?
just move everything else!!

What do you mean, have the backround move? That causes glitches...Already tried...


None

UknownXL

Reply To Post Reply & Quote

Posted at: 6/21/06 06:44 PM

UknownXL EVIL LEVEL 09

Sign-Up: 05/22/05

Posts: 988

First of all learn action script. It will make things a whole lot easier, trust me.

But here is the code for the camera t follow the ball.

onClipEvent(enterFrame){
this._x = _root.ball._x;
this._y = _root.ball._y;
}


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 06:50 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133

At 6/21/06 06:44 PM, Uknown_Game_Fan wrote: First of all learn action script. It will make things a whole lot easier, trust me.

But here is the code for the camera t follow the ball.

onClipEvent(enterFrame){
this._x = _root.ball._x;
this._y = _root.ball._y;
}

Where do i put it?


None

MadGiraffe

Reply To Post Reply & Quote

Posted at: 6/21/06 06:57 PM

MadGiraffe NEUTRAL LEVEL 10

Sign-Up: 01/07/05

Posts: 1,350

At 6/21/06 06:50 PM, Teh_Noobz_Killa wrote:
At 6/21/06 06:44 PM, Uknown_Game_Fan wrote: First of all learn action script. It will make things a whole lot easier, trust me.

But here is the code for the camera t follow the ball.

onClipEvent(enterFrame){
this._x = _root.ball._x;
this._y = _root.ball._y;
}
Where do i put it?

If you would just understand the code, and read trought the tutorial you copied that from, read trough the notes that are there, try figuring out what everything does and how it works, then you won't have to ask questions for every teensy problem you encounter.
Then it's YOU who makes the game, instead of it actually being us.

well them, I haven't actually been helpful

You put that on the background btw.


None

TehNoobzKilla

Reply To Post Reply & Quote

Posted at: 6/21/06 07:00 PM

TehNoobzKilla EVIL LEVEL 03

Sign-Up: 06/18/06

Posts: 133



You put that on the background btw.

Tried, doesnt work


None

Nick-2

Reply To Post Reply & Quote

Posted at: 6/21/06 07:01 PM

Nick-2 LIGHT LEVEL 02

Sign-Up: 06/21/06

Posts: 36

it depends on how you're moving the screen. if you are using the vCam then you can just replace the:
onClipEvent(enterFrame){
if(Key.isDown(Key.LEFT)){
_x-=5
}
if(Key.isDown(Key.RIGHT)){
_x+=5
}
if(Key.isDown(Key.UP)){
_y-=5
}
if(Key.isDown(Key.DOWN)){
_y+=5
}
}

with:

onClipEvent(enterFrame){
_x-=(_x-_root.ball._x)/10;
_y-=(_y-_root.ball._y)/10;
}


All times are Eastern Standard Time (GMT -5) | Current Time: 08:07 AM

<< Back

This topic is 1 page long.

<< < > >>
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!