How is this done?

Discuss scenes and videos made with Algodoo.

How is this done?

Postby Xray » Sun Jun 24, 2012 9:05 pm

I am learning as much as I can about Algodoo scenes, and one way of doing that is by loading and disecting other people's scenes. One such scene that has me stumped is called Space Arcade (by Nxdt).
Space Arcade V1.1.phz
(15.27 KiB) Downloaded 109 times

He has created a "pseudo-3D" artificial horizon which gives the impression that the player is flying through space toward a perspective vanishing point. The effect is quite impressive! Now, the scene that I attached to this post, has been greatly modified by me, and therefore it doesn't look anything like the original scene, but I wanted to delete everything except for this one clever function that I have not been able to figure out how it's done. If you run the attached file, you will see horizontal lines spawning out of nothing! They get pulled down by gravity, but even if I stop the animation and delete everything that I can see, when I start the animation again, lines continue to get spawned. I could not find any Thyme script that is generating those lines. Could someone please take a look at this scene and tell me how it was done? Thanks!
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA

Re: How is this done?

Postby Nxdt » Mon Jun 25, 2012 5:05 pm

Thanks for the pm.
I used a box with the thyme spawn code and circle with off centre hinge to bump into it regularly. This mechanism was made very small, invisible and placed far from the main area of the scene, this is why you couldn't find it.

the code looks something like this;
Code: Select all
(e)=>{
    Scene.addBox({
        [select the object you want to spawn and press ctrl-c, this copys the object exactly in text form, then highlight this bit of text and hit ctrl-v]
    })
}


This is the only thyme used in this scene, and i've attached a quick scene showing what I did.

Perspective test.phz
(12.4 KiB) Downloaded 100 times
User avatar
Nxdt
 
Posts: 1019
Joined: Mon Aug 31, 2009 6:32 pm
Location: Scotland!

Re: How is this done?

Postby Xray » Mon Jun 25, 2012 5:29 pm

Hi Nxdt --
I'll say it again.... VERY CLEVER! :thumbup:

Thanks for the explanation, and thanks for the scene that demonstrates it. Now I'll be able to sleep at night! ;)

Xray
User avatar
Xray
 
Posts: 500
Joined: Sun Jun 17, 2012 6:12 am
Location: USA


Return to Scenes

Who is online

Users browsing this forum: No registered users and 6 guests