Im working on a game right now and have come pretty far.
The game is 2D and fairly simple.Im using 2d tool kit and itween to draw and animate most of my stuff. The player is attempting to attract customers to their cart to sell food too. Ive got more or less everything "done"- and now Im going back over my customers and adjusting and tweeking them.
Right now- they sort them selves into 1 of 2 empty objects just for orginzational sake. 1 is for wandering customers and the other for purchase customers. The purchase ones I would love to set up to sort of stand in a line... and im a bit at a loss of how to do this. Right now they will just stack on each other.
This screen shot will give you a basic idea of what the game looks like..
The customers travel to the truck and when they make contact with the trigger zone infront, the purchase system takes over. Given the way I have the characters moving (itween move to)- what would be a good way to get these guys to stand in a line and let me effect that line easily (such as cash everyone out at once quickly)?
Im guessing I need to impliment collisons, but Im hoping there is an easier logical way.
This is what I was thinking, and I would love some insight.
1. Customer gets the "pruchase zone" destination v3 and moves towards it and sorted into the customer line.
2. Customer maybe gets assigned a # (a little unsure the best way to do this... an array?) and offsets its destination by customer line # x 10?
3. Dynamically update that customer # until it hits the purchase zone?
I would like the line to be somewhat dynamic though and this seems like a very rigid way to go about doing it.
Id really appreciate any suggestions.