Topic:   SC Physics   (Read 56157 times)


0 Members and 1 Guest are viewing this topic.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #30 on: February 01, 2011, 06:37:27 PM »
Oh, it's easy. Just use direct sockets to make an external program talk to SilverCreator.

Just updated SCBox2D. Much more stable, much more realistic looking, and much more awesome.


Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
OH MY GOD
« Reply #31 on: February 01, 2011, 11:26:43 PM »
:o I didn't check this whole forum (just pieces) for like THREE DAYS and found out I missed this whole thread.
I was just watching Gan's tutorial and this is the best SC project I've seen. Forget Phun (http://www.phunland.com/) I have no idea how to mod it, and THIS lets you change whatever you want to! ;D
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #32 on: February 02, 2011, 03:03:24 PM »
Yo Gan I changed the 5th card in the demo and it did some weird crap with the forces. The ball tends to want to roll one way more so then the other like there's wind and then when you press down while it's on the ground it flys up and to the left. ??? Maybe you should just try this out in Key Down on #5 and see fo yoself.
Code: [Select]
IF Key$ = UPARROW$ THEN
   ApplyLinearImpulse 1, 0,0.1, 0,0
END IF
IF Key$ = DOWNARROW$ THEN
   ApplyLinearImpulse 1, 0,-0.5, 0,0
END IF
IF Key$ = LEFTARROW$ THEN
   ApplyForce 1, -0.5, 0, 0,0
END IF
IF Key$ = RIGHTARROW$ THEN
   ApplyForce 1, 0.5,0, 0,0
END IF
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #33 on: February 02, 2011, 03:15:11 PM »
When doing a down impulse while on the ground, it causes the impulse to bounce back into the ball which causes the ball to fly up. You can fix by getting rid of the down arrow impulse.
When pressing left or right, a force is applied. When you let go momentum keeps the ball going. You can get rid of momentum by increasing friction of the ball.

If you want to look at better movement, check out the platform demo.


By the way, major update. I've switched from direct sockets to easy sockets. 200-300% performance gain. :)

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #34 on: February 02, 2011, 03:21:10 PM »
Alright, I'll just mess around with these commands for a while...
PS: I gave it some friction, I was referring to the worrying tendency of the sphere to want to change direction on it's own. Does it perhaps have a spin on it??
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #35 on: February 02, 2011, 03:26:06 PM »
Yeah, the circles spin. In a future feature I'll be demoing the usefulness of spinning circles.

If you don't want a circle to spin just SetFixedRotation #, TRUE

GabrielCA


  • GMG-er

  • **

  • no avatar

  • Posts: 224
Re: SC Physics
« Reply #36 on: February 02, 2011, 04:01:55 PM »
Very impressive (liked video demo), though Box2D (the core of the physics engine plugin) is not by GMG Matt
Creator of the deprecated plugin KeyDetect (2005)

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: SC Physics
« Reply #37 on: February 02, 2011, 04:04:14 PM »
What do you mean?
I survived the spammage of 2007

GabrielCA


  • GMG-er

  • **

  • no avatar

  • Posts: 224
Re: SC Physics
« Reply #38 on: February 02, 2011, 04:15:16 PM »
I mean it would've been even more impressive if Matt had written Box2D himself, as Box2D is doing a lot of the work.
Creator of the deprecated plugin KeyDetect (2005)

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: SC Physics
« Reply #39 on: February 02, 2011, 04:17:03 PM »
Who wrote Box2D?
I survived the spammage of 2007

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: SC Physics
« Reply #40 on: February 02, 2011, 04:18:56 PM »
...

Gan didn't claim to have written Box2D, just the "plugin" for SC.
Silver, Box2D is an open source physics library: http://www.box2d.org/

GabrielCA


  • GMG-er

  • **

  • no avatar

  • Posts: 224
Re: SC Physics
« Reply #41 on: February 02, 2011, 04:19:48 PM »
The author is credited as Erin Catto (there are contributors).
Box2D appears to be a general purpose 2D physics engine.
http://www.box2d.org/
Creator of the deprecated plugin KeyDetect (2005)

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: SC Physics
« Reply #42 on: February 02, 2011, 04:24:38 PM »
Ah.
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #43 on: February 02, 2011, 04:25:15 PM »
Yeah. In the documentation I clearly state this.

This plugin uses Box2D and interfaces it with SilverCreator. Hence the name, SCBox2D.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #44 on: February 02, 2011, 04:45:21 PM »
And I can see some great stuff coming out of this one, Matt. :) I shall look into using it for Ship Lander.
Warning: The above post may have been modified multiple times.

"In a great game, the character must never perfectly obey the user's command"
 - Tim Rogers

http://connorspuzzles.tumblr.com/