Game Development Reference
In-Depth Information
Now launch your project to check that the aliens are correctly spawned and their po-
sition is centered with respect to the player's ship and the camera. If needed, tweak
the SwarmManager position and the numerical values inside the for {} cycle until
you get a setup you are satisfied with.
Next we take care that the swarm moves according to the snake-like moving pattern
we described at the beginning of this tutorial. Things could become a little more com-
plex here, so stick with us. We would also like to state here that there is no single
way to code things while working with videogames, though some ways are better
than other. What we suggest here is the way we consider good enough for the goal
of this tutorial, and those of you who are proficient with programming could find bet-
ter ways to achieve the same result. We strongly recommend you to always try and
find other ways that work better for you whenever it's possible.
Search WWH ::




Custom Search