Loops (Not programming)
bds62
Member Posts: 31
Hey everyone,
Would someone kindly point me in the correct direction of how I'd make loops. The loops I'm referring is like roller coaster loops. Every time I search I only get stuff on music loops or programming loops etc. It's very annoying. I'd like a character to be speeding down a hill, hit a loop or two and be on his merry way through the rest of the level. I tried just placing multiple rectangular "floors" while the work to a point it didn't fully and I'm sure there's an easier way to go about this.
Any tutorials, videos, etc?
Thanks
Ben
Would someone kindly point me in the correct direction of how I'd make loops. The loops I'm referring is like roller coaster loops. Every time I search I only get stuff on music loops or programming loops etc. It's very annoying. I'd like a character to be speeding down a hill, hit a loop or two and be on his merry way through the rest of the level. I tried just placing multiple rectangular "floors" while the work to a point it didn't fully and I'm sure there's an easier way to go about this.
Any tutorials, videos, etc?
Thanks
Ben
Comments
Maybe this will help. Scroll down to the 6th post until you see @DeepBlueApps post with a zip file to download
Guru Video Channel | Lost Oasis Games | FRYING BACON STUDIOS
@FryingBaconStudios I'm holding off on going pro until I make my first real game. Still just taking time learning, refining and perfecting everything. I'd like to take no less than 6 or 8 months of learning before working on something for the masses.
Again thank you, can't thank you enough haha.
Here's another one, same sort of deal, an actor moves about dropping (spawning) little pieces to make up a curved surface - once the line is complete then click anywhere on the screen to generate a ball.
Link: https://www.mediafire.com/?tpcb51j9fr7rm3v
Link: https://www.mediafire.com/?z7kmzo0lwedjwbh
Obviously you don't need to see the elements that make up the ground / surface, you can just make them invisible and place an image over the top, so - in this example for instance - you might make an image of some rocky mountains that follow the curve.
50*sin( self.Time *150)+380
19*cos( self.Time *150)*-1
50*sin( game.Time *150)+100
19*cos( game.Time *150)
I noticed the top two were turned off so I assume they aren't used and could be deleted, so the only two actually performing any function is the bottom two.
This says position the actor vertically like this . . . .
50 times the sine of the angle + 100 pixels,
[50*sin] - Sine values move between -1 and 1, so not much use as we want bigger 'bumps' than that, so sine is being multiplied by 50.
[game.Time *150] - The angle on which sine is operating is being generated by the game's time . . . (it's a quick and lazy way of generating an ever changing value) . . . the game's time is measured in seconds, so it would be a painfully slow way to generate a changing value (eg: it would take 20 seconds to move through 20° - or 6 minutes to complete a complete 360° rotation) . . . so we multiply this by *150 to speed it up.
[+100] - adds 100 pixels to the equation, to shove the whole lot up by 100 pixels.