Working with collide other than circles and rectangles
MattButlerStudios
Member Posts: 486
Ok so I have wanted to use this method before when I was trying to make a "stay in the line" type game and was unsure how to go about it. If you have an irregular shape such as the path in a game like the one stated above how would you make collide rules or overlap rules since the shape itself is irregular. Before when I tried this things were reactive strangely. Thanks
Comments
I would assume that people do things like the copy on DBM by arranging rectangular and circular actors that represent either the path or the edges. This can do fair straight or fairly cleanly circular levels, but isn't going to be as effective at more organically shaped levels. Still possible, but a lot more work.
Contact me for custom work - Expert GS developer with 15 years of GS experience - Skype: armelline.support
I think it would be just as effective, there is no need for a perfectly clean edge, you are only detecting whether touch has crossed the edge, you could plot the whole thing out with small points.
Cut and posted from a (very) old post (I was responding to a similar question):
You wouldn't necessarily have to painstakingly place squares along your path so that their edges precisely align, you could simply plot out small dots spaced along your path . . .
Demo:
http://www.mediafire.com/?ntwtemcrp58gcvo
Let the ball fall into the 'bowl' then use the white slider at the top (it only moves left and right) to change the size of the blocks making up the 'bowl'.
Drag it to the left to make them simple collision points - or to the right to make them into a joined up curve - then pick the ball up and roll it down the sides - obviously the more joined up curve will give a smoother roll and the single points will be more bumpy.
But if your project is a path following game then you might only need to detect whether touch has left the track so single points should be fine.
Thanks a lot @socks and @Armelline I have use a similar method in the past, but was wondering if there was a better way to do it.
www.mbstudios.co | Free Stuff