Making curves kind of like pole position..

This forum is currently in read-only mode.
From the Asset Store
Make your own platformer for both the web and mobile easy with this Santas Platformer Template, FULLY DOCUMENTED
  • Hey all!

    I dont know how popular this section is anymore, but i still decided to see if theres anyone lurking and willing to help me with this issue:

    So, i have this simple concept/ idea of a single screen, top down, local multiplayer, physics based racer, where the cars stay on a single, immovable screen and the environment, road and everything else kind of just scrolls from top to bottom.

    Now all this is pretty much a-ok and working, after doing some simple tests. scrolling isnt really the issue.

    What really stopped me was kind of important though. I have no idea how to make curves, and i really need to implement that. straight road would get boring really quick. What im thinking would be something like the curve effect in the old game Pole position, or the old commodore 64 classic pit stop, only top down, instead of that pseudo 3D effect.

    Does anyone have ANY good ideas how to make that effect? Or maybe some example of an effect that does this?

    Any piece of advice would be greatly appreciated at this point since im kind of at a dead end here and cant come up with a solution on my own..

    Anyways, thanks for reading!

  • The 3d effect can be done like in here:

    For just curving sprites in 2d you can use distort maps.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks for replying!

    Actually i just found that fake 3D road example from my example folder this evening, if its your doing then thank you, very enlightening in many ways!

    However, i still have issues:

    im currently doing my road/scenery scrolling with tiled backgrounds and im having a hard time trying to figure out how to implement that in this case? do you have any suggestions? im not using the "stripe" method for the sense of movement, i have textured road and environment.

    Also, the distort map curves from the middle, thus making it appear wrong(in this case), when it should curve only from top (as in, the bottom should always stay straight)? EDIT: (Ugh, disregard that, its actually just as it should be, its only an issue of positioning the camera properly that i need to work out somehow. this is what happens when you work late and try to figure these things out when you should be sleeping )

    oh and please, just say if im not making any sense and ill try to explain myself a little better

  • For 2d you can just use the distort map to bend the road in curves. For 3d the problem of using a textured road and placing objects becomes a full 3d one except the math has to be done yourself. You can use z with distort maps so the drawing capabilities are there. To position objects you'll have to set the zelevation on sprites as I recall.

    About the curving in the example, that's all it is. I never refined it to look right.

  • Hey rojo, i found this while poking around here (requires math plugin):It pretty much mostly does what i was looking for. I wasnt aware you could scroll textures within a sprite, thats why i was going to use Tiled background, but now i can pretty much just use spites for the road (i hope).

    I havent tried yet to combine that curve displacement thing with the scrolling and i thought id ask if its possible (or feasible)?

    One thing im still really confused about is this:

    Since the curves are made with mouse movements in that fake 3D road example, im afraid i lack the knowledge to convert that to a different command. What im trying is to get the curves come up on command, possibly from a global variable. So the track would just be a series of commands to call upon, I.E straight -> curve(medium right) -> straight -> hard left etc..

    As i said, i dont know how to manipulate the displacement code properly (frankly, at all, havent really used it). Id need a few pre set of curves (medium, easy, hard, long, short curve for example), but i dont know how to translate that from the mouse movement in the example..

    I would be really grateful if you could guide me in this in any way possible, even just slightly. I feel like im close to breakthrough , and every other aspect is pretty much in place and worked out. just these dreaded curves are giving me a hard time here..

    EDIT: hmm, i couldnt post the link or upload the .cap...

    But the .cap is called "tiled-distortmap-scroll" if youre aware of it possibly?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)