I’m a late adopter, but when I heard that driver vendors want to stop supporting legacy OpenGL, particularly on Linux, I felt it’s getting time to bit the apple and learn how to use the programmable pipeline and the OpenGl 3.2 core.
So much of the past week went into learning and testing, and finally converting parts of Solarex GL to use OpenGL 3.2, removing calls to legacy functions. There is still some functionality using legacy Gl, but the space display and related stuff is now done via shaders as VBOs. I assume this will help performance, too, but that wasn’t a problem before either.
Besides that I’ve converted one more UI panel to OpenGl based display routines, so only the ship yard and equipment shops are left to do.
Some new screenshots can be found over here:
http://forum.freegamedev.net/viewtopic.php?p=64242#p64242
I’m also updating the planet generator, but I’m a bit stuck in a performance bottleneck there. The planets are generated during the hyperjump towards the new system, and 5 or 6 seconds don’t seem much as a number, but watching the hyperjump animation for 5 seconds always makes me wonder if the game has frozen, or if something will happen. Improving the planet generation, that is, adding more realism to the planet surfaces will make it slower and the problem worse. A better hyperjump animation could help to keep the players entertained. Or I need very patient players.
Planet generation is done in parallel, so all CPU cores are used, besides improving the algorithm itself, I can’t do much to speed up the planet generation.
Edit:
I’ve published a new release:
https://sourceforge.net/projects/solarex/files/Solarex_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 (see: http://forum.freegamedev.net/viewtopic.php?p=64268#p64268 )
- 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.
Edit 2:
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/files/Solarex_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.
Equipment panel and system map screenshots are over there: http://forum.freegamedev.net/viewtopic.php?p=64291#p64291