I've always wanted to have a 3D game with a full 360 degree field of view. (Rumor has it, Boba Fett's helm gives him a 360 degree view).
So, i started implementing a mapping of global 3D coordinates to player local 3D coordinates (some Quaternions & Matrices) and a mapping of player local 3D coordinates to Spherical Coordinates.
Spherical coordinates are (distance, azimuth, inclination), ([0, inf), [-180, 180), [-90, 90)).
azimuth=0 is forward, azimuth = -180 or azimuth = 180 is backward and azimuth = 90 is to the right
inclination = 0 is forward, inclination 90 is up and inclination -90 is down.
next i mapped azimuth and inclination to x and y coordinates of the Gosu window.
distance i used for sizing the objects so they appear to be further away by being smaller.
Here is a gif showing all 3 possible rotations (right, down and right-spin)
Yes, these labels are correct, when you turn right, everything moves left, when you turn down, everything moves up, and when you spin right, everything spins left.
As you can see, when you turn down, everything that is behind you (right and left screen borders) moves down.
There is a Youtube video
of an early version. Apparently it looks "a bit trippy" ;)
The repos at github
is where i keep the most recent working copy of the game.
For easy linux compilation you need the current git gosu installed.
For windows compilation msvc2012 needs to be installed to the default path. Use codelite (a crossplatform IDE) to compile the sandbox_msvc project.
Gosu precompiled binaries are in the repos.
To play in multiplayer, you need to forward udp AND tcp ports 50042 (as a client udp 50042 is sufficient)
Currently connecting to a server needs to be done by passing the argument "connectTo=address" on the command line.
You can also shoot odd gray balls, which steal points from other players when hit by your gray ball.
You gain score by collecting trolls. The closest troll is highlighted in a green sphere.