Endless Runner help

0 favourites
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hello all, Im new to COnstruct 2 and I find it amazing to use and more powerful than the previous engine I used (GameSalad). Im doing an endless runner where you move around platforms but you can move left right and jump. And the camera somehow follows you but in the end is the world thats coming to you.

    The thing I cant figure out is to go from regular platformer (jumping through platforms, moving platforms etc...) to a gravity thing where I want the character to rotate around a big object (like a planet to give a good idea of "big". I cant stitch them together. Any help please?

  • If you use platform behaviour you can set it's angle of gravity. Just set it's angle to the center of the planet every tick and you're ready to go..

  • Thanks, makes a lot of sense. But how can I do "set it's angle to the center of the planet every tick".

    I choose the "Platform - Set angle of gravity" action to the every tick event but it asks for the angle.

    Maybe I didn't understand it correctly but I did this... I tried planetspin.x,planetspin.y,player.x,player.y but I want to be more open ended. Not just a specific planet, any planet it decides to move to.

    From platform to planet to platform, something like that. I will work on a .capx file but I have to much graphics and I fear theft.

  • Additional logic for which planet you're touching? If player is touching planet A set angle of gravity to planet A, if player is touching planet B set angle of gravity to planet B. These will run every tick automatically.

  • Maybe adding families, like a planet family (group of planets to spawn, I have another family for the platforms) and set the angle to that family: angle(PlanetsFamily.x,PlanetsFamily.Y,Player.x,Player.Y)?

    I don't even know if this family thing is possible since Im messing with the free edition right not. But I willing to buy it if it works that way.

    Actually, Im just a few clicks away from the buy button now.

  • Thanks, Im new to this editor and Im still trying to import my logic from the previous one (GameSalad). Will try it now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I just thought actually, well I had Super Mario Galaxy in mind, touching won't work as you need to detect gravity pull while in the air. With touching you won't be able to leave the planet you're on so I would set up a gravitational field, like a sprite that surrounds the object but is invisible and if the player comes into contact with this then it takes the gravity angle of the relevant object. If the player is outside any gravity field then you set the angle of gravity to default so the player can just jump normally between planets. In my head this works, erm have fun! : D

  • Thanks a lot I will try to make a force field for the planet and see if it works. I my head it works too. Will post a capx file to show it (if I manage to...).

  • I managed to do this example but my player doesnt stick to the planet surface while in the gravity zone. If somebody could help me please?

    Edit: Cant post dropbox links until I have more reputation, so... I have to make more.

  • Here is my capx, if somebody could help me and tell me what I did wrong please?

    dropbox.com/s/nfy7952qsfd6ddf/Endless%20Simple.capx

  • Send it me in PM.

    Edit: Ah, strange timing. I will take a look

  • Send it me in PM.

    Edit: Ah, strange timing. I will take a look

    Tried to send you one but I dont have enough rep yet, will work on that. Planning to stay and learn :)

  • You've got the set angle of gravity set up wrong, it needs to be in format player.x,player.y,planet.x,planet.y. It works when you change those values. Also remove all of the pin logic, that seems to affect it. You only need the one line for set angle of gravity.

  • Could you be awesome and post the file? Im trying but I dont even know what Im doing wrong...

  • Modifications :

    • On Collision with changed to overlapping
    • Set angle toward for object facing planet
    • Set gravity angle fixed
    • Removed logic that wasn't required
    • Changed the collision for Sprite 6 (it was too small)

    dl.dropboxusercontent.com/u/49548363/endless%20simple_modified.capx

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