Putting the 'role' back in role-playing games since 2002.
Donate to Codex
Good Old Games
  • Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.

Open Space Program: best space program

vean

Scholar
Joined
Jan 3, 2016
Messages
296
Oh God, where do I begin?

Ever since I first played Kerbal Space Program I wanted an open source game like it, except with good performance and doesn't crash all the time.

In May this year I spent some time borrowing ideas from Pioneer and managed to make... something. I've picked it up again now and worked on it for the past week. It currently looks like this:

Y0OHzjM.png


There's a procedurally generated planet, a ship made out of parts, proper physics, etc. You can fly into orbit and land back and that's about it.

It's a long way from being KSP though, and unfortunately due to the chronic lead exposure I suffered as a child on the way to school in Eastern Europe, reasoning about 3D games is a great struggle for me.

Nevertheless I'm probably 5% of the way to something fun, and I can probably put in another 10% at least, so if I had help from a couple of people we could do this.

In other words I'm asking for help.

"But," I hear you asking, "don't I need to be a programmer/etc?"

No really, no. Much of it is just a matter of finding the information necessary and then putting it together through trial-and-error.

What needs to be done?

Oh lots.

For example:
The camera controls need to be fixed. The "free" camera should always have up pointed to -position when close to the ground, and the "chase" camera should orbit the ship instead of being in a fixed position.

Currently there's just one implicit reference frame because there's just one non-rotating body, but really we need more of these.

The orbital physics "works" but it's unstable in the long run - the ship gains orbital energy slowly over time. Someone needs to bother the Bullet physics people about this. I might have fucked something up or maybe we need a different integrator.

It needs a way to load meshes, possibly OBJ files, either written from scratch or adding something like assimp.

Some textures might be nice.

It needs basic starbox and atmosphere rendering.

Bullet physics has an interface for debug drawing, but it's resisted my attempts so far. It would be super useful though.

Speaking of bullet physics, for unknown reasons, btBvhTriangleMeshShape(s) do not collide with each other, unless 1 of them is mass 0. Why?

...

I could go on and on, but I don't know if anyone's going to be interested.

The code can be found at: https://github.com/dvolk/oglplay

You'll need bullet physics compiled with double precision (is that even necessary?) and imgui. I can write more detailed instructions if anyone cares.

Cheers
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
I've both contributed to other people's games (Pioneer and Cataclysm:DDA) and finished my own, so I have a pretty good understanding of what it's going to take. There's nothing on the TODO list that I can't do myself, it's just going to take a while.

Focusing too much on one aspect of a game (like graphics) is something a lot of people seem to fall into, but it's never been my problem. I work a bit on everything at the same time.
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
Also, you should have a look at Elite Dangerous to see something that looks better than anything I could have achieved in 10 years.
Eh, graphics aren't everything. In fact...

Elite Dangerous
Overall:
Mixed (16,970 reviews)

Kerbal Space Program
Overall:
Overwhelmingly Positive (31,668 reviews)

Some info on my project is still here.
10 years ago I posted some of the best screenshots at the Frontier forums, and it may have been that Braben looked at them and got som inspiration out of it. Or so I like to believe.
I shall take a look

The only thing that would interest me is if you have implemented some kind of real time LOD terrain? Everything else pretty much everyone can do.

I have indeed.

O1GLyV9.png


Well, it's the same as used in Pioneer, except theirs is multithreaded and fixes the seams.

And you should prepare for some serious challenge from shaders, because these days no one is going to be satsified without impressive athmospheric scattering and shadows. I can already tell you that planetary rings + shadows will be a tough challenge.
This would be nice but it's definitely far in the future.

Or for example I see these black seams where your terrain comes together, I think it's problems like that which will be 100 times harder than anything you have done until now.

Another thing is distances I am sure you are aware that if you model entire solar systems variables might overflow.

For the starfield you can pretty easily get all required data from a star database. I used hyg80 http://www.astronexus.com/hyg
You only need to calculate a vector for the position and place something, either billboard or a point and set the color according to the apparent magnitude. It will look pretty amazing if done right, but I dont know a good method for nebulae.
These problems were already solved in Pioneer a long time ago. All I need to do is trace what they did. Some of them I already know but just haven't judged important enough at this point: e.g. the black seams are fixed by a polygon extending into the ground from each quad node into the ground. The normals at the edges just require me to track which patch neighbors which. Kinda tricky but nothing beyond me.

Unfortunately Pioneer was written by lots of people over a long period of time. It's a bit difficult to read.

Indeed initially I intended to add bullet physics to Pioneer, and this grew out of the sandbox I was using to familiarize myself with it.
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
Well, again, I didn't as much solve it as I read Pioneer's source and bothered fluffyfreak until I could reimplement part of it.

There are six square meshes mapped onto a sphere using what's apparently called bilinear interpolation. Each patch is then a quad tree that divides as you get closer. It's clever.

vUtEQRd.png
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
Because...?

Anyway like I said this has been solved in Pioneer and I know how they did it, I just haven't gotten around to it

pioneer_03.png
 
Last edited:

vean

Scholar
Joined
Jan 3, 2016
Messages
296
I don't know what you're taking about. Why don't you boot up pioneer and try to find these problems. I guarantee you're not going to be seeing any non-isotropy or seams at any height.
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
Well, we'll worry about that later.

Meanwhile I've been working on an orbital map

F1CuuiL.png
 
Unwanted

Illuvatard

Unwanted
Joined
Sep 5, 2016
Messages
226
Nevertheless I'm probably 5% of the way to something fun, and I can probably put in another 10% at least, so if I had help from a couple of people we could do this.

In other words I'm asking for help.

"But," I hear you asking, "don't I need to be a programmer/etc?"

No really, no.

:lol:

Well, good luck but I think this will probably be more than a bit too much and also there is already a very similar game so.
 
Unwanted

Illuvatard

Unwanted
Joined
Sep 5, 2016
Messages
226
Well done.

I have done similar stuff some years ago and my warning is that you should not try to make more from this than it is. Dragging other people in is the first step that you will regret later on. Provided there is a response at all, which I dont think.

Doing a prototype was ca 1 month of work. That is not much but a lot can be achieved within the first month, when you are still highly motivated. At the end I had photorealistic planets and spent 2 more years occasionally doing stuff when it was fun. I got as far as doing procedurally generated asteroids that looked absolutely stunning. But you cannot work forever at this pace. I also made it clear that this was never going to turn into a more than a demo program. In fact, as I had expected it all stopped abruptly at some point and now have no interest left whatsoever, and I am just glad I never harbored any illusions. And this project of yours will end exactly the same, I can tell this at a glance by looking at your message, and the fact that you ask for help already.

If you dont understand, calculate how much work you have done, and how much work would be necessary for the entire product, subtract and then think for a moment how much is still ahead of you.
And as for people with more knowledge than you coming forward, ask yourself why they would do that and not work on their own project.

You should post some screenshots of your work even if it's not going anywhere. Sounds pretty cool.

Edit: oh I see you did already. Nice!
 
Unwanted

Illuvatard

Unwanted
Joined
Sep 5, 2016
Messages
226
Well, it depends what you want to do. Having nice planets is nice...when is it nice enough? If you want a detailed planet explorer sim then it is probably beyond the scope of a gaming project, better join nasa for that.

As for this weird projection stuff, no idea why someone would do that. A sphere is a pretty simple geometry. Just imagine if you took the same attitude for every geometry out there. That is why we use normal maps and height maps, they work for the general case of geometry. That is why it's helpful to learn to do the art I think, when you approach it like a programmer you can easily wind up reinventing the wheel.

Want to make cool stuff? There is also multitexturing as well. So you can make a whole bunch of normal maps and color maps and then play like a little kid painting your planets with various craters, colors and so on. Or you can use some procedural generation to do it.

When I was making a game with planets my planets were just shitty rotating textures but they actually still looked surprisingly good. I only wanted them on a small scale anyway though.
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
Looks great, but Open Space Program 0.0 is already more of a game than Outerra or Space Engine ever will be.
 
Unwanted

Illuvatard

Unwanted
Joined
Sep 5, 2016
Messages
226
Well I've written my own modeling tools so I think I can hand a sphere division :lol:

LODs are actually very simple. There is no reason that part would be remotely hard, it just requires using a custom engine to make it work. Coming up with content for the whole planet on the other hand is a monumental task, let alone for whole galaxies.

But you are going way too far to say he has to be able to do nasa visualizations. He said he wants to make a kerbal space program kind of game...just look at those ridiculously shitty graphics :lol: Or look at no man's sky...meh. It is hardly the most amazing graphics but still very groundbreaking for the gaming world.

At least this game won't be on unity, that is a good start. It would be better off to ditch bullet physics though and do all that part correctly instead. Otherwise you will forever have inane incorrect shit occurring for mysterious reasons, they you will fix that and it causes some other bug.
 
Unwanted

Illuvatard

Unwanted
Joined
Sep 5, 2016
Messages
226
Well the gameplay part is the hard part. I mean the graphics are almost automagical, especially like in that Infinity:quest of earth demo. It's not like the old days when you actually did everything yourself, basically all your work is to just send data to the card. That is why I realized ogre is worthless, basically if you go that low level then you may as well just use OGL and not jump through hoops figuring out how ogre wants you to do shit, dealing with stupid bugs and also amazingly shitty programming practices and performance.

He could already get that level of art into his 'engine' easily but it's just a matter of making the art.

Getting all the data from nasa to make a realistic moon for example though like I said would be a huge pain. But why even do that? I mean it depends what game you make but like you said the gameplay is the main issue with all these 'games' not the art, anyway.

No man's sky is kinda crap looking like I said. I wouldn't even worry about this crap in that sense.

But I would avoid going into some crazy form of rendering, too. You can whip up a decent planet in zbrush in an afternoon and that is 'good enough' for most purposes. If you want to land on it in real detail just start with a series of ever largers sphere LODs and then ultimately a flat plane as the final LOD, then add detail to them later once the system works properly with scale.

I mean with outerra I am sure it took years to get all that going and it's largely dealing with and generating the data. plus they still have no game. If you go down that same path you are just going to get the same result. You can spend infinite time on rendering and terrain and physics and not have much to show for it beyond the 5 minute version in the infinity demo.
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
grIXO0b.png


Now with a moon. Called "Moon".

Taking suggestions for names of planetary bodies.
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
It's because I haven't fixed the seams or normals yet. When I do it will look fine.
 

vean

Scholar
Joined
Jan 3, 2016
Messages
296
OSP now has inertial and rotational reference frames. It's adapted from code from Pioneer.

here's a very exaggerated video in the moon's rotational frame.



It also has sphere of influences, and ships can move between frames. So you can take off earth and land on the moon and go back just like in KSP.

But there are some, uh, problems, with multi-part ships changing frames that will have to be worked out
 
Last edited:

vean

Scholar
Joined
Jan 3, 2016
Messages
296
sHpJj3l.png


I added a skybox and HUD elements and cleaned up the code a bit
 

As an Amazon Associate, rpgcodex.net earns from qualifying purchases.
Back
Top Bottom