# Hard Request - N movement style

This forum is currently in read-only mode.
0 Favourites
• 12 posts
• http://www.giochieflash.it/giochi-online/N-game.html <- flash game

You can play it there. You can walljump, accelerate, decelerate (slide at high speeds), slide on walls, and much more.

I would like some experienced Construct user to make me a engine like this, with my help obviously. I would really like to make a remake of N with more elements. It's an awesome concept.

• I don't think it's as easy as asking someone to build it for you!

I think you need to show some investment for yourself, What have you already tried? Have you tried anything or do you just want someone else to do the hard work while you come up with the idea (which frankly is to remake an idea that someone else already came up with.)

• The problem is that I don't even know where to start when I create a custom movement.

• Start with left/right movement, then make gravity. Once you have gravity, make collisions with the floor. Then make collisions with the walls. Then make the jump. The rest will follow naturally. It might be difficult working out the details, but you will have an idea of where to go from there.

Just experiment, and think logically. It might help to make a list of everything you need your engine to do, and work on one thing at a time.

• Start with left/right movement, then make gravity. Once you have gravity, make collisions with the floor. Then make collisions with the walls. Then make the jump. The rest will follow naturally. It might be difficult working out the details, but you will have an idea of where to go from there.

Just experiment, and think logically. It might help to make a list of everything you need your engine to do, and work on one thing at a time.

Gravity = First problem.

If I do this : Every 100 ms -> Set player.y to player.y + player('gravity')

And gravity starts at 1, then 3, then 7, then 16... the player will overlap the ground. Is there a fix?

• You need a loop that pushes your object out of solids 1px at a time until it is no longer overlapping.

It helps to have detectors and stuff as well. It's possible to do things without them, but it's much easier with. If you had a floor detector placed at the bottom of your sprite, then after your push-up loop you wouldn't need to run your gravity checks any more until the floor detector is no longer overlapping the ground (i.e., if the player jumps or if he walks off a ledge).

• I'm kinda wanting to do the same thing would it be like?

``````+GroundDetector not overlapping ground
-> Player.Y -1
[/code:b2aakdmf]``````
• Er, I think that would make your guy slowly float up into the sky. You might want to reverse it, either "detector is overlapping ground" or "set Y to Y + 1," either way would work.

• Sorry that's what I meant.

Sorry for stealing the thread, but since I've done that enemy just seems to hop about now.

• This is how I handle instances where the player needs to be pushed out of the ground:

+While player overlaps ground

-Set player Y to player.Y - 1

The "While" loop will run until the conditions are no longer met, and it will happen instantaneously so you won't see it slowly pushed out of the ground.

• ## Try Construct 3

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

Construct 3 users don't see these ads
• My game freezes and when I close a error message come up about while having millions of iterations.

• Pretty much all my movements are custom movements.

Whenever I'm doing gravity, I do something like this:

Player.Y = Player.Y + Player.Value('Gravity') * timedelta

I also have a detector that determines the 'Ground Level' of the player that is always on the ground

And then I have a variable that determines whether he's jumping or not, ie: Jumping = 1

When Jumping = 1, on a trigger once subevent, i set the gravity variable to something like -200 and on the main event i have something like this: add 100 * timedelta to Player.Value('Gravity')

Then once the player's Y coordinate is greater than the ground level detector, simply turn jumping to 0 and set gravity to 0, then if there's any loop that pushes him out of the ground now would be the time to use it. Although I suppose it's entirely possible to code without the ground detector... I really only use the ground detector in Iso type games as there technically is no ground, in platform you could just use an overlapping event

Also you're probably going to need two variables for X and Y movement, i usually just called them Xcomp and Ycomp.

Then it's simply always: set player X to player.X plus Player.Value('Xcomp') * timedelta

set Player Y to Player.Y + Player.Value('Ycomp') * timedelta

and i suppose for a platform game, you don't really need all that gravity i just mentioned cause you could treat the Ycomp variable as gravity..... oops, in which case you could just do something like: If player is not overlapping solid, add 200 * timedelta to Player.Value Ycomp

I hope that helps and I hope I've been concise enough with my description.

Need any more help I'll try and help