The Daily Click ::. Forums ::. General Chat ::. Arg... I hate physics!
 

Post Reply  Post Oekaki 
 

Posted By Message

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
12th February, 2008 at 03:22:09 -

Just when you thought that physics could create any click game.. turns out that Newtonian physics is false! At least when it comes to calculated computer game accuracry. Arggh... now I have to spend another week re-making up formulas for my game.

Image Edited by an Administrator.

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
12th February, 2008 at 06:24:45 -

I'm not sure what kind of physics you're trying to do, but if you have MMF2 there is a physics extension for it now that might help you.

 
n/a

Muz



Registered
  14/02/2002
Points
  6499

VIP MemberI'm on a BoatI am an April FoolHonored Admin Alumnus
12th February, 2008 at 19:35:40 -

Hmm.. where do I find this physics extension?

 
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.

Image

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
12th February, 2008 at 20:35:52 -

Front page. (two words)



 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
12th February, 2008 at 20:43:32 -

the biggest problem you will encounter with newtonian physics is that you cannot possible get precision out of it in a pixel-per-pixel setting. Instead, try saving the positions of all your objects as a seperate variable then their X/Y 'real' positions, as say (PosX * 1000)


So for example, at the start of my frames I give each object a variable A where A = PosX * 1000, B where B = PosY * 1000. Then, after all the funky physics stuff is done calculating each frame, I position it as:

PosX = A / 1000
PosY = B / 1000



If you don't do that, its very hard to get velocities between 1 pixel/frame and 2 pixels/frame, and such.

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
12th February, 2008 at 22:01:18 -

That's like... tgf physics. MMF can do decimals.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
13th February, 2008 at 01:49:50 -

yeah but its bad at saving them.

if you've got everything saved as precision floats newtonian physics shouldn't have any problems whatsoever unless you're doing something thats relevant to time dilation and special relativity, which you arent

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Cazra

Crazy?

Registered
  24/07/2002
Points
  4472

Game of the Week WinnerVIP Member
13th February, 2008 at 10:56:59 -

scripted languages can use floating point X/Y coordinates casted as integers to draw to the screen.

 
n/a

axel

Crazy?

Registered
  05/02/2005
Points
  4766

Game of the Week WinnerYou've Been Circy'd!
13th February, 2008 at 11:03:29 -

@Pixelthief, Peblo: I use the exact same method myself, when building engines in MMF. It's the only way to make sure MMF doesn't lose any decimals along the way =P

 
n/a

Pixelthief

Dedicated klik scientist

Registered
  02/01/2002
Points
  3419

Game of the Week WinnerWeekly Picture Me This Winner!You've Been Circy'd!VIP MemberI like Aliens!Evil klikerThe SpinsterI donated an open source project
13th February, 2008 at 16:53:54 -

Yeah I don't use MMF nearly as much as TGF, so I'm not quite sure what the rules are. I'm pretty sure that general in-expression division will only yield integers if both the operands are integers, but will return decimals if you change them to be floating point. So in terms of the actual in-side of the expression, it shouldn't be a problem. However, I believe that it will only save the final result for an alterable value or global value as an integer, not a floating point, which makes it very hard to do one equation to find the slope of a line, and another to use it. Or other such thingies. Like in my TGF engine for gravity, I risk overrunning the overflow point by having more then 9 digit long numbers, since I need to find a 3 precision gravity division applied to a 3 precision velocity vector, then sum that into a 3 precision position (although those last two stack on top of each other)

 
Gridquest V2.00 is out!!
http://www.create-games.com/download.asp?id=7456

Peblo

Custom ratings must be 50 characters or less

Registered
  05/07/2002
Points
  185

Game of the Week WinnerVIP MemberI'm on a Boat360 OwnerAttention GetterThe Cake is a LieCardboard BoxHero of TimePS3 OwnerIt's-a me, Mario!
I'm a Storm TrooperSonic SpeedStrawberryI like Aliens!Wii OwnerMushroomGhostbuster!
13th February, 2008 at 17:36:23 -

You know MMF, I tried sticking up for you, but it just ends up you're just too broken.

 
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
~Belgarath

Codemonkey

Always Serious

Registered
  06/11/2007
Points
  164

Code MonkeyKlikCast StarVIP MemberAttention GetterWii Owner360 OwnerThe Cake is a LieCardboard BoxHero of TimeI'm a Storm Trooper
I'm on a BoatIt's-a me, Mario!PS3 OwnerSonic SpeedGOTM - SEPTEMBER 2009 - WINNER!Evil klikerPokemon Ball!I am an April Fool
14th February, 2008 at 15:45:19 -

I don't even get the physix extension which is suppossed to make it easier.

 
You can log off any time you like, but you can't ever leave.
   

Post Reply



 



Advertisement

Worth A Click