So I’ve been working on my vector graphics space dueling game. One of the features I knew I wanted from the start was a really big playground. Most games of this type limit you to the size of the screen, and on iOS devices, especially the iPhone/iPod Touch, this would make for a pretty limited space in which to battle.
So, at first I just made an auto-zooming camera so that when ships got farther away from each other, the camera would zoom out, always pointing at the center between the two ships. This way, ships could get much farther from each other up to a practical limit where they’d just become too small to be playable. I tried to make the playground wrap around so that if players reached the limit, they’d appear on the other side, but this meant a jerky camera motion as it tried to keep both ships in view, which made things confusing.
Smoothing out the camera movement/zoom would mean that a player would stop seeing their ship for a few seconds, so in the end I just made “solid” walls around the play field and let the ships bounce when they hit the edges. This way the camera was smooth and players always saw their ships.
Now, the next problem was the fact that the total playground was still not too big. When two ships were chasing each other, it was too soon that they reached the edge and bounced off, breaking the flow of the chase. This, I think, is no fun.
So, what I decided to do after thinking about it for a while was to make the actual playground infinite and just limit the maximum distance between the ships. So, now, the “bounding box” follows the players around. This means that as long as the two ships stay relatively close to each other, they can both advance in the same direction indefinitely. If both ships go off in different directions, the camera will zoom out up to a limit, where players will bounce of the edge if they try to cross it.
Right now I think this is the best solution and I’m happy with the results. Of course, the problem would not exist at all if the screen was split, but that’s not the kind of game I want to make. First, I don’t like how it limits your visibility and you don’t get a feel for the positions of both ships. What I love about my solution is that you can always see the relevant parts of the play field and you always know which direction you have to go.