Solarex GL, a 3D space flight module for Solarex

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 13 May 2015, 14:33

Spaceports are now also included in the 3D display, but I have no proper models yet, and navigation close to a rotating planet is difficult. The engines of the ship are way too strong, and it is really hard to close in smoothly to a spaceport. I've managed to land successfully, but I can't expect this kind of patience from a player and I'll need to find a solution for this.

The other update for today is the cockpit graphics, which have been adapted a little. I think this version will be close to final.
Attachments
new_cockipt-spaceports.jpg
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby beoran » 13 May 2015, 22:52

The most ergonomic solution is to have an "automatic landing" option/key.
beoran
 
Posts: 35
Joined: 03 Feb 2013, 22:27

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 14 May 2015, 22:43

I guess that will be the best solution. Manual docking/landing was a hassle in Elite and Elite II as well.

The past few days I've been trying to learn how to use the programmable pipeline from OpenGL 3.2 and newer, since it seems that driver vendors want to fade out legacy OpenGL support. In some areas it feels like a step backwards, one must program things in the shaders that former OpenGL version did for the user. But on the other hand, it is more powerful this way, and also one has better control over whats actually happening. But there was and still is a lot to learn for me about the new API and the GLSL language.

It's been a tough struggle, but now I've got the code together to display planets and space ships with the programmable pipeline, using VBO/VAOs. That should also make more detailed planets possible.
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby smcameron » 16 May 2015, 05:26

Cool. I have found programming shaders rewarding, but *hard*. All too often faced with "why is there just a black screen?" and finding myself saying, "Uuuuuunggggh!!! Come on, brain! Think... just... a .. little... bit.... harder."
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 16 May 2015, 22:23

I hate those moments. There are too many possible reasons why nothing shows up. Shaders can't be debugged (at least I'm not aware of such an option). OpenGL does magic things in between the shader stages. And often it's something really obscure to a newbie that gives you the black screen. Also my brain isn't built for math. Last night I was struggling for hours to get the labels onto the planets again, and while that should have been a thing of some minutes it took hours till I found the mistake.

I've been peeking into your earthlike planet generator code, and found two intersting facts - you use simplex noise as a noise source too, and you are willing to write much more code for a planet generator than I am :p
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby smcameron » 16 May 2015, 22:52

Actually OpenSimplex noise, which is different than Ken Perlin's Simplex noise, though the results are similar. See http://uniblock.tumblr.com/post/9927969 ... -noise-too
This is an interesting read as well: http://www.java-gaming.org/index.php?topic=34365.0
smcameron
 
Posts: 377
Joined: 29 Oct 2010, 23:44

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 18 May 2015, 15:31

Hmm, I missed that thread on JGO, it fell into a time when I was inactive there. Thanks for poiunting me to OpenSimplexNoise. I had no idea that the original simplex noise was patented. I had learned about it on JGO, too, and thought it was a good replacement for value noise which I had been using before.

OpenSimplexNoise creates visually slightly improved planets, but it is significantly slower than the simplex noise which I had been using before. 5 seconds to create 20 space bodies doesn't sound much, but it makes a really long hyperjump animation sequence in a game. Well, I need a better animation to be played while the system is created ...

After changing the noise generator, I had another go at the polar caps, and finally found a somewhat pleasant solution. The planet color maps still can be improved. Also, this was the first time that I visited the new Sol system in the game. The planet shown is the earth mirror planet from the game, home of the terraneans.
Attachments
polar_caps.jpg
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 19 May 2015, 14:42

Slowly Solarex GL closes in to Solarex in terms of UI panels - the ship info panel is now available in Soalrex GL, too. Still left to do are the ship yard and the equipment shop, and eventually the resource harvesting system will need a complete new implementation to make use of the 3D space and planet views.
Attachments
ship_info_v1.jpg
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 19 May 2015, 21:32

I've published a new release:

http://sourceforge.net/projects/solarex ... x_GL/r005/

Changes since r004:

- Space display uses programmable OpenGL pipeline (OpenGL 3.2) now. That should help performance but might have introduced new bugs (I'm almost certain that there are some which I haven't tracked down yet).
- Ship info panel
- Improved planet generator, only enabled for earth and mars type planets, mars type planets still look bad

Overall I think Solarex GL slowly reaches a playable state. Unless some crippling bugs show up which I'm not aware of at the moment. Trading goods should work fully, the quest/job system is missing an UI to see the job list and accept them, and resource harvesting is still in need of a complete new design. I think I'll do the quest panel next.
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 20 May 2015, 11:58

The bulletin board works, but the quest system has a problem. It uses pop-up dialogs, which unfortunately lock up the game. It seems to be some interference between OpenGL and the Swing EventQueue which I had experienced in early days of the project and which made me head for a pure OpenGl based implementation.

So, I must rework the dialogs and find a different solution. This will take some time ...
Attachments
bulletin_board_v1.jpg
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 21 May 2015, 15:05

Almost there, did the equipment shop, second last panel. Now there is only the shipyard left to do, and most likely tons of bugs to fix.
Attachments
equipment_shop_v1.jpg
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 23 May 2015, 22:43

I had forgotten about a panel - the system map panel. While it doesn't look like much, it is very handy to select destinations for the auto pilot. Basically it is a 2D projection of the system and before Solarex GL it was the main panel to move the ship. This function now moved to the space panel, but the autopilot destination selection stayed.
Attachments
system_map.jpg
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 25 May 2015, 20:51

I feel ashamed. OpenGL played tricks on me, and the "front" vector of the display and the "front" vector of the ship got out of sync once you left the x-z plane, i.e. flew up or down. I don't feel ashamed for the hideous ways of OpenGL so that the "front" vector of the view transform somehow isn't dir4ected to the middle of the screen and one needs the inverse transform (what sort of logic is behind that?), but that I didn't notice the problem throughout 5 release. Sigh. And when I noticed, it took way too many hours to come up with a solution.

I've published r006 now, with fixes for the "forward" problem. The ship should now always fly there where the center of the window is. Tilting and rotating looks a bit odd, but I think it is correct - the ship rotates around the ships "up" vector, and tilts around the "right" vector, which often ends at an odd position in regard to the systems ecliptic, but as far as I can tell, it's calculated correctly.

http://sourceforge.net/projects/solarex ... x_GL/r006/

Also, the new system map and a fixed equipment shop panel are included. You can buy and sell resource harvesting drones in this version, but there is no UI yet to activate or deploy them. And no graphics. Also, your ship will still fly by magic if you sell the drive. And the drive doesn't need any fuel, even if you keep it ... lot's of small things left to do.
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Re: Solarex GL, a 3D space flight module for Solarex

Postby Vandar » 01 Jun 2015, 20:33

A new version is out now:
http://sourceforge.net/projects/solarex ... x_GL/r007/

- Some fixes for saving and loading games
- System info panel shows proper planet previews
- Suns should always show up correctly now in system info panel
- Lowered average planet count for red giants, white dwarfs, neutron stars and black holes
- Adjusted sun colors for red giants, brown dwarfs and neutron stars
In soviet russia, code debugs you.
User avatar
Vandar
 
Posts: 322
Joined: 17 Mar 2014, 14:32

Who is online

Users browsing this forum: No registered users and 1 guest