Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (601)
Games in Android Showcase (171)
games submitted by our members
Games in WIP (649)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Quasar  (Read 3032 times)
0 Members and 1 Guest are viewing this topic.
Offline Alan_W

JGO Knight

Medals: 8
Projects: 3

Java tames rock!

« Posted 2011-12-04 17:56:32 »

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

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

Time flies like a bird. Fruit flies like a banana.
Offline StephR

Senior Devvie

Medals: 9

« Reply #1 - Posted 2011-12-04 20:00:04 »

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.
Offline Alan_W

JGO Knight

Medals: 8
Projects: 3

Java tames rock!

« Reply #2 - Posted 2011-12-04 20:04:35 »

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?


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.

Time flies like a bird. Fruit flies like a banana.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline StephR

Senior Devvie

Medals: 9

« Reply #3 - Posted 2011-12-04 20:26:17 »

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 ?
Offline Alan_W

JGO Knight

Medals: 8
Projects: 3

Java tames rock!

« Reply #4 - Posted 2011-12-04 20:59:35 »

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?

Time flies like a bird. Fruit flies like a banana.
Offline Alan_W

JGO Knight

Medals: 8
Projects: 3

Java tames rock!

« Reply #5 - Posted 2011-12-25 08:41:57 »

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...

Time flies like a bird. Fruit flies like a banana.
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

Jesse (12 views)
2015-07-29 04:35:27

Riven (35 views)
2015-07-27 16:38:00

Riven (18 views)
2015-07-27 15:35:20

Riven (20 views)
2015-07-27 12:26:13

Riven (11 views)
2015-07-27 12:23:39

BurntPizza (30 views)
2015-07-25 00:14:37

BurntPizza (41 views)
2015-07-24 22:06:39

BurntPizza (24 views)
2015-07-24 06:06:53

NoxInc (27 views)
2015-07-22 22:16:53

NoxInc (18 views)
2015-07-22 22:13:39
List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!