1. Post #1
    -XI-'s Avatar
    June 2007
    36 Posts
    Hello,

    First of all, I don't think this is the correct forum section to post this. If a moderator knows where it should go, is it possible to move the thread?

    This is a project I've been working on for quite a long time now: SpaceCraft Control. It all started with SpaceBuild, in which you could either build a ship easily using hoverballs or the shuttle entity, which wasn't really realistic regarding newtonian physics, or try to make your own steering system to control all 6 degrees of freedom. SpaceCraft Control is my contribution to the 2nd option. Here's a presentation video of the version 13.5:


    Download link for version 13.7 (did some updates)


    Also, here's another project, based on SCC: SpaceCraft AutoPilot


    credits posted:
    SpaceCraft Control 13.5

    For Garry's mod


    Addons

    Wiremod: http://www.wiremod.com/
    Joystick module: http://www.facepunch.com/threads/403...ut-module-with...
    Physics performance settings: http://www.garrysmod.org/downloads/?a=view&id=65191


    Models

    AFF_GMOD: http://www.garrysmod.org/downloads/?a=view&id=65313
    Created by the AFF team: http://www.affuniverse.com
    Check their current projet: http://www.moddb.com/mods/angels-fall-first-planetstorm

    Eternal Silence models: http://www.garrysmod.org/downloads/?a=view&id=63344
    Eternal Silence's website: http://www.eternal-silence.net/


    Maps

    gm_celestials: http://www.garrysmod.org/downloads/?a=view&id=121078
    gm_reaction: http://www.garrysmod.org/downloads/?a=view&id=58099


    Music

    Boards of Canada - Dayvan Cowboy: http://youtu.be/lrBZeWjGjl8
    BLU Majesty MT3 Polysoft tell simulation OST: http://youtu.be/NPYFlAn8Ds0


    Special thanks to the Swiss Gaming Community: http://swissgamingcommunity.ch/
    Best regards,

    -XI-
    Reply With Quote Edit / Delete Reply Windows 7 Switzerland Show Events Winner Winner x 13Zing Zing x 1Dumb Dumb x 1 (list)

  2. Post #2
    Gold Member
    Cone's Avatar
    August 2011
    20,109 Posts
    This shouldn't be here, I think. This seems more appropriate for the Lua section.

    That said, this looks fairly interesting. You might want to tell the SpaceBuild Revival team about this.
    Reply With Quote Edit / Delete Reply Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  3. Post #3
    -XI-'s Avatar
    June 2007
    36 Posts
    Actually, I didn't do any LUA coding for this project. The ship is an ordinary prop controlled by a wire Expression2.
    Reply With Quote Edit / Delete Reply Windows 7 Switzerland Show Events Winner Winner x 2 (list)

  4. Post #4
    McMissile's Avatar
    May 2007
    464 Posts
    That's awesome!
    I had made one of these myself a year or so ago, but it wasn't anywhere near as complex as this and wouldn't adjust correctly (it was a feature I implemented, but it got glitchy after 100,000 pounds or so).
    How exactly did you get it to stabilize? Do you just use applyOffsetForce to keep the ship held locked at its angles, and then free an axis once a certain movement key is pressed?

    Anyway, great job!

  5. Post #5
    A six sided fish cube of the Flounder variety
    TheGoodDoctorF's Avatar
    March 2010
    3,381 Posts
    This is pretty awesome :D

  6. Post #6
    -XI-'s Avatar
    June 2007
    36 Posts
    Basically, SCC measures the ship's angular and translation velocity and decomposes them into the ship's local XYZ and Pitch Yaw Roll axes. Then, corresponding thrusters apply force proportionally the the decomposed velocity, in the opposite direction (because we want it to stop moving, not accelerating).

    Nevertheless, thruster's output is limited to a maximum value set by the realism parameter. If the realism parameter is high, maximum thrust is fairly low which is why the ship drifts a lot more.
    Reply With Quote Edit / Delete Reply Windows 7 Switzerland Show Events Informative Informative x 1 (list)

  7. Post #7
    Pringles.'s Avatar
    May 2010
    3,734 Posts
    Now this is revolutionary. Amazing job.
    Reply With Quote Edit / Delete Reply Windows 7 Finland Show Events Agree Agree x 1 (list)

  8. Post #8
    -XI-'s Avatar
    June 2007
    36 Posts
    Thanks a lot!

  9. Post #9

    July 2009
    420 Posts
    with you permission, i would like to post a link to this page in the Spacebuild revival thread


    edit:
    i think if you were to take what you have done and see if you (or someone else) could transfer it across to lua. you would have a very, Very nice sent which i think even the SPEP team would be intersted in.

  10. Post #10
    -XI-'s Avatar
    June 2007
    36 Posts
    Of course you can! SpaceBuild is what motivated me to make this in the first place!

    As for the transfer across LUA, if it is possible to keep the same physical properties, I'd really love to. The problem is that I don't know anything about LUA.

  11. Post #11
    CmdrMatthew's Avatar
    August 2010
    1,186 Posts
    Would you mind releasing the E2s to this? I would be more than willing to convert this into Lua.

  12. Post #12
    Do you have intentions on releasing the E2?

    Mother of god while i was watching the video my mind was telling me: X3 X3 X3 X3 X3 X3 X3:TC X3:TC X3:TC X3:TC X3:TC X3:TC

    Lols
    Reply With Quote Edit / Delete Reply Windows 7 Netherlands Show Events Agree Agree x 1 (list)

  13. Post #13
    Gold Member
    Crazy Knife's Avatar
    November 2006
    2,670 Posts
    This is really cool, ever think of making it like those old school 1980s games where you add a gun to the spaceship allowing it to blow up the asteroids?
    Reply With Quote Edit / Delete Reply Windows 7 United States Show Events Agree Agree x 3 (list)

  14. Post #14
    -XI-'s Avatar
    June 2007
    36 Posts
    Weaponry can easily be added, simply weld a turret or a Gcombat canon (if you want to destroy props) to the ship.

    As for the release, I was thinking about making a pack containing the models, the expressions as well as an adv dupe with wiring already done, but this will have to wait for a while as I'm on another project for now.

    For the LUA conversion, I can send the E2 code but I would first be sure that nothing is changed. Also, the joystick part looks difficult to make.
    Reply With Quote Edit / Delete Reply Windows 7 Switzerland Show Events Agree Agree x 1 (list)

  15. Post #15
    BoxMonster's Avatar
    July 2008
    186 Posts
    This is ludicrously awesome. I turned a beat-up car into a spaceship in about 30 seconds. Hehe.

    Is there an easy way / any way of making this work with multi-prop ships? Is that feature planned for the future?

  16. Post #16
    -XI-'s Avatar
    June 2007
    36 Posts
    Oh, someone found the Garry's mod upload! Just to let you know, the file you downloaded was meant to the wiremod forums' users to "beta test" it. A bug-free version should be uploaded soon and download links will be provided on this forum thread as well.

    Unfortunately, multi-prop ships aren't supported because it would use too much of the E2's ops (at least, the way I tried ended up that way). So the only way to use SCC with multiple prop is to spawn it on a big base prop and weld other smaller stuff to it. And sadly, I don't have time anymore to work on SCC, just enough for the release.

    By the way, did you encounter problems with the test pack?
    Reply With Quote Edit / Delete Reply Windows 7 Switzerland Show Events Informative Informative x 1 (list)

  17. Post #17
    BoxMonster's Avatar
    July 2008
    186 Posts
    Whoops, I didn't even notice there wasn't a download link in the OP... Hehe. I haven't tested it on SpaceBuild yet, but I used the gravity and air density cvars for spacey tests.

    Everything seems pretty much fine. One thing I noticed is that the hover mode doesn't do anything, although I'm not sure if that was the intention; you still drift slowly downwards (assuming there is gravity present). But I'm not sure if this was because of the wire chips/seat being welded to the prop or not.

    Aside from those quite minor issues, the whole system worked really well. Awesome stuff. :]

  18. Post #18
    Gold Member
    Treelor's Avatar
    February 2005
    2,122 Posts
    It slowly drifting downward, to me, sounds like its taking the downward velocity of the ship and countering it rather than setting a target altitude. Setting a target altitude pretty much turns it into hoverball mode, but it works - quite well.

  19. Post #19
    Gold Member
    Splambob's Avatar
    January 2005
    1,235 Posts
    Beautiful. It's a shame that source maps are so small or I'd find myself playing more spacebuild. Half a kilometer cubed isn't quite enough room for the whole space experience.

  20. Post #20
    -XI-'s Avatar
    June 2007
    36 Posts
    Thanks a lot for testing SCC!

    When flying with gravity, it is normal that the ships falls. It will fill slower than freefall because stabilisation thrusters are reading vertical velocity and apply a proportional and opposite force. Activating hover thrusters won't change this because the ship doesn't automaticly maintain altitude. You have to use your vertical translation command input to vary your altitude. For joystick users, this is done by holding the joy 6 button (translation mode) and moving your joystick along the pitch axis. You can also use W and S. For keyboard users, helod the translation mode key (shift) and use W and S.

  21. Post #21
    -XI-'s Avatar
    June 2007
    36 Posts
    Allright, final release pack uploaded:


  22. Post #22
    blorgyboy's Avatar
    October 2008
    182 Posts
    This is simply AMAZING, thank you for making this.