Slopes and vehicle platforming movement

Get help using Construct 2

Post » Mon Jul 07, 2014 1:50 am

Hi Everyone!
I am quite new to Construct 2 and was hoping someone could help me out.
What I am trying to achieve is a platforming movement for a vehicle. Basically, I'm trying to get the behaviour to be much like Blaster Master: Overdrive (I had attached a link, but forum rules do not allow me yet. Sorry :( ).

At first I had a single sprite with a platform movement, but soon realized that without it changing angles dynamically while going up slopes it was not going to be adequate.
So then I tried creating separate sprites for each of the axles and giving them both the exact same movement, with the hopes that I could retrieve the angle between the sprites to apply my vehicle graphic as the axles went up a slope, but I had problems getting the axles to stay the same distance apart and setting up something to measure the angle every tick.

I know that I can use Physics objects to set up a distance joint and measure the angle of that, but I was hoping to not start down that path as it's not a physics based game, and I don't really want to have to give everything a physics property just so my vehicle can interact with it.

Does anyone one have any suggestions?
Be sure to check out my Metroidvania game, A Hole in the Earth
B
59
S
24
G
3
Posts: 359
Reputation: 5,683

Post » Mon Jul 07, 2014 4:00 pm

There are many examples in the forums about slope angles and the platform behavior. You should do a thorough search, I am sure that you'll learn a lot of things from those examples.

Here is a rapid prototype of a vehicle that behaves somewhat the way Blaster Master: Overdrive does (or at least like a video I saw on Youtube).

html example: http://www.eli0s.com/Tests/VehicleSuspension/

Use Arrow keys to move and Spacebar to fire.

I put it down in a very sloppy way, I didn't even bothered with mirroring the player sprite when changing direction. It does the job however, at least in my opinion. Please note that I strongly recommend using different sprite objects for collision detection on the ground, not the actual graphics.

Here is the capx. In order to work you will need the neat Light behavior made by rexrainbow https://dl.dropboxusercontent.com/u/577 ... light.html

VehicleSuspension.capx

Finally, Firefox gives terrible results, at least in my system. I don't know if this is related to the Light behavior, the particles or something else. In Chrome it plays just fine.
You do not have the required permissions to view the files attached to this post.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Mon Jul 07, 2014 5:55 pm

Thank you so very much, eli0s! That looks great!
I'll try to implement the movement tonight and I will post an update on how well I got it to work. :)
Be sure to check out my Metroidvania game, A Hole in the Earth
B
59
S
24
G
3
Posts: 359
Reputation: 5,683

Post » Mon Jul 07, 2014 6:54 pm

I am glad you like it. Let me know if you need any help.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Mon Jul 07, 2014 8:27 pm

There is an addon called "carphysics"... it's awesome to do things like that.
B
20
S
4
Posts: 387
Reputation: 2,274

Post » Mon Jul 07, 2014 11:42 pm

Thanks Zathan!
I had looked into the carphysics addon, but noticed that I'd need to use the physics behaviour as well, which is something I am trying to avoid if at all possible. :)
Be sure to check out my Metroidvania game, A Hole in the Earth
B
59
S
24
G
3
Posts: 359
Reputation: 5,683

Post » Fri Aug 22, 2014 5:09 am

Hi, where do i find the carphysics add on...and how must I install it ?
thanks:)
B
37
S
16
G
2
Posts: 451
Reputation: 4,873

Post » Fri Aug 22, 2014 10:27 am

Just use the search button and type car physics behavior..
B
22
S
6
Posts: 244
Reputation: 2,700

Post » Sat Sep 13, 2014 12:00 pm

thanks:)
B
37
S
16
G
2
Posts: 451
Reputation: 4,873


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 21 guests