Page 4 of 4

Re: My first Game - Android Platformer

PostPosted: Tue 29 Jan 2019, 15:13
by jack
MattLB wrote:Actions: Do = player.Y(top) +Variable(sunset) to Y position of camera (layer: "Town")
Works well, thank you :)

Re: My first Game - Android Platformer

PostPosted: Fri 1 Feb 2019, 02:52
by jack
I added 3 times the same object with an animation, but they are not in sync. That's the same problem I had at the waterfall.
Is it because I have too many sprites with animations in my scene? There are 35 with all collectibles.
coin.gif
coin.gif (229.34 KiB) Viewed 339 times

Re: My first Game - Android Platformer

PostPosted: Fri 1 Feb 2019, 14:28
by Bouh
You can use the actions for say to your coins "Hey after x time you can go to the next frame" and this for all yours objects called coin.

Re: My first Game - Android Platformer

PostPosted: Sat 2 Feb 2019, 02:42
by MattLB
Are you adding the coins in the scene editor, or creating them with events?

If created in the scene editor they should be in sync, but you can check that they are all set to the same animation frame by clicking on each instance and looking at the bottom of the properties window. You could also force them all to the same animation frame in the "At beginning of the scene" event.

If you are creating them with events, then ones created at different times will often be out of sync, because they will be created with frame 0, but existing instances may be on any of the other frames. You could enforce synchronisation by first checking that another coin exists (check number of objects >0) , then use the select random object event and capture its current animation frame in a variable. Then create a new coin and set its animation frame using the variable.

Alternatively, you could create the new coin first, then use a "for each object" sub-event to set all coins (new and old) to animation frame zero to match it.

Some of these will look more glitchy than others.

Oh, and I recognise that player character sprite. ;)

Re: My first Game - Android Platformer

PostPosted: Sat 2 Feb 2019, 03:33
by jack
MattLB wrote:Are you adding the coins in the scene editor, or creating them with events?
In the editor, but now I have tried adding with action, the same result.
I found out that the problem only exists if the X position is higher than 5231. Mysterious! :geek:
Now I try your tips.
Image
MattLB wrote:Oh, and I recognise that player character sprite. ;)
Yah is one of the best and famous freebies :) unfortunately no source files included :roll:

Re: My first Game - Android Platformer

PostPosted: Tue 5 Feb 2019, 11:21
by jack
I have created a simple example.
The problem is not the absolute X position but the distance from Player Start to the coins. An action that set the frame to 1 or change the animation, works only if it is very close to the coins. (also not 100% perfect, some have a frame offset) If I run a bit away and come back, the animations are messed up again.

Re: My first Game - Android Platformer

PostPosted: Sat 9 Feb 2019, 17:23
by jack
That's how it works now.
Image

Re: My first Game - Android Platformer

PostPosted: Mon 11 Feb 2019, 14:59
by jack
Okay now you can have a first look at my little game :)
https://jackii.itch.io/jumpingjack
https://streamable.com/8wlrt

Re: My first Game - Android Platformer

PostPosted: Sat 16 Feb 2019, 21:03
by jack
How can I toggle this?
At every key press, not automatically from 1 to 0 to 1 forever.
Image
Here the same
Image

Re: My first Game - Android Platformer

PostPosted: Sun 17 Feb 2019, 16:39
by Lizard-13