War In Space Day 2

WarInSpace2

As mentioned yesterday, the next thing needed was a camera component to put the playing field into perspective. Aside from implementing a OrthoCameraGameComponent which calculates the values required for an orthographic projection, I just moved the two ships to positions resembling the start situation of the original. I chose an orthogonal projection because I think it will make things easier in the beginning, especially with respect to toroidal space. This topic will come up again at a later point, for now suffice it to say that toroidal space refers to the way in which Space War’s or Asteroids’ objects can leave the screen on one side and appear on the other side.

Dealing with different resolutions

One thing I’m thinking about today is how to deal with different resolutions and how to measure the playing field on different screens. There are two problems here: varying aspect ratios and the so-called title safe area. The first problem is evident to everyone who has seen the shift from 4:3 display devices to widescreen devices like 16:9. If we would display the exact same image on both screens, on one of the screens it would have to appear stretched if it filled the whole screen in both cases. The second problem is related mainly to older televisions which can’t display the whole output area, so players might not see the whole of the image on their screen. The solution to this problem is to put every important part of the game inside the “title safe area”, which is an estimate of the area which will be visible on all devices across the board.

Microsoft mention these problems here, and I found a good article about it here.

I think my approach will be to assume a default of 720p. Probably, the playing field will simply be smaller when playing on a 4:3 device.

Next up

The logical next step would be to implement movement aside from rotation. My plan is to have rotation defined directly on the user’s input. On the other hand, to have the original experience of Space War, translation needs to be handled physically-based, therefore, the next thing on my list is a Physics component. Besides that, I only have one PC compatible XBox 360 controller, so I’m looking at encapsulating the input devices using soopahman’s input library in order to be able to use a second non-XBox 360 gamepad.