Golden Axe Plataform, Jump & Movement

Get help using Construct 2

Post » Mon Jul 15, 2013 7:19 am

Hello everyone,

I'm a noob Construct 2 and Game Design-Programming student. So, I have basically 0 experience with terms and all my knowledge is very basic.

Me and my friend decided to develop a game with a 2.5D plataform, as seen on Golden Axe, Cadillacs & Dinosaurs, Streets of Rage, where the player have a 8-Direction movement, but can also jump (moving, on the same place, over edges and onto "higher" plataforms).

This is where our whole problem started. We have absolute no idea on how to do it, which behaviors we should put with wich objects. We tried creating a player with both 8-Direc AND Plataform, but didn't work since the player never had a plataform under him so he could jump. We have tried even a few other events but none worked so far.

Can anyone please help us?


Examples:

http://cdn.toucharcade.com/wp-content/uploads/2009/06/golden_axe_3.jpg

http://casualtygamer.com/wp-content/uploads/2008/11/golden-axe51-400x305.jpg
B
3
Posts: 4
Reputation: 183

Post » Mon Jul 15, 2013 8:28 pm

I would realy love to see an answer to this as well....The only post i found addressing this issue to a certain point is http://www.scirra.com/forum/25d-jumping-proof-on-concept-need-help_topic62057.html. But still the player cannot retain his platform behaviour on top of the box...
B
3
Posts: 6
Reputation: 212

Post » Mon Jul 15, 2013 8:33 pm

basically moving up and down and jumping is the same thing - sprite moves on Y axis. If you are using 8Direction behavior for movement you can then simply disable it when jump key is pressed. move (or animate) sprite along -Y axis, and when jump is finished enable 8Dir again.
Limitation of this is that you can't move while jumping.
If you wan't to move and jump at the same time do it same way but instead of disabling behavior add an offset for Y position.
ImageImageImageImage
B
155
S
62
G
41
Posts: 2,587
Reputation: 34,414

Post » Mon Jul 15, 2013 8:35 pm

I don't have the exact answer, but I was watching a game with similar inspirations being made in XNA. I think I remember them saying that the trick was to map your controls to the shadow on the ground. The art and everything else is attached to the shadow to give the illusion that you are controlling the person.

So you would then animate the character art moving up and down during a jump in relation to the location of the shadow.

I could be way off on this, but that was my understanding.

Its not as simple as just attaching the built in Behaviors, but I'm sure it can be done.
B
43
S
11
G
7
Posts: 232
Reputation: 7,230

Post » Mon Jul 15, 2013 8:48 pm

best to do like all other platformers, have a controlobject (square) to which the charactersprite is bound + also bound the shadow to controlobject, then some (pseudo)code

is jumping > set shadow.x to object (so shadow moves in direction but not up)
else > set shadow.x and shadow.y to object (always set position shadow to object)vtrix2013-07-15 20:49:29
ImageImage
B
66
S
19
G
7
Posts: 815
Reputation: 9,718

Post » Tue Jul 16, 2013 5:47 am

Thx everyone that replied!

So, after trying out about everything everyone posted, here is my feedback:

[QUOTE=landril82] I would realy love to see an answer to this as well....The only post i found addressing this issue to a certain point is http://www.scirra.com/forum/25d-jumping-proof-on-concept-need-help_topic62057.html. But still the player cannot retain his platform behaviour on top of the box...[/QUOTE]


I tried it, thats surely the closest thing I've seen to what I really want, though the way it is atm isn't really satisfactory. I didn't paste and copy the capx given, I actually tried to adapt to what I had and for some reason/mistake it didn't quite work in the end.


[QUOTE=shinkan] basically moving up and down and jumping is the same thing - sprite moves on Y axis. If you are using 8Direction behavior for movement you can then simply disable it when jump key is pressed. move (or animate) sprite along -Y axis, and when jump is finished enable 8Dir again.
Limitation of this is that you can't move while jumping.
If you wan't to move and jump at the same time do it same way but instead of disabling behavior add an offset for Y position.[/QUOTE]


[QUOTE=sman118] I don't have the exact answer, but I was watching a game with similar inspirations being made in XNA. I think I remember them saying that the trick was to map your controls to the shadow on the ground. The art and everything else is attached to the shadow to give the illusion that you are controlling the person.

So you would then animate the character art moving up and down during a jump in relation to the location of the shadow.

I could be way off on this, but that was my understanding.

Its not as simple as just attaching the built in Behaviors, but I'm sure it can be done. [/QUOTE]


Both are very similar solutions, what I tried to do was creating a shadow with 8 Direct behavior behavior, an Art with Platform and Pin behaviors and a edge(plataform) with Solid and Jump-Through behaviors. So what I got on my events is:

Sys - start layout > art pin to shadow
                   > shadow opacity 50

keyboard - jump pressed > art platform enable
                        > art unpin
                        > art platform vector Y -750
                        > edge solid disabled
                        > shadow opacity 0

art - on landed > art platform disable
               > shadow X to art X
               > shadow Y to art Y
               > art pin to shadow
               > shadow opacity 50

This way the jump thing worked perfectly, with no movement restrictions. However when I land I can go back down by simple walking past the plataform and if I disable the 8 Direct I simple get stuck. I tried creating another plataform under the first that would get solid once the art landed. That solved the free movement problem but then I couldn't jump back down.


[QUOTE=vtrix] best to do like all other platformers, have a controlobject (square) to which the charactersprite is bound + also bound the shadow to controlobject, then some (pseudo)code

is jumping > set shadow.x to object (so shadow moves in direction but not up)
else > set shadow.x and shadow.y to object (always set position shadow to object)[/QUOTE]


I'm not sure if I got it, but it didn't work for me :(R3H02013-07-16 05:55:52
B
3
Posts: 4
Reputation: 183

Post » Tue Jul 16, 2013 5:55 am

Last but not least thx everyone for your time, I really appreciate your attention. I'm gonna keep thinking of possible solutions and if I ever get to it I'm gonna post here!

:)
B
3
Posts: 4
Reputation: 183

Post » Tue Jul 16, 2013 10:09 am

@R3HO it only worked in my head..., i can see the problem now its pretty complex, i think the only option is making a custom controller and even then, there's alot of trickery


edit: what if the platformcontroller always stays on the ground platform,
and up and down moves only the sprite visually (2nd controller)
(in line as sman118 suggested)

you would set the x of sprite to the controller, y of sprite is controlled by up and down, until jumping, disable up and down control, back on floor enable up and down, have an upper en lower bound of the y movement

then you would need some trickery to jump to other platforms

the shadow im sure can be arranged once movement is ok
vtrix2013-07-16 10:26:41
ImageImage
B
66
S
19
G
7
Posts: 815
Reputation: 9,718

Post » Tue Jul 16, 2013 2:22 pm

After giving it a thougth i came up with this solution by combining platform width custom behaviours.

https://www.dropbox.com/s/l54dt3x85wcfrha/25D_Platform_Movement.capx

its just a basic approach but it can be extended according to your needs.
B
3
Posts: 6
Reputation: 212

Post » Tue Jul 16, 2013 2:24 pm

Oh i forgot, use WASD to move,space to jump...
B
3
Posts: 6
Reputation: 212

Next

Return to How do I....?

Who is online

Users browsing this forum: keeno79 and 12 guests