Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / Lightshifters - a full fov spaceflight sim
- - By oli.obk Date 2012-08-27 23:23 Edited 2012-09-10 10:08
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.
Parent - By oli.obk Date 2012-09-02 16:48 Edited 2012-09-02 17:23
now it also runs under windows, the controls are still a bit messed up due to some bug, so keep your mouse in the center of the screen and only move it slightly away from the center to turn in space.

download here: Lightshifters uploaded 02.09.2012 18:37

Note: this has been compiled in windows 7 with msvc2012. Since I have no clue about windows compilation it might not run on your machine. Please post your system and whether this runs on it or not.

[edit] Note: it does not run on windows XP, msvc2012 cannot (yet) compile for winxp
Up Topic Gosu / Gosu Showcase / Lightshifters - a full fov spaceflight sim

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill