Possible to model a stellar system in real distances ?

MutosMutos Posts: 8Member
edited May 2017 in Programming

Hi all,

I'm looking for a game engine to make a solo space game with realistic dimensions. Refs could be FFE or Nexus for instance.

I only intend to have fixed orbits for objects such as planets, asteroids, and stations. I will begin with 2D orbits for sake of math simplicity. Starships will be moving freely in a fully newtonian mode, with many-g accelerations and special in-universe 'interference' rules when near other ships or gravity wells to allow dogfight. Camera will be 3D, centered around an object, be it ship or an orbital object.

This is for the Hoshikaze 2250 project, which aims at writing a Sci-Fi universe in multiple media. We are a NfP association, we have already published 3 short stories and 2 novels, and are currently working on a 3rd novel, a comics, a paperback RPG and a boardgame.

As for the videogame subproject, called "Stars of Call", we have a first prototype using the excellent NAEV engine and outlining the universe with a gameplay based on exploration, some trading and combat, faction reputation and of course missions. It's a 2D iso game and we're looking for going 3D. So we're searching for a suitable engine.

First thing we intend to make is a Stellar System Editor, able to built stellar systems as backgrounds settings for the game. This will allow us to test viewing, UI and the global feel of the experience. Then we'll add the game mode proper and progressively introduce gameplay features, beginning with simple space navigation and climbing up to more complex features.

So could Godot be used for that and how ? Thanks in advance !


  • MutosMutos Posts: 8Member

    Hi all,

    I should add, I tested that some years ago in VB6 ^-^ It worked, but I learned about the pitfalls...

    First, there is the coordinates precision. Everything must be in double and the camera must be at the world center, implying that you have to adjust at every frame each object for camera moves. Now, doubles would not be an issue any more, I imagine, and perf issues about moving every single object instead of the camera were already manageable in VB6 in 2004...

    Then there is the Z-Fighting. You had to precisely adjust Z-buffer depth to prevent that, and it was the worst thing, because it wasn't easy to solve. In fact I never found a really satisfying solution. I don't know how graphics cards and DX/OGL have evolved on that point (the issue was caused by having 32-bits Z-buffers at the time), so it may well still be a nuisance...

  • RukiriRukiri Posts: 58Member

    Maybe wait till godot 3, godot 2's 3d isn't that great but you should be able to do this as long as you know the math and actual distance you should be able to do this without much issue.

  • wombatstampedewombatstampede Posts: 45Member

    AFAIK, godot still uses 32bit floats, also in the 64bit build and probably also on current 3.0 builds.
    See these links:

    So if you really go for the dimensions of our stellar system I have doubts that it'll go work of the box with godot. Either a special build with 64bit doubles is needed (you can do that because godot is open source, can't do such things that way on closed source game engines) or you'll have to work around it.

  • MutosMutos Posts: 8Member

    Hi Rukiri,

    Thanks for your answer !

    For now I'm struggling with the editor, just making a textured sphere is not so intuitive. I got the sphere mesh from the Marble Madness tuto, my classical 4096x2048 Earth texture, but all I get is an ugly bunch of pixels, seemingly one pixel per poly.

    Maybe I should move the topic into a "Noobs struggles" category !

  • wombatstampedewombatstampede Posts: 45Member

    Distribution of a texture on a mesh is defined by the UV-mapping which is defined in the mesh. Basically you define ot in the 3d editor of your choice (often Blender). You'll prob need to watch a youtube tutorial to understand it.
    UVs are texture coordinates for each corner (vertice) of each face.

    Somebody recently posted a planet shader on facebook:

    (Mobile link, sorry)

  • MutosMutos Posts: 8Member
    edited May 2017

    Hi wombatstampede,

    Thanks for the information !

    So it's useless for me to keep up trying Godot if the default real is simple instead of double.

    The great thing with Godot is, that I just have to paste both Godot execs and my project folders in a base folder to have a working installation that does exactly the same in my home Linux and in a Windows box I use when commuting, but on which I can't compile and I have near to no rights. So I just can't recompile Godot each time a new version comes out.

    As for the planet texture, time is the issue. It's normally the most simple thing to do : display a textured sphere... I know about UV mapping, but it's the first time I got an issue with it and as I'm not a graphist, I don't want to go learning Blender. I tried a number of times and never got anywhere, not enough time to get into it...

    The base issues for me are time and machine limits. I got only 2x1/4h of commuting time each day for this dev, and I can only work on a machine where I have very limited rights. So I can't afford recompiling the engine or losing time to basic issues like displaying a textured sphere...

    Sorry to say that, as Godot seemed to be the ideal engine for my needs, with simple UI, powerful features but yet easy to use, and totally portable between my two machines. I wouldn't have imagined that a current engine wasn't built around doubles from the start, or that it couldn't display a simple textured sphere without much ado...

  • MutosMutos Posts: 8Member

    Hi all,

    Oh, and the planet texture issue is solved, even by using and downgrading a fur-making tuto ^-^ This may not be the simplest way to do this, but it works.

    So there is only the doubles issue that prevents me from using Godot...

  • NeoDNeoD Posts: 145Member

    On Blender you can create the UV map by going in "UV Editing" mode of the U.I instead of "default". Then in edit mode select the "Shading UV" tab.

    You can cut your model yourself by using "mark seam" on selected edges. Maybe for a sphere there is an automatic solution.

    The float type was changed on Godot 3.0. It's still under developpement but already usable to begin your project.
    You can get recents build thanks to "Purple Orange Games".


Sign In or Register to comment.