Copter movement

Discuss game development design and post your game ideas

Post » Mon Jun 29, 2015 12:41 pm

Hello. I am new to C2.

I am playing arround, trying to make a copter game.

I like very much this game: youtube . com / watch?v=86mWmzV6dw8

So i was trying to emulate that kind of movements.

I am using phisics and forces to move it. When applying forces to the copter, it gains "momentum" and it's dificult to control it. The "crazy copter 2d" iphone game movements are simple and without inertia, when you stop clicking right or left the copter stops moving on the horizontal axis. Can i use phisics or it is better without phisics?

I am messing with angles and keyboard inputs, i think it can be done better, but don't know how.

Another thing i was wondering, when the copter stops on a "moving solid tile" (has a sin movement), te copter doesn't moves with this tile, can it be done?

Here is my capx: dropbox . com /s/j7lqx6jvlt9nfu5/coptertest.capx?dl=0

Hope someone can help me :)

Sorry my english.

Regards!
B
3
Posts: 2
Reputation: 179

Post » Mon Jun 29, 2015 3:50 pm

Hi, I think in this case you shouldn't use the physics behavior (it can be really tricky sometimes) but the platform behavior with some tweaks instead.
I took the freedom to make some modifications in your project file to illustrate my tought, you're free to use it, or not...
Link: /s/2h0kpp8lu8jz5ke/pabloat_CopterModified.capx?dl=0
To conclude, you can do the helicopter control with or without physics, even without any behavior if you want, it will only change the number of event you will have to do and the way you do them. Cheers.
B
8
S
1
Posts: 38
Reputation: 542

Post » Mon Jun 29, 2015 5:50 pm

Thank you @Logomachine!

I like the solution.

Question: How can i make the copter move from one place to another whe it stops over the "moving tile"? With a Pin?

Regards!
B
3
Posts: 2
Reputation: 179

Post » Mon Jun 29, 2015 6:16 pm

You can improve the inertia thing using the standard velocity equations in 3 directions - it will be near enough. You only need precision for flight simulators (and then they are just better approximations)
My tutorial through development blog is at http://myconstruct2dev.blogspot.co.uk/
B
12
S
3
Posts: 221
Reputation: 1,328

Post » Mon Jun 29, 2015 7:33 pm

pabloat wrote:Thank you @Logomachine!

I like the solution.

Question: How can i make the copter move from one place to another whe it stops over the "moving tile"? With a Pin?

Regards!

To teleport from one place to another you can create two sprite (ex: portal.a, portal.b), then in your sprite sheet:
-----------------------------------------V conditions V---------------------------------------------------V action V---------------------
--- "copter is overlapping portal.a" & "copter platform speed = 0" --> "copter set position to portal.b" ---
----------------------------------------------------------------------------------------------------------------------------------------------------
But like I said there is multiple way to get a same result, so always try to think to all the conditions that could be involved to execute the action you want.

PS: a pin is made to fix objects together
B
8
S
1
Posts: 38
Reputation: 542


Return to Game Development, Design & Ideas

Who is online

Users browsing this forum: No registered users and 0 guests