Implementation Advice Sought
by David Vega · in iTorque 2D · 11/09/2011 (8:37 pm) · 3 replies
Greetings,
I am working on a game currently that sees the player controlling the enemy sprites instead of the hero sprite. The hero sprite is still the point scorer, the player must essentially hamper the enemy sprites to let the hero sprite get from point A to point A again.
My question revolves around implementing the hero sprite's movement. The hero sprite needs to change animations and facings based on its position along the path and it would have to detect collisions against enemy sprites.
After having read some threads on paths it would seem to me that the path option is no appropriate for what I wish to implement.
Any other suggestions?
Thanks In Advance,
David
I am working on a game currently that sees the player controlling the enemy sprites instead of the hero sprite. The hero sprite is still the point scorer, the player must essentially hamper the enemy sprites to let the hero sprite get from point A to point A again.
My question revolves around implementing the hero sprite's movement. The hero sprite needs to change animations and facings based on its position along the path and it would have to detect collisions against enemy sprites.
After having read some threads on paths it would seem to me that the path option is no appropriate for what I wish to implement.
Any other suggestions?
Thanks In Advance,
David
About the author
#2
11/13/2011 (5:00 pm)
Would the player character work in a similar manner to Lemmings?
#3
The hero sprite does technically move in a path (let us say oval but with some interruptions as noted next).
The facing changes are based on turn corners or navigating the "kinks" which include jumping from platform to platform, or swinging using two vines.
The aim of the player is to ensure that the platforms are ready and safe for jumps and that there is no interference while swinging on the vines (perhaps a snake is there instead of a vine, or a spider descends and grabs).
The enemy sprites are pretty much stationary (barring their animation) but are the interaction points for the player.
I do not think it is like Lemmings - I think I am the only one in existence who did not really like that game.
Thank you in advance,
David
11/17/2011 (10:59 pm)
Thank you for the replies.The hero sprite does technically move in a path (let us say oval but with some interruptions as noted next).
The facing changes are based on turn corners or navigating the "kinks" which include jumping from platform to platform, or swinging using two vines.
The aim of the player is to ensure that the platforms are ready and safe for jumps and that there is no interference while swinging on the vines (perhaps a snake is there instead of a vine, or a spider descends and grabs).
The enemy sprites are pretty much stationary (barring their animation) but are the interaction points for the player.
I do not think it is like Lemmings - I think I am the only one in existence who did not really like that game.
Thank you in advance,
David
Torque Owner David Helmer
The Kids
From the sounds of it you wouldn't want to have the hero sprite use a path since it may change a bunch dependent on your enemys human behavior.
I would create a few behaviors to implement the different concepts you just mentioned:
I think faceEnemies would handle changing your enemies where moveToTarget would help manage the hero moving to his target. Consider all the movement and how the movement would be affected in the moveToTarget behavior. It can be responsible for how his movement changes due to collisions as well as making sure he gets to his target.
Does that help?