Announcement

Collapse
No announcement yet.

Space sim experiment

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [GAME] Space sim experiment

    Greetings,
    been messing around making a KSP style game, not seriously more of something to mess around with, but **** i love this engine,
    Have a spherical Inverse square law based gravity model working, will sustain orbits just fine and with using origin shifting ive managed to get 1,000km away from the planet before jitters started arising(before it would kill its self at around 18km).
    Pics to show, all input welcome
    Last edited by Rareden; 10-06-2017, 02:56 AM.

    #2
    This should help with the jitter problems you are facing.

    My advice would be to make it into a component and call it as needed.

    Edit - Also I need to ask - How are you lighting your space scene?

    I am curious as I am making a space sim as well.
    Last edited by HeadClot; 10-06-2017, 04:25 AM.

    Comment


      #3
      Originally posted by HeadClot View Post
      This should help with the jitter problems you are facing.

      My advice would be to make it into a component and call it as needed.

      Edit - Also I need to ask - How are you lighting your space scene?

      I am curious as I am making a space sim as well.
      Thats the setup im currently using for rebasing, has allowed me to get out to 1,000km, using a >= to check if distance is greater than 5km, it will then center the world on player.
      not sure why it started to jitter, perhaps because i was still calculating the gravitational pull on the satellite at that distance,
      For lighting its simply a directional light with distance field shadows and volume lighting for indirect light on the satellite, but im pretty sure the scale is too big for DFS at this point anyway
      Dont suppose anyone knows how to align my pawns camera to the normal of the planet? so the planet is always bellow it(along Z) up to a certain altitude
      Last edited by Rareden; 10-06-2017, 06:10 AM.

      Comment


        #4
        I love to see people making space games with UE!

        As far as the jittering, the game that Im working on which is more arcade than sim, has a space component, and when we used Physic Linear Velocity and were working on super small scales (.01m) it would be bad. However, having movement be done by "Force" and changing the engine scale to centimeters, with 1uu = .01cm, seem to yield better results.

        What scale are you working with? And 1000km may just be the cut off in general for the engine. It you scaled everything down or do some rendering trickery, you could probably get a much larger play area and the player wouldnt know much of a difference.
        Production Manager at Goodnight Games

        Goodnight Games Social Media: Twitter | Facebook | Instagram |Youtube

        Subscribe to Newsletter

        Comment


          #5
          Originally posted by AlonzoCPO View Post
          I love to see people making space games with UE!
          Market for space games atm kind of sucks versus crafting / survival / horror, but hey...

          Originally posted by AlonzoCPO View Post
          As far as the jittering, the game that Im working on which is more arcade than sim, has a space component, and when we used Physic Linear Velocity and were working on super small scales (.01m) it would be bad. However, having movement be done by "Force" and changing the engine scale to centimeters, with 1uu = .01cm, seem to yield better results.
          Depends, you often run into other issues too like Z-fighting and Physics to be specific...
          Ever delved into C++ to study Add-Force-AddImpulse vs. Set-Physics-Linear-Velocity?

          Originally posted by AlonzoCPO View Post
          What scale are you working with? And 1000km may just be the cut off in general for the engine. It you scaled everything down or do some rendering trickery, you could probably get a much larger play area and the player wouldnt know much of a difference.
          If using interpolation mostly you can run to 1000's of Km's without using Origin Shifting.
          For that you need Spacegames with larger ships, multiple times larger than Pawns etc.
          Where it gets messy is putting small scale + mega-scale objects in the same play area.

          Comment


            #6
            Originally posted by franktech View Post
            Market for space games atm kind of sucks versus crafting / survival / horror, but hey...

            They do suck, BUT they are doing better than they were a few years ago.

            Depends, you often run into other issues too like Z-fighting and Physics to be specific...
            Ever delved into C++ to study Add-Force-AddImpulse vs. Set-Physics-Linear-Velocity?

            The Z fighting and physics we did notice, and was (still is a pain) to deal.
            Im going to be honest and say no. Reason: The boss, is adamant in limiting my "going down the rabbithole time." I quote: "This is not a space sim, make it work."


            If using interpolation mostly you can run to 1000's of Km's without using Origin Shifting.
            For that you need Spacegames with larger ships, multiple times larger than Pawns etc.
            Where it gets messy is putting small scale + mega-scale objects in the same play area.

            Interpolation eh? I'll have to give that a look.
            The scaling thing, is and will continue to be an issue. However because things here are stylized, and not really real world scale, I can get away with stuff.

            Nonetheless, Im super interested in seeing how you progress with this!
            Production Manager at Goodnight Games

            Goodnight Games Social Media: Twitter | Facebook | Instagram |Youtube

            Subscribe to Newsletter

            Comment


              #7
              Originally posted by AlonzoCPO View Post

              Nonetheless, Im super interested in seeing how you progress with this!
              Thanks for your interest, since the OP ive got calculations for orbital elements in place and working (mostly correctly) and that planet in the OP was only 10km radius, got a 600km radius one now.

              There dosnt seem to be a limit for distances when using origin rebasing, ive been out to 10million meters and its still fine.. well.. apart from the rendering engine, it stops rendering things that are more than 7ish million away, thinking of perhaps some system that will scale the visible planets down gradually and move them towards you.
              Or perhaps if there is a way of rendering a 1/1000 scaled version of the system with a camera in a separate level and using its view to replace the view of the main player, kind of like photoshop where you would have "rendering layers" in a sense.

              alternatively also messing around with the engine source code attempting to change the vector system into doubles(so many errors though!)

              you got a thread on your project? would love to have a look.

              Comment


                #8
                Originally posted by Rareden View Post

                Thanks for your interest, since the OP ive got calculations for orbital elements in place and working (mostly correctly) and that planet in the OP was only 10km radius, got a 600km radius one now.

                There dosnt seem to be a limit for distances when using origin rebasing, ive been out to 10million meters and its still fine.. well.. apart from the rendering engine, it stops rendering things that are more than 7ish million away, thinking of perhaps some system that will scale the visible planets down gradually and move them towards you.
                Or perhaps if there is a way of rendering a 1/1000 scaled version of the system with a camera in a separate level and using its view to replace the view of the main player, kind of like photoshop where you would have "rendering layers" in a sense.

                alternatively also messing around with the engine source code attempting to change the vector system into doubles(so many errors though!)

                you got a thread on your project? would love to have a look.
                At the moment, no thread. Waiting for the go ahead from my boss on that part.

                Congrats on your success! Thats pretty **** awesome! Actually that reminded, me: I am somewhat curious as to how youre are using interpolation to drive the movement of your player. . .

                With origin rebasing, that is exactly what Im noticing, though I haven't even started the real optimization process. And Im using a mix of physics forces and offsetting the player with results still being acceptable. Only issue, is when you have a small scale mesh and try resetting the world origin you get snapping, since the result is truncated. Also, one has to remember, to take into account (if your game has that sort of thing) updating the origin when the player is moving at FTL. That said, we are going for a more arcade approach, so things are not scaled realistically and the not, therefor we can get away with some things.

                As I mentioned earlier, I was thinking about an approach, such as a two camera system. You have an appropriately scaled solar system, with just a camera that renders the scene to a cubemap in another level, that contains your ship/etc. In the ship scene, it would necessary have to move, except for rotating and pitching.

                If you want to go further, you can set up some systems, to where the solar system is subdivided, and you store all your data points in a table, that youll have to convert from Solar Space to Local Space (whats around the ship).

                Doubles is another way to go, but man that would be a headache.
                Production Manager at Goodnight Games

                Goodnight Games Social Media: Twitter | Facebook | Instagram |Youtube

                Subscribe to Newsletter

                Comment


                  #9
                  Originally posted by AlonzoCPO View Post

                  At the moment, no thread. Waiting for the go ahead from my boss on that part.

                  Congrats on your success! Thats pretty **** awesome! Actually that reminded, me: I am somewhat curious as to how youre are using interpolation to drive the movement of your player. . .

                  With origin rebasing, that is exactly what Im noticing, though I haven't even started the real optimization process. And Im using a mix of physics forces and offsetting the player with results still being acceptable. Only issue, is when you have a small scale mesh and try resetting the world origin you get snapping, since the result is truncated. Also, one has to remember, to take into account (if your game has that sort of thing) updating the origin when the player is moving at FTL. That said, we are going for a more arcade approach, so things are not scaled realistically and the not, therefor we can get away with some things.

                  As I mentioned earlier, I was thinking about an approach, such as a two camera system. You have an appropriately scaled solar system, with just a camera that renders the scene to a cubemap in another level, that contains your ship/etc. In the ship scene, it would necessary have to move, except for rotating and pitching.

                  If you want to go further, you can set up some systems, to where the solar system is subdivided, and you store all your data points in a table, that youll have to convert from Solar Space to Local Space (whats around the ship).

                  Doubles is another way to go, but man that would be a headache.
                  As far as im aware im not using interpolation, franktech mentioned it but im not sure how to use/enable it.
                  Is there a way to have multiple levels running at the same time? im aware of level streaming but does it use the origin of the master world or does it have its own as its streamed in.

                  Ive fixed probably over 1,000 errors so far with converting to doubles, and some work arounds, so hopefully i can pull it off

                  Comment


                    #10
                    Just curious, after your conversion to doubles, is it solid? Or still some errors? I heard something like physics part cant handle doubles but I dont know for a fact. I wanted to convert to double vectors as well but people just say its a headache and would take forever.

                    Comment


                      #11
                      Originally posted by ptjackson View Post
                      Just curious, after your conversion to doubles, is it solid? Or still some errors? I heard something like physics part cant handle doubles but I dont know for a fact. I wanted to convert to double vectors as well but people just say its a headache and would take forever.
                      haven't finished yet, but 3 of 4 main components correctly compile now, hopefully an end in sight.
                      Its taken me about a week so far, not as bad as i thought it was going to be but will see if it actually works properly once it compiles correctly

                      Comment


                        #12
                        Got a question - Would it be possible to share the work that you have done with doubles via a branch on github?

                        Comment


                          #13
                          Originally posted by Rareden View Post

                          As far as im aware im not using interpolation, franktech mentioned it but im not sure how to use/enable it.
                          Is there a way to have multiple levels running at the same time? im aware of level streaming but does it use the origin of the master world or does it have its own as its streamed in.

                          Ive fixed probably over 1,000 errors so far with converting to doubles, and some work arounds, so hopefully i can pull it off
                          My apologies. This is why proofreading is important. Though my question still stands: How is interpolation a better option?

                          If Im not mistaken, the origin of the might be the default, however you could probably shift it to the center position of the sublevel.

                          Nice work on the doubles! As far as physics concerns, you may have to convert back to single floats and adjust accordingly.
                          Production Manager at Goodnight Games

                          Goodnight Games Social Media: Twitter | Facebook | Instagram |Youtube

                          Subscribe to Newsletter

                          Comment


                            #14
                            Originally posted by Rareden View Post
                            As far as im aware im not using interpolation, franktech mentioned it but im not sure how to use/enable it
                            Originally posted by AlonzoCPO View Post
                            Though my question still stands: How is interpolation a better option?
                            Interpolation is better??? No, better than physics if that's your only option, see 5 below...
                            Better to rewind / recap for a sec.. Some 'Large-Worlds' options floated on the forums:

                            1. Wait for Epic to convert the engine to doubles.
                            Could be a very long wait, as Epic only plan to do this if 1 day it serves their own games.
                            For example Epic were reluctant at first to add MP Origin Shifting. So switch to Unigine?

                            2. Convert the Engine to Doubles yourself. Its been tried....
                            But where's the magical Edit and Replace tool to convert the engine each new version?
                            Plus, how best to handle PhysX? (Any new news on PhysX and 'double precision' etc?)

                            3. Opt for a hybrid solution as the skilled TheJamsh shows off here:

                            4. Use Origin Shifting...
                            Works in single-player out of the box always has. Although some AH posts talk about lag?
                            Works in multiplayer thanks to nkey PR, but only client-side, still must account for Server.
                            So how about server-side solutions? Both PUBG and Squad had to find hybrid solutions.

                            5. What's left? No time / patience for any of the above, what are the real limits anyway?
                            The docs and forums talk about 20k limit and jitter, but thankfully this isn't the whole story.
                            You'll just have to do some tests and find out where the limits are for your particular game.
                            But imagine a COD or Halo style multi-world game with Guns / Characters and Vehicles.
                            Sniper scope jitter on the 10th planet is probably just the start of the problems you'll see.

                            Instead, lets take a 'Homeworld' type space game, without separate ship collision boxes.
                            Plus, no separate attached objects to the ships except for HUDS etc if necessary... Then....
                            Using large ship meshes, you might find you can go out to 1000-2000 km's, and it works.
                            That's based on using interpolation movement nodes of the SetActorLocation variety etc.
                            Add-Linear-Physics-Velocity seems to work too but it has limits, so you'll just have to test!
                            Last edited by EntrpriseCustomr; 11-05-2017, 11:51 PM.

                            Comment


                              #15
                              Originally posted by HeadClot View Post
                              Got a question - Would it be possible to share the work that you have done with doubles via a branch on github?
                              If theres no legal issues around doing so then sure, keep in mind with it however is that im not master programmer.


                              Originally posted by franktech View Post


                              Interpolation is better??? No, better than physics if that's your only option, see 5 below...
                              Better to rewind / recap for a sec.. Some 'Large-Worlds' options floated on the forums:

                              1. Wait for Epic to convert the engine to doubles.
                              Could be a very long wait, as Epic only plan to do this if 1 day it serves their own games.
                              For example Epic were reluctant at first to add MP Origin Shifting. So switch to Unigine?

                              2. Convert the Engine to Doubles yourself. Its been tried....
                              But where's the magical Edit and Replace tool to convert the engine each new version?
                              Plus, how best to handle PhysX? (Any new news on PhysX and 'double precision' etc?)

                              3. Opt for a hybrid solution as the skilled TheJamsh shows off here:

                              4. Use Origin Shifting...
                              Works in single-player out of the box always has. Although some AH posts talk about lag?
                              Works in multiplayer thanks to nkey PR, but only client-side, still must account for Server.
                              So how about server-side solutions? Both PUBG and Squad had to find hybrid solutions.

                              5. What's left? No time / patience for any of the above, what are the real limits anyway?
                              The docs and forums talk about 20k limit and jitter, but thankfully this isn't the whole story.
                              You'll just have to do some tests and find out where the limits are for your particular game.
                              But imagine a COD or Halo style multi-world game with Guns / Characters and Vehicles.
                              Sniper scope jitter on the 10th planet is probably just the start of the problems you'll see.

                              Instead, lets take a 'Homeworld' type space game, without separate ship collision boxes.
                              Plus, no separate attached objects to the ships except for HUDS etc if necessary... Then....
                              Using large ship meshes, you might find you can go out to 1000-2000 km's, and it works.
                              That's based on using interpolation movement nodes of the SetActorLocation variety etc.
                              Add-Linear-Physics-Velocity seems to work too but it has limits, so you'll just have to test!
                              Very interesting, im doing something along the same lines as "TheJamsh" but after reading that there are some changes to make, thanks for that link.
                              Last edited by Rareden; 11-06-2017, 05:54 AM.

                              Comment

                              Working...
                              X