Quasar

Quasar - Space Trading Game

Mouse + Cursor Keys will move ship (slowly), so you can fly up to planets. Escape key quits game.
Key 1: Select Flight Screen
Key 2: Select Map
Key 3: Select Trading Screen

To Do (Still lots to go):

  • Add new HUD
  • Finish trading system so that prices vary with supply and demand
  • Add fuel consumption so you have something to spend your credits on
  • Make the docking system work properly
  • Add enemy AI and firing system

http://www.circuitswamp.org/projects/lwjgl16k2011/quasar.jnlp

Updates:
25/12/11: New code base at last. Added Map Screen and Trading Screen

Very impressive 3D space simulation ! I even crossed the way of a few viper-like ships in patrol.

Entering planet’s atmosphere was a cool feature, even if it will be very difficult to match Elite 2 quality on this point.

To be very honest, I think that doing a 3D space trading et piloting simulation should prove to be very difficult for only one man, and very time consuming too. Why don’t you limit yourself this time to a 3D space shooter, like Wing Commander or X-Wing ? And in a future game, you may add the trading and landing components.

The HUD is posing some design issues:

Airborne flight for planetfall: Conventional aircraft-like display:

  • Pitch bars: Oriented parallel to horizon. Indicate pitch attitude relative to local level
  • Roll Circle: Indicates roll attitude relative to local level. (Aircraft only have the top part, but I might continue to draw the whole circle)
  • Horizontal scrolling bars: Compass linked to horizontal component of true north.

Space flight: The problem is that there is no definitive reference for “down”
I could define an arbitrary North, East, Down coordinate system for the universe:

  • Pitch bars: Oriented parallel to universe North-East plane
  • Roll Circle: Indicates roll attitude relative to universe North-East plane
  • Horizontal scolling bars: Compass linked to North Vector of universe North-East-Down coordinate system.

This will lead people to orient their ships relative to the arbitrary universe down, so as to get a familar display. However, what if the desired vector to the next planet is vertically up or down? Conventional HUD displays do this really badly, with the roll attitude becoming unstable as 90 degrees is reached. The compass will be unstable too.

Maybe I should allow a course to be laid in for a star and then define a coordinate system based on that vector. Thus the compass, due north actually points to the destination. Pitch angle is relative to the line-of sight vector. Don’t know about roll angle, as there is a space degree of freedom here. Maybe just leave it at some arbritary value.

I think this coordinate system must be sticky - i.e. defined at the point of destination setting, although that is also a possibility, particularly as there is the problem of how to harmonise the HUD settings with those of the local planet, when we go for the landing. Do we just suddenly change the HUD display? Do we have separate readouts for the space parameters and planetfall parameters and fade over from one set to the other? Or do we dynamically update the frame of reference somehow, so it blends into the planet frame of reference as we approach it?

Maybe it’s as easy as setting the HUD frame of reference to that of the destination planet when it is selected.

  • Pitch bars: At long distances we are at 90 degrees - may be ok if I don’t draw and artifical horizon.
  • Roll bars: Problem - I think this may gyrate somewhat as the nose of the ship moves around the direct line of sight. Not good.
  • Compass: The problem here is that it should be displaying the horizontal component of north, which will also gyrate wildly.

So… It’s not really obvious. Any thoughts?

@StephR

I agree it might be a touch ambitious. The trading element shouldn’t be too hard though, and I think necessary to allow upgrades to be bought. The biggest problem at the moment is straightening out the horrendous mess I’ve coded.

Concerning your HUD, you may simplified it during space flight, by removing the pitch bars and the horizontal scrolling bars. Or the pitch bars may rotate with the roll circle which contains them.

Having two graphically different HUD for space flight and atmospheric flight would help the player to evaluate his/her situation.

I also noticed a very long green line coming from the core of some white star. Maybe the inoperative first design for a flight path, or a bug ?

The long thin line was a prototype navigation vector to a star to see how it would look. I think bugs on the pitch/roll ladders would look better, so it might disappear.

On the HUD, the best plan so far is to set the North East Down (NED) coordinate system when you select a destination planet.

  • North Axis is aligned with the planet, East axis is aligned with planet equator (I’ll cheat and not move the planets except in self rotation)
  • Now with zero pitch and roll, and North compass heading, you approach the planet, with the north pole uppermost.

Now as we close in, we need to blend over to local level. If we keep heading striaght for the planet, this could look a bit weird, as pitch would gradually rotate by 90. However if we fly to maintain zero pitch, the flight trajectory would blend into an orbital trajectory. A possible answer is to have separate graphics for space and terrestrial navigation and display both for a transition period. Still thinking.

Some pictures of space mode and terrestrial mode - but how to transition?

Christmas Update

Progress has picked up the last few days (as I had some holiday). The new code base still has plenty of rough edges, but the structure is much better. Most of the graphics and user interface is there now.

You can fly about the galaxy and use the Map and Trading Screens. At the moment fuel is not required to fly the ship, so trading is not fully tied into the game. There are some new design enemy ships. These are procedurally generated, so may change yet again.

Merry Christmas. I’ve got some presents to deliver…