Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » hagphysics2d progress

This thread is locked; no one can reply to it. rss feed Print
hagphysics2d progress
fuzinavl
Member #4,105
December 2003
avatar

download DEMO 12/4/05 :D
(right-click, save target as...)

Current Features:
acceleration, gravity, rotation and translation from a 2d force, spring forces
ship_demo, space_dust_demo

To Do:
hagphysics 2d manual and examples
friction, adding masses, elastic collisions, elastic collisions with turning
"hagutil" generic programming utilities library
"concavehull" (with collision detection) library

Comments about interface?

Optimizations?

__________________________
fuzinavl@hotmail.com (Pittsburgh)
__http://fuzinavl.tripod.com/__

Peter Hull
Member #1,136
March 2001

If s is the vector from asteroid to ship and v is the velocity of the asteroid then is the tangential part
v-(v.s)/sqrt(s.s)
?

Regarding the interface, why don't you want to 'impose a data structure'? It would make the functions more straightforward.

Pete

[edit] No, rubbish, I don't think I understood your problem properly :P

fuzinavl
Member #4,105
December 2003
avatar

thanks, I figured out the tangental stuff

Every game has it's own data structures and unique physical behavior.
I shouldn't force coders to use my data structures.
Hagphysics2d is easily wrappable.

__________________________
fuzinavl@hotmail.com (Pittsburgh)
__http://fuzinavl.tripod.com/__

Fladimir da Gorf
Member #1,565
October 2001
avatar

Looks nice, but what would be really nice (though I don't know if it's out of the scope of this project) would be cutting the spring around a polygon (like a ninja rope "cuts to half" if it hits the ground...

OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori)

fuzinavl
Member #4,105
December 2003
avatar

I plan to make an elastic cord object which can wrap around a generic set of movable points. The cord will exert forces on every point. The cord will not be segmented or "hang" in a curve due to gravity. The cord might remain frictionless due to the difficulty in programming "resting contact"...:-/

My project will be an asteroids type game, so the lib might not be completely suited for 2d side-scroller platform games w/ gravity.
I recommend flatland for that, though you must use their data objects.

Btw, this is just a code example to supplement the lib manual, not a real project.

Quote:

cutting the spring around a polygon (like a ninja rope "cuts to half" if it hits the ground...

Sorry, I don't understand. Could you please explain that another way?

__________________________
fuzinavl@hotmail.com (Pittsburgh)
__http://fuzinavl.tripod.com/__

Neil Walker
Member #210
April 2000
avatar

Have you got to sign up to download the file? Why not just attach it? I'd never trust a site that wants a login to download a file as they'll probably pinch my email for spam.

Neil.

Neil.
MAME Cabinet Blog / AXL LIBRARY (a games framework) / AXL Documentation and Tutorial

wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie

Go to: