KingdomRush-based movement

Get help using Construct 2

Post » Mon Jul 15, 2013 2:01 am

Hi guys.

My problem is, as the name of the topic suggest, that I would like my troops to move along a fixed path like those of kingdom rush.

I am aware of the pathfinding behaviour, I have tried plenty of things with this behaviour but with no succes until now. Any help would be appreciated.Jhonathan Ibanez2013-07-22 15:05:12
B
10
S
3
Posts: 75
Reputation: 864

Post » Mon Jul 15, 2013 2:50 am

If Kingdom Rush is the trailer I just saw, it looks like the example you want is the new RTS template that was just added in the Beta.

If you have the latest beta, select "New" in the menu, and in the search box enter "RTS"

edit: It's a bit advanced, but shows how to use pathfinding to move your units in formation while they shoot.Paradox2013-07-15 02:52:18
B
215
S
57
G
32
Posts: 900
Reputation: 38,777

Post » Mon Jul 15, 2013 6:24 am

Thank you very much for you quick reply. Unfortunately it seems like I cannot figure out how I could use the RTS sample to achieve my goal... I cant make my troops move along a fixed path, is there a way to make my troops march througn an object. Say I have a road image, I create a sprite object and put the my road image for that object, could I make my troops move through that object?Jhonathan Ibanez2013-07-15 06:25:27
B
10
S
3
Posts: 75
Reputation: 864

Post » Mon Jul 15, 2013 6:35 am

The "Pathfinding path cost" template may help with that. (another advanced technique.) I however haven't worked with the pathfinder yet, to be specific.
B
215
S
57
G
32
Posts: 900
Reputation: 38,777

Post » Mon Jul 15, 2013 6:35 am

I could make you an example, it is pretty easy.

You dont have to use something like "Pathfinding" or anything else.

You still need 1 ?
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Mon Jul 15, 2013 6:54 am

EDIT: Sry for double post

Darklinki2013-07-15 06:56:30
B
15
S
6
G
6
Posts: 512
Reputation: 5,555

Post » Mon Jul 15, 2013 2:48 pm

Paradox: Thank you. I took a look at pathfind cost and as you say it might help but at least I was not able to make it work, so I am going to try darklinkis option, thanks again though.

Darklinki: I would definitely thank you if you could make an example for me (I had a hunch about pathfinding not being the answer to my problem).
B
10
S
3
Posts: 75
Reputation: 864

Post » Tue Jul 16, 2013 1:36 am

Sorry to steal a topic but since there's an answer from just yerteday i better do it now:

My question in relation to this topic is:
In this kind of games where a lot of tiny sprites attacks in a fixed, predictable fashion as a whole. If i see this game i still imagine each group of tiny chars as one invisible object of the side of the entire group. And the little sprites are just a single sprite with animations that give the ilusion of being multiple different objects/sprites.

It's a good technique? It's the one used in this game or i'm talking nonsenses?
For example, Kingdom rush doesn't seems to use groups as Ninja Town do. Where each sprite/char can separate and be used individually.
B
31
S
4
G
4
Posts: 110
Reputation: 4,593

Post » Tue Jul 16, 2013 2:35 am

Hillstrom: You can ask whatever you want, I do not mind. I can answer you this from a programming perspective. I do not think that having a sprite with animations that make the illusion of various troops would be a bad practice, nor having separate sprites for every single unit is either. It is less memory expensive to use a single sprite for an entire or part of a troop, of course, but what really matters is the kind of game you want to create. If your game would gain no extra benefit from having every single unit with its own sprite then just dont do it. For example, if your game is going to implement a "power" that kills a single unit, not matter how much HP or whatever it has, then the single sprite troop approach is not an option, in the other hand if your game is not going to implement such specific mechanics, and maybe you are going to spawn a fixed number of troops (like in Lord of the rings battle for middle earth), then that approach would be correct. Hope it helps.
B
10
S
3
Posts: 75
Reputation: 864

Post » Tue Jul 16, 2013 11:44 am

If u want a sprite to follow a winding road like kingdom rush (fantastic game btw) try using both turret and bullet behaviors for that sprite, also you can set a point in the road for it to go to, then once it hits that point state the next point, plus you can add lots of events & actions for the sprite while its on its route around all your points. :)
B
4
S
1
Posts: 51
Reputation: 502

Next

Return to How do I....?

Who is online

Users browsing this forum: Alex Bryant, Congrats2u, oddreal, RogerThompson, waguilar and 10 guests