Topic:   SC Physics   (Read 63551 times)


0 Members and 1 Guest are viewing this topic.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #150 on: February 15, 2011, 09:50:19 PM »
ZOMG my computer would still die if I made that many eeping boxes. But I must download this and attempt to make an engine for my balancing game (It seemed like a good first project with SCBox2D).

PS: How should I go about testing if a box is touching anything and can jump? Would I need to enable GetCollision for everything you can reach?
Also I forgot where to find the next most recent SC so I can import all the methods at once and then switch to the new one, cause I'm clever that way.
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 #151 on: February 15, 2011, 09:56:57 PM »
Quote
ZOMG my computer would still die if I made that many eeping boxes. But I must download this and attempt to make an engine for my balancing game (It seemed like a good first project with SCBox2D).
Awesome.

Quote
How should I go about testing if a box is touching anything and can jump? Would I need to enable GetCollision for everything you can reach?
Just enable collision for the box. Then you can check if the box is touching any other shapes. For example if you made a ground shape, just detect if the player is touching the ground and allow the player to jump if he is.
You can check out the stick guy castle demo for the code.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #152 on: February 15, 2011, 10:16:14 PM »
And SC 2.0 Beta 2??
« Last Edit: February 15, 2011, 10:16:46 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 #153 on: February 15, 2011, 10:39:53 PM »
I have no idea.

GMG Mike


  • Administrator

  • GMG-er

  • *****

  • no avatar

  • Posts: 536
    • mikerichardson.name
Re: SC Physics
« Reply #154 on: February 16, 2011, 06:05:04 PM »
http://silvercreator.net/downloads/

I don't delete any from the server, in case you need to use an old version for some reason.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #155 on: February 16, 2011, 07:54:41 PM »
Will this nonsense ever end? I can't export all the methods at once, thus the folder remains UNUPDATED. ::)
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/

GMG Mike


  • Administrator

  • GMG-er

  • *****

  • no avatar

  • Posts: 536
    • mikerichardson.name
Re: SC Physics
« Reply #156 on: February 16, 2011, 07:59:32 PM »
Quote
Will this nonsense ever end? I can't export all the methods at once, thus the folder remains UNUPDATED. ::)


You were never able to export all the methods at once. I never remember setting MultiLine on that listbox.

You should be able to import multiple methods by selecting all of them in the Finder and then choosing File > Open.

v2.0b4 will support exporting multiple methods into a single file called a module, to make it easier to distribute packs of methods that are related. All of the methods are added when you import a module.
« Last Edit: February 16, 2011, 08:00:47 PM by Mike_Richardson »

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #157 on: February 16, 2011, 08:04:50 PM »
Would this module be editable?

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #158 on: February 16, 2011, 08:27:37 PM »
It sounds like importing it adds all the individual methods inside.
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 #159 on: February 17, 2011, 07:48:38 PM »
Here's an interesting idea: in order to have my platformers in SCBox2D obey the third law of physics, it would be neat if when the player runs on top of a dynamic object then there's an opposite force on it wherever the player is touching. But I guess I can wait until you update the collision detection. :)
EDIT: Getting the point of collision would allow me to get an idea of what side of a circle was touching, so I can have different events for regular jumps, wall-jumps and various other things.
« Last Edit: February 17, 2011, 09:35:53 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 #160 on: February 17, 2011, 10:17:23 PM »
Yeah maybe this weekend I can figure out collision points.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #161 on: February 18, 2011, 08:15:15 AM »
Awesome, until then I will continue experimenting with my platformer.
The controls feel kind of floaty, like they aren't very tight, I've still got to figure that out. The hardest part is I want to have the player jump higher if you hold down space, and it can be glitchy. (Once again applying forces in timers is problematic.)
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 #162 on: February 20, 2011, 12:55:08 AM »
Hey I posted the start of my platformer in Monthly Challenge. When I was working on it I was thinking that it would be good if I could directly set a shape's velocity to a number, in this case set the shapeYVel to 0 (I can but it doesn't relay back to the simulation). It's because you can't wall jump as high if you're already falling.

EDIT: I typed that and then I was thinking if I used my knowledge of basic physics I could maybe find how much force it would take to stop him. You said Box2D uses realistic values such as meters and Joules right? ;D Can you help me out with finding the weight? radius = 30, density = 0.2
« Last Edit: February 20, 2011, 01:05:40 AM 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 #163 on: February 20, 2011, 09:19:53 AM »
The Pixel-To-Meter ratio is 32. So a radius of 30 is about 1 meter in size. Gravity is 30 meters/sec^2.

I'll look into setting the velocity. Also there should be a possible ClearForces command which may fix issues.

EDIT:
For setting the velocity there are 2 already made commands:
SetLinearVelocity
and
SetAngularVelocity
« Last Edit: February 20, 2011, 09:21:30 AM by Gandolf »

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #164 on: February 22, 2011, 11:05:27 PM »
Gan I imported the methods one by one so I could have a 640x480 template and I'm sure I did everything right but this file won't work. Card 2 simply creates a ball, that's 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/