Topic:   SC Physics   (Read 64144 times)


0 Members and 1 Guest are viewing this topic.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #165 on: February 23, 2011, 12:15:58 AM »
Certain bits of code need added.
Check the global methods for the code.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #166 on: February 23, 2011, 06:22:59 PM »
OK, I found the problem. Thanks man!
Imma go make a minigame called "Defend The Ducks!".

EDIT:
https://sites.google.com/site/onronc/640x480.scproj?attredirects=0&d=1
It's the 3rd card, just use "Run This Card".
My fragments won't spawn AND your DestroyShape method is screwed up. It didn't work in the platformer project either.
Thanks for the help!

 - Con
« Last Edit: February 23, 2011, 09:22:26 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/

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #167 on: February 23, 2011, 11:01:26 PM »
Quote
Code: [Select]
FOR i = 1 to 10
 Â  SOMEMETHOD
NEXT

SOMEMETHOD Code:
Code: [Select]
FOR i = 1 to 5
 Â  PRINT "Hello"
NEXT

That code will cause infinite loop.
I can't see how that's a loop, wouldn't it just print "Hello" fifty times?
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 #168 on: February 24, 2011, 06:45:13 AM »
Your for loop never gets called. Not sure why.
I'll look into the destroy shape. Maybe make a demo to see if I can fix bugs.

It causes an infinite loop cause it's using the same variable name "i".

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #169 on: February 24, 2011, 04:34:27 PM »
*Update!*
Destroying shapes now work.
Collisions have a safe guard to protect from spontaneous errors.
Update in first post.

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #170 on: February 24, 2011, 04:55:01 PM »
640x480 Bomb Fixed
Bugs everywhere, my code, your code, under the fridge, on the homeless guy, and all over the windows operating system.

Your explosion never executed due to some faulty explosion code at the bottom of the timer. The shapes never were destroyed due to me forgetting to finish the destruction code.

Unfortunately I'm finding it harder and more complex to maintain the physics engine. It'd make things 10x easier, faster, and even sexier if Mike got the dylib plugin system in. I could make this thing tons more advanced. Cause some features just aren't practically possible with the current way this is set up.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #171 on: February 24, 2011, 11:08:54 PM »
I think I'll make some simpler minigames for now then. :)
And a few that don't even use physics, Imma go for that old-school sprite/velocity-based movement we all know and love. (LOL)
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 #172 on: February 26, 2011, 10:54:34 AM »
Awesome.


My failed attempt at making a rag doll. Obviously there's still a few bugs I gotta fix.
« Last Edit: February 26, 2011, 10:54:49 AM by Gandolf »

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: SC Physics
« Reply #173 on: February 26, 2011, 11:41:16 AM »

Fixed some bugs but there's some stuff that's just not right. Especially when you mix distance joints with rotated shapes.
So be careful, you might experience crazy results.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #174 on: February 26, 2011, 12:20:22 PM »
Awesome, I'll try this new one out later. Have you tweaked anything to help with speed lately?
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 #175 on: February 26, 2011, 12:59:15 PM »
I might've. Don't remember. Anywho I'm gonna test again on my G3 to see how well it runs.
EDIT: Still runs like crap on my G3
« Last Edit: February 26, 2011, 01:19:49 PM by Gandolf »

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #176 on: February 26, 2011, 09:48:21 PM »
Yes I wish I could play my game at full speed with the sprites turned on, bombs look so much cooler with sprites. PS: I posted a version of my minigame on Card 3 with a wall, you would put the bomb on the other side so it goes off safely (lol) but it glitches. I tried making the level where you have to hold a polygon bucket over it but the bucket does the same thing as the wall (that's while holding the mouse to keep it there).
« Last Edit: February 26, 2011, 09:51:51 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 #177 on: February 26, 2011, 11:20:05 PM »
I just saw your mini game. Looks good. Runs fast on my machine. Though the wall still moves.
This is gonna take quite a bit of work to figure out all these bugs.
I'll bet most of the problems are due to the server-client communication and also the lag caused by Sc's slow drawing routines.

When I get the PhysicsCreator working I'll post the working project and you can see what high performance/lagless simulation really looks like. It'll blow your socks off.

GMG Mike


  • Administrator

  • GMG-er

  • *****

  • no avatar

  • Posts: 536
    • mikerichardson.name
Re: SC Physics
« Reply #178 on: February 28, 2011, 06:37:35 PM »
Close the goddamn variables window, that lags the game.

Connors


  • ^ This guy is amazing.

  • ****


  • Posts: 2374

  • It's a secret to everyone...
Re: SC Physics
« Reply #179 on: February 28, 2011, 07:44:09 PM »
OK OK geez he's not blaming you for it.
But yeah I can see how 50+ variables and arrays would start to cause 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/