[QUOTE=Jallen;15750378]This made me think that you should try and make some form of fluid simulation. All you need to do is make it up of balls but render it as one big block of colour.[/QUOTE]
Phun does that.
[QUOTE=Jallen;15750378]This made me think that you should try and make some form of fluid simulation. All you need to do is make it up of balls but render it as one big block of colour.[/QUOTE]
well pymunk is not so powerful, and also its made for simulating rigid bodies.
[QUOTE=Cathbadh;15754227]Phun does that.[/QUOTE]
Yeah, and so does Blender, PhysX, and so on. What's your point?
[QUOTE=nullsquared;15754895]Yeah, and so does Blender, PhysX, and so on. What's your point?[/QUOTE]
They aren't 2D
[QUOTE=nullsquared;15754895]Yeah, and so does Blender, PhysX, and so on. What's your point?[/QUOTE]
Last time i checked this is a topic with 2d physics.
[QUOTE=nullsquared;15754895]Yeah, and so does Blender, PhysX, and so on. What's your point?[/QUOTE]
My point is that it is a tried and tested method for making convincing water in 2d.
[QUOTE=Cathbadh;15755723]My point is that it is a tried and tested method for making convincing water in 2d.[/QUOTE]
Oh, you mean "phun does water like that". I thought you meant "phun does water" in general :downs:. Sorry.
You guys should really get back on topic about his physics game.
nullsquared? being a moron?!?! WHAT PREPOSTEROUS THINKING!
I am now working on adding squares but I got serious problem in drawing them rotated... when it's done i will post a video.
Here's a function I use in my own physics sandbox to transform local points to rotated local points:
[cpp]b2Vec2 transformVertex( b2Vec2 locals, float angle )
{
float localangle = atan2( locals.y, locals.x );
float tangle = localangle + angle;
float dist = sqrtf( locals.x * locals.x + locals.y * locals.y );
return b2Vec2( cosf( tangle ) * dist, sinf( tangle ) * dist );
}[/cpp]
[img]http://www.imgdumper.nl/uploads2/4a4b758d471cd/4a4b758d46de7-example.GIF[/img]
In the above case, you would pass a vector (-1, 1) with the angle +/- 0.79 radians (45 degrees) and it would return a vector (x, y) with the transformed local point. This is C++, but it should be easy to convert it yourself. b2Vec2 is simply a struct with an x and y value.
If you turn up the gravity to 8000 or so the balls will start falling through the lines.
[QUOTE=girtastic;15818473]If you turn up the gravity to 8000 or so the balls will start falling through the lines.[/QUOTE]
Only the very small balls.
Anyway I am gonna rewrite this using pyglet since pygame is not so good. I will learn it and then give it a try. Then I will post the results here.
Sorry, you need to Log In to post a reply to this thread.