|
-
May 22nd, 2004, 07:44 PM
#1
Thread Starter
Member
VB: Construction Game [Source]
It's not a game really, but I think it's fun to play around with so
here it is anyways 
You can get it, as allways, under Visual Basic on my homepage:
jonask.com
the name of the file is
stress_and_structure_simulation.zip
Or Clicking Here
This program alows you to place points into a 2d world, and then
connect these points with links. You can also add factor like
gravity, and muscle movement to the links. When the simulation is
run the links will atempt to retain their length, and if not stress is
calculated.
This makes for a rather interesting physics simulation. You can
construct all kinds of machines, structures and animations and
test how they react under different forces.
and so on, and so on with the sales pitch...
Credits should go to the good people at sodaplay for giving me
the inspiration to make this =)
Anyhey, I found it to be a very interesting piece of code, and I
really think it is worth having a look at.
Last edited by Electroman; Jun 3rd, 2004 at 05:25 PM.
--
Jonas
-
May 22nd, 2004, 08:07 PM
#2
transcendental analytic
loads of fun I couldn't get my stickguy to stand no matter how i constructed him, could you add an option to set resistance between two links from a node, so that they will also try to retain angle?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 22nd, 2004, 08:16 PM
#3
PowerPoster
www.sodaplay.com isn't it However, well done
-
May 23rd, 2004, 04:37 AM
#4
Frenzied Member
-
May 24th, 2004, 09:25 AM
#5
Thread Starter
Member
Yeah, I know what your mean about locking angles between points. But if I were to add that it would mean rewriting most of the physics engine, pluss it would be a whole story with torque and frankly I'm not sure I can come up with a smart way to do that :P
But if anyone has an idea on how to do eighter of the following, I would REALLY appreciate if you shared it with us here =)
1. Locked angles
2. "solid" lines. Lines that vertixes cannot pass through
-
May 24th, 2004, 09:36 AM
#6
Was it ment to be flat when it hit the earth???....BTW I got an overflow when I did set the strech bar to zero.. ..
-
May 24th, 2004, 09:47 AM
#7
Ex-Super Mod'rater
I liked it too but I maximised the window then put it back to restored and it crashed
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 24th, 2004, 09:52 AM
#8
Thread Starter
Member
Yeah, I see... MaxStress was calculated like this:
MaxStress = SetVal(4) / SetMax
with no limitation... it's fixed now =) thanks for pointing it out
What did you mean by something beeing flat when it hit the ground?
---
I think I know what you meant, Electroman, about minimizing the app. it has to do whith the resizing of the picture box, i think fixed it too now, thanks =)
Last edited by jonask; May 24th, 2004 at 09:56 AM.
--
Jonas
-
May 24th, 2004, 09:54 AM
#9
In the version Fox showed us it kind of bounced when it hit the gorund, but in your app when it hits the ground it craches together and all the points land on the ground like a line...is that what is supposed to happen?
-
May 24th, 2004, 10:05 AM
#10
Thread Starter
Member
Well, that is one of the advantages of my model vs Sodaplay's.
In mine you can choose whether or not you want to follow the simpler sodaplay model or if you would like the links to snapp under stress, thus allowing for a "Bridge Builder/Pontifex" feeling =)
-
May 24th, 2004, 10:09 AM
#11
Ex-Super Mod'rater
Posted by jonask
Well, that is one of the advantages of my model vs Sodaplay's.
In mine you can choose whether or not you want to follow the simpler sodaplay model or if you would like the links to snapp under stress, thus allowing for a "Bridge Builder/Pontifex" feeling =)
hehe...yeah I saw that, I was pulling things about and they started to fall apart .
When your thread has been resolved please edit the original post in the thread (  )
and amend "-[RESOLVED]-" to the end of the title and change the icon to  , Thank you.
When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

-
May 24th, 2004, 10:20 AM
#12
Originally posted by jonask
Well, that is one of the advantages of my model vs Sodaplay's.
In mine you can choose whether or not you want to follow the simpler sodaplay model or if you would like the links to snapp under stress, thus allowing for a "Bridge Builder/Pontifex" feeling =)
Did you try this???
http://www.sodaplay.com/constructor/index.htm
Lift it up and let it fall to the ground...then see...it doesn't break...just bounces a bit..
-
May 24th, 2004, 10:48 AM
#13
Thread Starter
Member
yeah, yeah they do. Because the stress is to lagre due to the impact and stuff, and so they snap =) But if you look under settings, you'll se you can turn that off.
I shouldve mentiond this before I guess
-
May 24th, 2004, 01:08 PM
#14
transcendental analytic
For solid lines you would need to do a line/line collision detection between the solid line and the line that starts at the vertex in one frame and ends in same vertex in the next. The vertex would then have to bounce off at an "intermediate frame" which is not displayed, I guess thats how they do collisions in pool games.
Torque is radial force.. or is that tangential, dunno but I guess it must be stronger the further away you are from the vertex, so the radius must be in the equation
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 24th, 2004, 01:13 PM
#15
transcendental analytic
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
-
May 24th, 2004, 09:27 PM
#16
Thread Starter
Member
Thanks for the link =) I guess I'll dig up my old notes from physics class, load up that page and get crackin. Maybe I can get it to work, but i doubt it 
stay tuned
-
Sep 8th, 2004, 09:10 PM
#17
Fanatic Member
BUG: Place a single point, and attach many many bars to it. Don't have them move or anything (do this while simulate is off)
Put about 20 bars attached to the one point. Click simluate or start or whatever it was.
Watch the big spiky thing go nuts and explode.
Don't pay attention to this signature, it's contradictory.
-
Sep 10th, 2004, 06:40 AM
#18
Thread Starter
Member
Haha, yeah, so it does.
I know why, approximation problems :/ no easy fix I can think of as for now, but I'll keep you posted =)
Thanks for letting me know!
-
Sep 10th, 2004, 07:12 AM
#19
Fanatic Member
Also:
Build a starshape, with have two adjacent points being fixed (do this in simulation mode) (don't build the shape extremely large... medium to small sized)
Make sure every point is hooked to every other point
Set the stretch factor to max
Take adjacent fixed point #2 and place it at the position of fixed point #1.
The line between the two fixed will break, but the rest of the shape will begin rotating around them!
I tested to make sure it was actually generating force by attaching certain shapes which would brush the wall (high friction, no bounce). The speed would go up to whatever value all the time.
Don't pay attention to this signature, it's contradictory.
-
Sep 16th, 2004, 11:31 AM
#20
Thread Starter
Member
I havn't tried it out, but i'm sure your right.
There are several 'flaws' that in the physics modell, and they are all related to the quantitative nature of the cumputer calculations... I can think of ways to correct some of the artifacts, but the code would be too extensive, and i feel that it would ruin some of the beauty in the simulation E.i. if I were to add many if conditions, trying to control every one of these small misshaps it would contradict with the "one pure law" that I'm unsing.
I don't know it that came out right, but who's gonna care?
-
Sep 16th, 2004, 01:51 PM
#21
Fanatic Member
The rotating thing can make some weird effect... and the exploding point one is impossible to contain. I tried putting support against the walls.. but no luck.
Don't pay attention to this signature, it's contradictory.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|