Author Topic: Physics help  (Read 11302 times)

0 Members and 1 Guest are viewing this topic.

_player1537

  • Guest
Physics help
« on: March 12, 2010, 08:49:16 pm »
I am wanting to make a program that will simulate physics, but the ones I found I could not understand the source code.  Can anyone help me.  I want to make something like the sonic physics program in the axe section, so that it has friction and jumping/gravity.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Physics help
« Reply #1 on: March 12, 2010, 09:08:24 pm »
I think this is the program you're referring to, right?
http://ourl.ca/4250

Builderboy, I'm also curious.  Could you explain what each little section does so it makes sense?
Builderboy is also the programmer of Peggle, another awesome physics game.  It's in Basic, but I'd still recommend looking at it. :)
Peggle: http://tibasicdev.wikidot.com/archives:peggle

Builderboy, you're really good at programs like this. :) Do you mind sharing your methods? ;D

_player1537

  • Guest
Re: Physics help
« Reply #2 on: March 12, 2010, 09:35:43 pm »
I was specifically saying this program http://ourl.ca/4161/76877 but those programs are good examples too, builderboy could you please tell your secrets?

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Physics help
« Reply #3 on: March 12, 2010, 09:41:11 pm »
I'm just going to take a guess and what part of the engine's could be (I have no idea and could be very wrong :P). But it could be something like testing the number of pixels that it is touching/going through/etc. and then just simply applying that to a physics equation (like applying something that calculates gravity). Just a guess :)
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Physics help
« Reply #4 on: March 12, 2010, 10:21:05 pm »
I was specifically saying this program http://ourl.ca/4161/76877 but those programs are good examples too, builderboy could you please tell your secrets?
Oh, that's right.  I forgot about that one.  Sorry. :)

And the great thing is, is it's still by Builderboy. ;D

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Physics help
« Reply #5 on: March 12, 2010, 10:35:48 pm »
Btw this one runs much faster on calc than it does in the screenshot. I get like 30 frames per second at least.

It's quite buggy, though :(

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Physics help
« Reply #6 on: March 13, 2010, 01:56:10 am »
* Builderboy begins work on a physics tutorial *

Since that seems to be my strong suit, writing engines :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Physics help
« Reply #7 on: March 13, 2010, 01:58:03 am »
* DJ Omnimaga wonders if he will make Sonic...

Offline meishe91

  • Super Ninja
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2946
  • Rating: +115/-11
    • View Profile
    • DeviantArt
Re: Physics help
« Reply #8 on: March 13, 2010, 02:07:04 am »
*Meishe thanks Builderboy for starting said tutorial* O0
Spoiler For Spoiler:



For the 51st time, that is not my card! (Magic Joke)

_player1537

  • Guest
Re: Physics help
« Reply #9 on: March 13, 2010, 02:27:47 am »
*Meishe thanks Builderboy for starting said tutorial* O0
*Player_ thanks Builderboy as well*

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Physics help
« Reply #10 on: March 13, 2010, 11:18:39 am »
*Meishe thanks Builderboy for starting said tutorial* O0
*Player_ thanks Builderboy as well*
*ZTrumpet thanks Builderboy as well and asks that examples from Peggle be included* ;D

_player1537

  • Guest
Re: Physics help
« Reply #11 on: March 13, 2010, 12:43:51 pm »
*Meishe thanks Builderboy for starting said tutorial* O0
*Player_ thanks Builderboy as well*
*ZTrumpet thanks Builderboy as well and asks that examples from Peggle be included* ;D
*Player_ also asks for examples from Portal X* :)