Sprite animation / Isometric project

Get help using Construct 2

Post » Sat Sep 17, 2016 9:53 pm

Greetings,
I'm fairly new to Construct 2 , but i'm not completely begginer . My question is how to make car move from point A to point B or even randomly ? Thought question i know , but it will make my life so much easier if someone could help me :D Image
B
3
Posts: 10
Reputation: 195

Post » Sun Sep 18, 2016 1:46 am

I have never created isometric games, but I came up with two ways to possibly move an object on its own.

1. Sprite animation

Basically, there are two animation sets; 'Default' and 'Driving' in this capx example.

When a user clicks anywhere on the screen, the 'Driving' animation will play.

You'll notice the animation is choppy, because the animation contains 10 PNG frames.

https://www.dropbox.com/s/raam5rd0dgf5g ... .capx?dl=0

2. Rexrainbow's MoveTo behavior

You need to install Rexrainbow's MoveTo behavior in order to open this example file.

https://www.dropbox.com/s/nv5db4nqzdbzb ... .capx?dl=0

You can download the behavior from by visiting this page.

behavior-moveto_t63156

To learn more about how to install behaviors, please visit this page.

how-to-install-plugins-and-behaviors_t63985

You'll notice the animation is moving smoothly.

And.. finally, this is how other people have found ways to make their players move around in an isometric environment.

Check them out. :mrgreen:

how-do-i-move-object-on-isometric-angle-bullet-custom_t127913
https://www.scirra.com/tutorials/5010/p ... tric-games
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 18, 2016 8:57 am

Message: Djomla can only post plain text URLS until they have 500 rep. 6 URLS modified. Why?
Gmoney wrote:I have never created isometric games, but I came up with two ways to possibly move an object on its own.

1. Sprite animation

Basically, there are two animation sets; 'Default' and 'Driving' in this capx example.

When a user clicks anywhere on the screen, the 'Driving' animation will play.

You'll notice the animation is choppy, because the animation contains 10 PNG frames.

https://www.dropbox.com/s/raam5rd0dgf5g ... .capx?dl=0

2. Rexrainbow's MoveTo behavior

You need to install Rexrainbow's behavior in order to open this example file.

https://www.dropbox.com/s/nv5db4nqzdbzb ... .capx?dl=0

You can download the behavior from by visiting this page.

behavior-moveto_t63156

To learn more about how to install behaviors, please visit this page.

how-to-install-plugins-and-behaviors_t63985

You'll notice the animation is moving smoothly.

And.. finally, this is how other people have found ways to make their players move around in an isometric environment.

Check them out. :mrgreen:

how-do-i-move-object-on-isometric-angle-bullet-custom_t127913
https://www.scirra.com/tutorials/5010/p ... tric-games

First thanks for replying and showing me all of this :mrgreen: I checked all of ways and MoveTo Behavior is the best, smooth animation that follows straight line is exactly what i needed. My bonus question is : Is it possible to make car path random , make car options where he can go and let him choose ? Image
B
3
Posts: 10
Reputation: 195

Post » Sun Sep 18, 2016 6:32 pm

You're most welcome, Djomla. :mrgreen:

Yes, it's possible to arrange them drive around on their own using pre-made paths, randomly.

To do that, it would be better to use Rexrainbow's rex_spline behavior that can be found on the following link.

behavior-rex-spline_t178563

Here's an example of an automated path moving of two cars in game.

https://www.dropbox.com/s/9w6hbld35mk3e ... .capx?dl=0

And.. (ahem..)

I thought finding a method of making things to occur randomly would be fairly simple, but it was found to be embarrassingly difficult.

I have tried to make an example for you for that portion, but failed to do so..

I don't know why it's not working.

Here's an example capx file I got stuck at.

https://www.dropbox.com/s/43opfvica4ult ... .capx?dl=0

Basically there were 3 things.

1. One car.
2. 3 waypoints (Waypoint1, Waypoint2 and Waypoint3).
3. I've set a variable to randomly choose one of numbers linked to a certain path-generation-and-function-call, but it's not working.

I've worked on this for more than 2 hours and ended up giving it up.

If anyone else can take a look and teach us how to do this, I would greatly appreciate it.

Thank you.

By the way, to make the game look good, the car needs to be rotated accordingly, when it reaches certain positions on the map, that is.
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Sun Sep 18, 2016 8:32 pm

Message: Djomla can only post plain text URLS until they have 500 rep. 3 URLS modified. Why?
Gmoney wrote:You're most welcome, Djomla. :mrgreen:

Yes, it's possible to arrange them drive around on their own using pre-made paths, randomly.

To do that, it would be better to use Rexrainbow's rex_spline behavior that can be found on the following link.

behavior-rex-spline_t178563

Here's an example of an automated path moving of two cars in game.

https://www.dropbox.com/s/9w6hbld35mk3e ... .capx?dl=0

And.. (ahem..)

I thought finding a method of making things to occur randomly would be fairly simple, but it was found to be embarrassingly difficult.

I have tried to make an example for you for that portion, but failed to do so..

I don't know why it's not working.

Here's an example capx file I got stuck at.

https://www.dropbox.com/s/43opfvica4ult ... .capx?dl=0

Basically there were 3 things.

1. One car.
2. 3 waypoints (Waypoint1, Waypoint2 and Waypoint3).
3. I've set a variable to randomly choose one of numbers linked to a certain path-generation-and-function-call, but it's not working.

I've worked on this for more than 2 hours and ended up giving it up.

If anyone else can take a look and teach us how to do this, I would greatly appreciate it.

Thank you.

By the way, to make the game look good, the car needs to be rotated accordingly, when it reaches certain positions on the map, that is.

I am so suprised and grateful on how much effort you put in every reply! I can't describe how much I'm thankfull at this moment. I'll check your work and i'll try to see if i can somehow fix it (even if i know it is impossible to do this on my skill and knowladge level :mrgreen: ) . If i find solution i'll post it here for sure ! :D Again thanks so much !
B
3
Posts: 10
Reputation: 195

Post » Sun Sep 18, 2016 8:57 pm

You're always welcome, Djomla. :mrgreen: Please ask at any time when you have questions. :mrgreen:
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Mon Sep 19, 2016 2:40 am

Djomla wrote:I am so suprised and grateful on how much effort you put in every reply! I can't describe how much I'm thankfull at this moment. I'll check your work and i'll try to see if i can somehow fix it (even if i know it is impossible to do this on my skill and knowladge level :mrgreen: ) . If i find solution i'll post it here for sure ! :D Again thanks so much !


After spending almost an entire day on this issue, I was able to find an answer. :mrgreen:

How the issue was resolved

I couldn't figure out why my variable based conditions won't work, so I tried various other methods (involving functions) in attempt to make it work.

When I tried complex functions that worked on my other games one by one, C2 generated an error message saying something went wrong with the plug-in's Line 60.. so I thought maybe the plug-in is not the best thing to use for this task.

So I went ahead and found a way to make the car sprite to move by using waypoints -- without having to use an external plug-in.

Here are the results

This example has 3 waypoint sets composed of 4 waypoints each. You can add as many waypoints as you like, for your future projects.

It's designed to go from Waypoint 1 to 3 then go back to Waypoint 1 and so on.

It will loop forever this way. :mrgreen:

https://www.dropbox.com/s/vt0s1wdu8gorj ... .capx?dl=0

This.. next example has 3 waypoint sets and almost identical to the previous one.

However, this one is picking waypoints randomly.

https://www.dropbox.com/s/blbdpw4vt80qd ... .capx?dl=0

The source codes are going to be easier to follow than the previous one, because this one doesn't have difficult functions.

Please ask me any questions when you have them.

I'll get back to you as soon as possible. :mrgreen:
B
11
S
6
G
15
Posts: 256
Reputation: 9,207

Post » Mon Sep 19, 2016 12:57 pm

This is the result i was looking for, thanks for the 10th time :mrgreen: .I think i can understand most of your event sheet but some parts of it are locked because i have free edition (I need to buy full version ASAP )
B
3
Posts: 10
Reputation: 195

Post » Mon Sep 19, 2016 1:19 pm

Djomla wrote:This is the result i was looking for, thanks for the 10th time :mrgreen: .I think i can understand most of your event sheet but some parts of it are locked because i have free edition (I need to buy full version ASAP )


You're always welcome, Djomla. :mrgreen: Please let me know which parts are locked. I'll take a screenshot and post it here.
B
11
S
6
G
15
Posts: 256
Reputation: 9,207


Return to How do I....?

Who is online

Users browsing this forum: Construct Monkey, David181, luckyrawatlucky and 10 guests