Forum Topic: Wtf Why?!

(192 views • 11 replies)

This topic is 1 page long.

<< < > >>
Mad as Hell

JoeyCentral

Reply To Post Reply & Quote

Posted at: 8/3/09 04:54 PM

JoeyCentral EVIL LEVEL 07

Sign-Up: 10/29/08

Posts: 580

Why do I have to learn what gravity is JUST TO MAKE A GUY FUCKING JUMP?! I never learned physics, so it's kind of fucking hard to do advance shit like that. Also, I can't make something move without a proper math formula, which is bull shit! I mean, I didn't even do Geomerty yet, and yet it's a necessity to know trigonometry? Yeah, please tell me there's an alternative to learning this crap cuz I wanna know how to code.

BBS Signature

Angry

FlashtooREV

Reply To Post Reply & Quote

Posted at: 8/3/09 04:57 PM

FlashtooREV LIGHT LEVEL 06

Sign-Up: 06/09/09

Posts: 603

The alternative is to bookmark pages with the codes on them.

Ceterum censeo Carthaginem esse delendam.


Resigned

zuperxtreme

Reply To Post Reply & Quote

Posted at: 8/3/09 05:00 PM

zuperxtreme NEUTRAL LEVEL 08

Sign-Up: 01/02/05

Posts: 1,627

The alternative is to not make a game. Go learn Geometry, Trig., functions, some English, etc.

...


None

Afro-Ninja

Reply To Post Reply & Quote

Posted at: 8/3/09 05:06 PM

Afro-Ninja EVIL LEVEL 38

Sign-Up: 03/02/02

Posts: 13,467

At 8/3/09 04:54 PM, JoeyCentral wrote: Why do I have to learn what gravity is JUST TO MAKE A GUY FUCKING JUMP?! I never learned physics, so it's kind of fucking hard to do advance shit like that. Also, I can't make something move without a proper math formula, which is bull shit! I mean, I didn't even do Geomerty yet, and yet it's a necessity to know trigonometry? Yeah, please tell me there's an alternative to learning this crap cuz I wanna know how to code.

you don't have to know physics to understand the concept of gravity, you live in a world with it

what happens when you jump? you go up until the amount of energy used is no longer sufficient to escape the earth's gravitational pull, then you come back down.

Let's say in a game, when you jump, the character starts by moving upwards at 10px/frame. Obviously this will change over the course of the jump- if it didn't your character would just float up and away forever. So once the jump starts, just start subtracting an arbitrary amount each time to represent gravity pulling them back down. So for each frame let's say you subtract .1 px. Your speed will slowly work it's way down to 0 (the height of the jump) and into the negative, bringing you back down. When you detect touching the ground reset your speed var and have it ready for the next jump.

this is 'fake physics' because it doesn't use any real formulas and isn't based on the actual laws of gravity. It's just imitating them to look believable.

you'll need to know a little trig if you want to work with rotations, angles, arcs, curves, etc. you don't need to take a class in it though, you can just become familiar with some of the formulas to take care of the basics.

BBS Signature

None

JoeyCentral

Reply To Post Reply & Quote

Posted at: 8/3/09 05:25 PM

JoeyCentral EVIL LEVEL 07

Sign-Up: 10/29/08

Posts: 580

At 8/3/09 05:06 PM, Afro-Ninja wrote: you don't have to know physics to understand the concept of gravity, you live in a world with it

what happens when you jump? you go up until the amount of energy used is no longer sufficient to escape the earth's gravitational pull, then you come back down.

Let's say in a game, when you jump, the character starts by moving upwards at 10px/frame. Obviously this will change over the course of the jump- if it didn't your character would just float up and away forever. So once the jump starts, just start subtracting an arbitrary amount each time to represent gravity pulling them back down. So for each frame let's say you subtract .1 px. Your speed will slowly work it's way down to 0 (the height of the jump) and into the negative, bringing you back down. When you detect touching the ground reset your speed var and have it ready for the next jump.

this is 'fake physics' because it doesn't use any real formulas and isn't based on the actual laws of gravity. It's just imitating them to look believable.

you'll need to know a little trig if you want to work with rotations, angles, arcs, curves, etc. you don't need to take a class in it though, you can just become familiar with some of the formulas to take care of the basics.

I appreciate the response. Unfortunately, I could only comprehend soo much. You made a point, but it's just me that needs to get off my ass and start learning these things myself. Of course, I don't know enough AS to make a game, but I could always find out how.

BBS Signature

None

Genocide

Reply To Post Reply & Quote

Posted at: 8/3/09 05:28 PM

Genocide FAB LEVEL 11

Sign-Up: 04/22/03

Posts: 3,643

Put it simply joey, gravity doesn't exist in ANY FORM in flash. You substitute a variable with a number that you want your player to move down at. You could call this variable "massassfarthfox" and it would still act as a gravity force, pulling down.

check out these sites!
rewards1: http://tinyurl.com/ntlngb , prizerebel: http://tinyurl.com/lyg7qk ,
points2shop: http://tinyurl.com/nmqj5s

BBS Signature

None

thenakedchicken

Reply To Post Reply & Quote

Posted at: 8/8/09 10:23 PM

thenakedchicken LIGHT LEVEL 06

Sign-Up: 10/05/05

Posts: 111

yoyogames has game maker, which does everything for you and is free.


None

imdead597

Reply To Post Reply & Quote

Posted at: 8/8/09 10:38 PM

imdead597 DARK LEVEL 02

Sign-Up: 01/24/09

Posts: 66

well, in your character could go this:

onClipEvent(load){
var jumped:Boolean=false;
var jumpspeed:Number=7;
var gravity:Number=0;
}
onClipEvent(enterFrame){
if(!(this.hitTest(_root.floor))){
gravity+=1;
}
else{
gravity=0;
}
if(gravity>20){
gravity=20;
}
if(Key.isDown(Key.UP)){
jumped=true;
}
else{
jumped=false;
}
if(jumped){
gravity=0;
}
this._y+=gravity;
this._y-=jumpspeed;
}

so basically, if your not hitting the floor, gravity accelerates and u move down. if the up key is pressed, gravity gets reset and you move upward by jumpspeed pixels per second. if the up key is not pressed, then gravity will increase and you will start to move down.


None

fjgamer

Reply To Post Reply & Quote

Posted at: 8/8/09 10:39 PM

fjgamer EVIL LEVEL 08

Sign-Up: 08/15/08

Posts: 268

At 8/8/09 10:23 PM, thenakedchicken wrote: yoyogames has game maker, which does everything for you and is free.

Construct: http://www.scirra.com
It's more free and does even more for you and looks prettier.


None

Doomhammr

Reply To Post Reply & Quote

Posted at: 8/8/09 11:50 PM

Doomhammr EVIL LEVEL 31

Sign-Up: 12/15/99

Posts: 198

If you're interested at all in making Flash games, then you NEED to know algebra, trigonometry, and physics. Action script is a programming language and like most higher end languages, there's TONS of math involved. Nothing worth doing is easy.

"Glory is fleeting, but obscurity is forever." - Napoleon Bonaparte
www.idealsoldier.com
www.procoveragestudio.com

BBS Signature

None

thedayturns

Reply To Post Reply & Quote

Posted at: 8/9/09 03:24 AM

thedayturns NEUTRAL LEVEL 01

Sign-Up: 08/08/09

Posts: 12

At 8/8/09 11:50 PM, Doomhammr wrote: If you're interested at all in making Flash games, then you NEED to know algebra, trigonometry, and physics. Action script is a programming language and like most higher end languages, there's TONS of math involved. Nothing worth doing is easy.

This is incorrect. You don't need anything higher than algebra for 95% of the games on the portal, and even if trig is required, you can fake it with a little ingenuity. Some games (like mouse games) don't require math at all.


Shouting

PyroflameGames

Reply To Post Reply & Quote

Posted at: 8/9/09 04:41 AM

PyroflameGames NEUTRAL LEVEL 09

Sign-Up: 08/04/07

Posts: 1,969

You're a pretty good troll.

4 in 5 people found this post helpful, did you? Yes | No

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 01:30 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!