Newgrounds.com — Everything, By Everyone.

Checking login status…

USERNAME:

PASSWORD:

Logging in…

Logged in as:
.
Logging out…
Inbox My Account Log Out


Forum Topic: platform game

(122 views • 4 replies)

This topic is 1 page long.

<< < > >>
None

TorskMunken

Reply To Post Reply & Quote

Posted at: 12/4/07 11:49 AM

TorskMunken LIGHT LEVEL 07

Sign-Up: 10/20/07

Posts: 51

im a noob in flash and as. I would like to make an platform game, thats not buggy and where you can jump and other things. What i especially want to know is how i can calculate the angle of a drawed object and calculate it into the characters _rotation. thanks if someone helps me


None

ColbyCheeze

Reply To Post Reply & Quote

Posted at: 12/4/07 12:45 PM

ColbyCheeze NEUTRAL LEVEL 08

Sign-Up: 11/30/07

Posts: 75

Is it tile based or are you going to draw out your own levels? If you draw out your own you can probably just make a blank wall MC and a floor MC with hit detect code inside that moves the player back. Then resize / overlay the MCs over your level.

As far as angle is concerned you will need to use sin / cos.

so if I wanted to move a bullet at a 45 degree angle with a speed of 20 here is the code.

//must convert the angle to radians for the Math functions to work
bulletSpeed = 20;
angle = 45*(Math.PI / 180);
vX = Math.cos(angle)*bulletSpeed;
vY = Math.sin(angle)*bulletSpeed;

bullet._x += vX;
bullet._y += vY;

This may or may not answer your question...but you weren't too clear.

Game Development Blog: Tutorials, games, and more
www.cheezeworld.com

BBS Signature

None

TorskMunken

Reply To Post Reply & Quote

Posted at: 12/4/07 01:34 PM

TorskMunken LIGHT LEVEL 07

Sign-Up: 10/20/07

Posts: 51

im going to draw out my own lvls. its going to be something like super mario but with "curved" floors, so i want the character to stand in the same way as the floor is tilting. Or something like that.


None

Nuggs

Reply To Post Reply & Quote

Posted at: 12/4/07 05:00 PM

Nuggs LIGHT LEVEL 18

Sign-Up: 12/17/05

Posts: 1,201

You should look Here for an all- code based way of doing it.
It is the only way I know of that it can be done.

Games|1|2|3| Movies|1|2|

BBS Signature

Elated

TorskMunken

Reply To Post Reply & Quote

Posted at: 12/6/07 10:01 AM

TorskMunken LIGHT LEVEL 07

Sign-Up: 10/20/07

Posts: 51

thanks! it helped me very mutch, i didnt know that it really was this easy


All times are Eastern Daylight Time (GMT -4) | Current Time: 04:43 PM

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