Work in Progress

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
Asimov
Posts: 814
Joined: May 19th, 2012, 11:38 pm

Re: Work in Progress

Post by Asimov » July 22nd, 2012, 11:46 am

Hi Chilli,

This would be really good stuff to make a pool or snooker game.

Asimov
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Work in Progress

Post by LuX » July 23rd, 2012, 12:37 am

@_@ First I spend like 2 hours reading a huge article about rigid body behaviour, convincing me I don't need to know math at all to read it. Then without much introduction jumps right into newtons law of restitution... And I didn't understand at all what was going on.

Next I find a site with only little text, but with more interactive programs that visually explain the theory and I instantly understand whats going on : -P

I guess I learn better from interactive and visual things than theory. I did my billiard game by taking a few swings on my mini pool and wrote the code based on what I saw. Without looking up any actual physics laws (originally wanted to take in mass and advanced friction and energy loss, but then just made them in a much simpler way).

Getting too late again. Maybe I'll make some angry balls game later. Like angry birds, just ...balls. That are angry. And building demolishing, gonna be awesome.
ʕ •ᴥ•ʔ

astr0
Posts: 87
Joined: July 21st, 2012, 8:43 pm
Location: Serbia

Re: Work in Progress

Post by astr0 » July 23rd, 2012, 1:45 am

looking forward to see that :)
Programming is my art.

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Work in Progress

Post by LuX » July 23rd, 2012, 3:51 pm

Just got home about an hour ago, but I already got up a small physics demo. Right now there are no collision or anything, but the program will spawn a plank. When you hold down the left mouse, it will spawn a rubber band from the top middle of it, so you can mess around with the plank physics.

The world values are still a bit messed so it's not realistically proportional, or what ever it's called.
Anyways... What do you think?

PS. the inertia is too big, I know. Sucks the rotation up in an instant.
SimplePhysics.rar
(12.22 KiB) Downloaded 229 times
Here's zero gravity with no world friction:
ZeroGravity.rar
(12.09 KiB) Downloaded 214 times
ʕ •ᴥ•ʔ

astr0
Posts: 87
Joined: July 21st, 2012, 8:43 pm
Location: Serbia

Re: Work in Progress

Post by astr0 » July 23rd, 2012, 4:06 pm

sweet and interesting :)
Programming is my art.

Natories
Posts: 107
Joined: June 21st, 2012, 7:06 am
Location: USA
Contact:

Re: Work in Progress

Post by Natories » July 23rd, 2012, 7:39 pm

Pretty kewl Lux, are ya going to expand on this more?

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Work in Progress

Post by LuX » July 23rd, 2012, 8:34 pm

Of course. I'm only at the basic movement calculations of the tutorial so far. Later (if I manage to) there will be other objects, wall collision and I'll try to figure out better ratios for all the constants and so on. As well as multiple collisions and more realistic collision response. I'll just try as good as I can.

I'm wondering tho, what this "work in progress" of chili was/is : -P Something similar?
ʕ •ᴥ•ʔ

lucked
Posts: 8
Joined: July 17th, 2012, 1:41 am

Re: Work in Progress

Post by lucked » July 25th, 2012, 2:45 am

Lux I try make a billard == your kkk but i´m not happy =(
but i try kk
your collision is good rs :D
i use in this test somethings that i leran with chiulli,
all off c++ i leraned in this videos
i will try make now a angry bird style in c++ :D
Attachments
First Test with Chili DirectX Framework.rar
XD Build
(24.91 KiB) Downloaded 222 times

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Work in Progress

Post by chili » July 25th, 2012, 11:52 am

Cool demo LuX. ;) Forces are good for things like gravity and attraction (electromagnetic), but for collisions you're going to need impulse.
LuX wrote:Of course. I'm only at the basic movement calculations of the tutorial so far. Later (if I manage to) there will be other objects, wall collision and I'll try to figure out better ratios for all the constants and so on. As well as multiple collisions and more realistic collision response. I'll just try as good as I can.

I'm wondering tho, what this "work in progress" of chili was/is : -P Something similar?
I'm just going to make it simulate collisions between polygons of any shape/mass, balls, and walls. It will calculate their centers of gravity and their moments of inertia automatically. When I get that sorted out, I'll fill them with scanline (might go back to wireframe if it looks better), I'll add motion blur, stereo positional sound for the collisions, and particle effects. And a paralax starfield in the background. ;) Then I'll refactor the code one last time to make it pretty and upload it for you guys to look at. It's all done in classes, so it might be interesting for you guys to see what a full on C++ object oriented app looks like.
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Work in Progress

Post by LuX » July 25th, 2012, 12:59 pm

Sounds cool.

This tutorial explains pretty well the math behind simple but realistic collision. It's the one I'm currently following. It assumes you to code everything yourself and to know a little bit about vectors beforehand, but the explanation is pretty good.

http://www.myphysicslab.com/collision.html
ʕ •ᴥ•ʔ

Post Reply