Sign in to follow this  
  • entries
  • comments
  • views

A Trick!

Sign in to follow this  


2007-05-30, 5:15am (GMT)


I added a trick to my skateboard game - a kickflip. I was able to draw the animation and get it working in code in only 45 minutes. Not bad.

What Next?

I haven't fully familiarized myself with TGB yet. I haven't even touched audio. I think tomorrow I'll drag my skateboard out to a near-by parking lot and record some sound effects.

I also need to re-familiarze myself with making and scripting UIs in TGB. Maybe I'll put together a simple title screen for my demo.

Physics in TGB

One thing I meant to discuss in greater detail in my last post was TGB's physics engine. TGB has built-in support for basic rigid-body physics for game objects, using convex polygonal bounding areas. Unfortunately, the collision detection and response behavior is sometimes unreliable. Objects often teleport through other objects, get stuck, or fall through supporting surfaces.

There are a couple of collision response methods you can use in TGB - 'clamp' and 'bounce'. 'clamp' just moves colliding objects by their intersection offset. 'bounce' applies impulses to colliding objects and attempts to make them behave in a physically correct way.

I only use 'bounce' collision response for unimportant, non-player-controlled entities, such as the gibs in my skateboard game; I've found the 'bounce' option too unreliable for important game objects.

I've tried letting player objects use the 'bounce' response method, but these objects always end up stuck in the ground for no obvious reason, or colliding with a buried edge of a tile in a tilemap.

I'll keep this in mind for my contest entry - "no fancy physics!"
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now