Topic:   SC Physics   (Read 63538 times)


0 Members and 2 Guests are viewing this topic.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #135 on: February 15, 2011, 05:05:59 PM »
Haha.

For the polygons I can tweak some variables to work with tinier stuffs.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #136 on: February 15, 2011, 05:12:47 PM »
I'll try to get a video of what your polygons do to me, it's weird... I don't think the size is the issue right now.

What do you think of a thruster that can be set On/Off? It would do some cool things for sure.
« Last Edit: February 15, 2011, 05:15:48 PM by Connors »
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 #137 on: February 15, 2011, 05:35:39 PM »
Like the ability to put a constant force on an object at a certain position relative to the object?
That can be made in Sc. Though I suppose it could be programmed in.

Ah that reminds me. I need to add functionality for motors. Joints can be motorized. Meaning that if you put 2 wheels on a box with revolute joints you can have a motorized vehicle by setting the revolute joint motors to a certain power level.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #138 on: February 15, 2011, 06:40:21 PM »
http://www.youtube.com/watch?v=hwJROA_g3FM
There, see!? Proof that SC can lag and not sync with the physics program, making thrust inconsistent. A thrust that I could toggle would be more practical. (I'd hate playing a helicopter type game and have it suddenly drop and then resume flying.)
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 #139 on: February 15, 2011, 06:52:57 PM »
Ah thanks, this is quite useful. I have some ideas that may speed things up immensely.

P.S. You can use QuickTime to screen record. I find it to be easier and have a much better quality.
« Last Edit: February 15, 2011, 06:53:42 PM by Gandolf »

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #140 on: February 15, 2011, 07:07:56 PM »
Yeah well that's just great I guess the newer Macs come with Quick Time Pro now. >:( (I can't use screen recording.)

But Matt what's up with the collisions? Any idea why polygons freak out for me?
« Last Edit: February 15, 2011, 07:14:14 PM by Connors »
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 #141 on: February 15, 2011, 07:30:41 PM »
I don't think the newer macs come with Quicktime pro. I have a 2006 iMac.
Quicktime comes with 10.6(and maybe 10.5) and has a screen recording option in the file menu. If you don't have it you could probably download it from somewhere.

SCBox2D Speed Test

Try that. The reasons polygons freak out are because of their small size and also the physics updating frame rate. A slower computer will update the physics slower which can make unfortunate results.
Box2D was made in meters. That's why it's so full of features and so used.
In order for me to use this I must make a Pixel to Meter ratio. Currently I have the ratio set as 120 pixels per meter.
Box2D is made for objects with sizes from 0.1 to 10 meters or in pixels, 12 pixels to 1,200 pixels. Shapes below near or below 12 pixels can have cruddy results.
In this beta speed test I changed the Pixel to Meter ratio to 30. Meaning any shapes from 3 to 300 pixels in size will have the best results. Unfortunately this also slows gravity and skews force and impulse.
Box2D was made for real life simulation physics. It's meant to simulate actual box physics. Like a box that's a meter in height.

I'm going to look into ways of getting better physics. In the mean time can you tell me if this beta fixes the polygon problem?

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #142 on: February 15, 2011, 07:46:30 PM »
Hey that is pretty sweet! No problems with collisions there now. However it does run significantly slower, I mean not just the gravity, a few cards with more shapes just crawl along.
PS: My "About This Mac":
Processor - 1.25 GHz PowerPC G4
Memory - 512 MB DDR SDRAM

Should that be fast enough or is it the reason I'm having a problem? ::)
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 #143 on: February 15, 2011, 08:11:36 PM »
Could be. But I want to fine tune this engine to hum beautifully on any machine.

Here's another beta update.
SCBox2D Speed Test 2

Tell me if it runs any better? I'm going to test it on my old iBook G4.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #144 on: February 15, 2011, 08:21:11 PM »
I have never seen so much lag in my life.
It runs on the G4. But in short, it sucks.

I've got some work to do...

SCBox2D Beta 3
SCBox2D Beta 4
SCBox2D Beta 5
« Last Edit: February 15, 2011, 08:55:54 PM by Gandolf »

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #145 on: February 15, 2011, 08:45:34 PM »
Yeah I tried #3 and actually noticed some great differences. My experiments card (with the pendulum) runs fine, and most of these improved. The most noticeable way to see how much it's lagging is dragging with the mouse. Sadly the explosions test barely moves at all, probably even worse than the castle.
EDIT: wow you've been busy today, #4 mysteriously appeared while I was typing.
EDIT 2: #3 is insanely fast when it's actually compiles, I can drag around shapes and the explosion test even shows signs of movement. XD
EDIT 3: #4 is about the same as 3 and why are you posting so many? thats five now
« Last Edit: February 15, 2011, 08:57:50 PM by Connors »
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 #146 on: February 15, 2011, 08:58:25 PM »
Awesome, try #5. That runs best on my machine.
The explosions aren't that bad either.
My G4 iBook's specs are:
- 500 mhz powerpc G3 (Holy crud, it's not a G4)
- 600mb ram
- OS 10.4.11

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #147 on: February 15, 2011, 09:14:56 PM »
OMG the castle test works now! I don't know what you did but it made the sprites behave better. Explosions are still like a series of pictures but I'm happy I could drag around Stick Man.
Yeah #5 is the best. And no issues with the polygon.

PS: I was looking at a suggestion from a while ago about some kind of Shout Box, this would have been a good time to have it yeah?
« Last Edit: February 15, 2011, 09:16:04 PM by Connors »
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 #148 on: February 15, 2011, 09:32:20 PM »
Quote
OMG the castle test works now! I don't know what you did but it made the sprites behave better. Explosions are still like a series of pictures but I'm happy I could drag around Stick Man.
Yeah #5 is the best. And no issues with the polygon.
Awesome! I'm afraid that for now I won't be able to optimize the engine any further.

Quote
PS: I was looking at a suggestion from a while ago about some kind of Shout Box, this would have been a good time to have it yeah?
Yeah it would have been nice.

Here's some pyramid pics. Cause #5 allowed me to reach whole new speeds:

Tall pyramid is tall.

And blows up.

Tiny pyramid is tiny.

Blows up as well.

Boom.

Yeah the tiny pyramid is 40 rows of blocks that are all 1 pixel in size. These optimizations allow me to do some awesome things. I'm going to upload the latest download now.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #149 on: February 15, 2011, 09:38:52 PM »
Download's in first post. Made this beta official.

For all impulses and forces, you'll need to increase them.