Game Development Community

Irregular shaped platforms

by Phil M · in TGB Platformer Kit · 12/07/2008 (10:57 am) · 3 replies

Just looking into different game ideas.
Still new to TGB/PSK so not sure whats possible with scripting etc.

I know this isn't what the PSK was designed directly for, but is it possible to have irregular shaped platforms?
E.g. circular platforms a player can run all the way around (upside down), or irregular rock shaped surfaces.

An example kind of like this is Frozzd (http://uk.youtube.com/watch?v=FIprUPdcXDA).
Although I'm more interested in larger non-flat platform, rather than lots of small ones like in that example, it shows the concept well.

So this breaks down into 2 main parts:

1) Is it possible to get the player and other actors/objects to have their gravity pointing to the center of the object their standing on? Or attracted (think magnetic boots) to the platforms in some other way?

2) How feasible would it be to get smooth collision detection on curved/irregular surfaces? Am I limited to manually setting the collision area in the editor, and playing with how accurate I can make this, compared to the resulting fps. It looks as though Frozzd might be using pixel perfect collisions, rather than the TGB way. Is that at all possible in TGB?

Does anyone have ideas or pointers on this? Thought I'd ask here first, before posting in the main TGB forums.

Thanks,
Phil

About the author

Recent Threads

  • Mouse Control?

  • #1
    12/07/2008 (3:09 pm)
    Circular platforms are definitely doable, provided they are convex.

    In order to do the full circle platform, you would need to modify the ground detection code to suite. When I scripted up the ground stuff, I stored the information about each platform's "surface image" in the platform itself. This way I would only have to test the surface of each platform for the ground detection stuff. This does take up memory, but reduces the processing cost. You would also have to modify the definition of the "surface image".

    I'm not entirely sure, but this idea you're trying to implement could be quite tough and may require a significant modification. I'll have more of a think about it when I get some time.
    #2
    12/08/2008 (4:19 pm)
    Thanks for the tips. Sounds promising even if it is tough! Yes we could stick to convex platforms with this idea I think.

    The designer I'm working with is constantly testing how far he can push me! This is one idea I hoped we could keep in.
    We've agreed to prototype on regular platforms initially, whilst I look into the options of something more custom.

    So any tips/pointers in the right direction would be greatly appreciated, but no rush from my end at all! Still wrapping my head round all the PSK options and features you've carefully crafted in, before I attempt to get dirty with code tweaks : )
    #3
    12/08/2008 (4:54 pm)
    Edit: Woops!