Planned Move the ship core. Simply.

    Joined
    Jun 11, 2015
    Messages
    7
    Reaction score
    11
    • Community Content - Bronze 1
    Ok, so hi! I'm Rymac. I am also a dev for a different studio, but I love Star-Made. I just recently encountered a similar problem with one of my games that my team is working on.

    In Star-Made there seems to be a bunch of posts about moving the ship core. Well I can see where this would be a rather tedious task (with assumptions of how you have it set up). I recently was working on a camp building system, where the campfire was the "Ship Core". It can't be moved. However as the camp grows, sometimes... it just has to be moved.

    So what I did, you just place a second one. Once it's placed a simple check to see if the Camp (Entity) already contains one. If it does ( which it should ) add a dialog box, "You can only have one of these, replace the existing one? Yes or No". That was my solution. Now also I saw, the issue of moving it in battle. Well what you could do, is force a reboot. I just find it super annoying as well as in my game, when you where just one position off, and had to start over. The way I came up with this was just moving file on my computer. "This file already exists, replace it?".

    It worked out great for us, but I would really like to hear your take on it. Please let me know what you think.
     

    Keptick

    Building masochist
    Joined
    Sep 26, 2013
    Messages
    4,062
    Reaction score
    1,841
    • Councillor 2 Gold
    • Railman Gold
    • Thinking Positive Gold
    I'll let the devs know about it, and kick/poke at the same time since it's a really annoying issue as you said. What you proposed does sound pretty simple :D

    However, I'm pretty sure that the reason core moving isn't in the game yet is not because of conceptual reasons but coding reasons. The core is the origin of the ship, and most entity functions rely on the core as a base location (I think), so coding a feature to change it's location might be more complicated than it sounds. It's more like moving the entire ship around the core, not the opposite, and that can takes a crapton of processing power/time on bigger ships. That's from what I understand, I don't code though so it might be wrong.
     
    Last edited:
    • Like
    Reactions: Rymac
    Joined
    Jun 11, 2015
    Messages
    7
    Reaction score
    11
    • Community Content - Bronze 1
    I'll let the devs know about it, and kick/poke at the same time since it's a really annoying issue as you said. What you proposed does sound pretty simple :D

    However, I'm pretty sure that the reason core moving isn't in the game yet is not because the devs haven't figured out a proper way to have it be done in-game. Rather, I'm pretty sure that it's more due to programming reasons and the way ships work in the game. The core is the origin of the ship, and most entity functions rely on the core as a base location (I think), so coding a feature to change it's location might be more complicated than it sounds... I don't code though, so this is just an educated guess.
    Yeah, totally appreciate the feed back, like I said, depends how they have it set up. My assumption is that locally, everything is positioned off of the core, then globally its just the ship core's position. That's how we did it anyway, but in that instance, its a relatively simple set up, could cost some heavy resources to move the positioning of every block. Though, I would assume isn't nearly that bad now they have shipyards, and the ability to deconstruct and reconstruct ships. Even if it was only a feature available in a ship yard. Wouldn't be to much of a stress. Store new position, deconstruct, build with new position, remove old position, reboot. Thanks for responding, and giving them a poke! ;)
     
    Joined
    Sep 5, 2013
    Messages
    281
    Reaction score
    60
    • Legacy Citizen 2
    • Tester
    • Legacy Citizen
    Yah, since the ship core is its origin at entity coords 8,8,8 to "move it" they would likely have to just take the difference of the new cores location
    and move all the other blocks on the ship instead. Not sure if you've tried copy pasting in game with large areas, but for large ships it could lock up your game making it unresponsive. We wont know until we try I guess.
     

    Keptick

    Building masochist
    Joined
    Sep 26, 2013
    Messages
    4,062
    Reaction score
    1,841
    • Councillor 2 Gold
    • Railman Gold
    • Thinking Positive Gold
    Yeah, totally appreciate the feed back, like I said, depends how they have it set up. My assumption is that locally, everything is positioned off of the core, then globally its just the ship core's position. That's how we did it anyway, but in that instance, its a relatively simple set up, could cost some heavy resources to move the positioning of every block. Though, I would assume isn't nearly that bad now they have shipyards, and the ability to deconstruct and reconstruct ships. Even if it was only a feature available in a ship yard. Wouldn't be to much of a stress. Store new position, deconstruct, build with new position, remove old position, reboot. Thanks for responding, and giving them a poke! ;)
    Yea, I honestly have no idea how they have it set up, but I assume that since it's not already in-game there's a good reason :P

    And I'm glad to see that you're enjoying the game!
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Yea, I honestly have no idea how they have it set up
    Since the location of the core is fixed to 8 8 8, one can save a whole ton of checks when interacting with blocks on the ship, in addition to keeping the ship's grid-data low.(seeing as a Segment, once generated, is never removed from the data.
    An ad-hoc solution might be, to store the core's offset from 8 8 8, and use that, but that likely results in many unneeded operations for non-offset cores.
     

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    I can say for certain that this is possible, and something we want done. A similar process is performed when creating a new docked entity on a rail in build mode. You will notice however that it will slow down your PC momentarily. This is because the core is very central to the ship both in function and in the code, as Schema has made a note of. The process of moving a core may be as simple as designating a new location and copy/pasting the rest of the ship relative to it. This would probably rewrite the entire entity in the end. I'm no java guru so I can't say honestly.

    The problem comes with making it do all that and not melt your PC as you theoretically are moving what could be a massive ship. Anyone that has copy pasted more than a 100 meter long object will know.

    There may be other more accurate reasons why it was not done before, but rest assured if it were easy it would be in the game already and we will attempt to get it working somehow in the future.
     
    • Like
    Reactions: Koloss_Meshuggah

    Blaza612

    The Dog of Dissapointment
    Joined
    Nov 16, 2013
    Messages
    787
    Reaction score
    209
    • Legacy Citizen 4
    I can say for certain that this is possible, and something we want done. A similar process is performed when creating a new docked entity on a rail in build mode. You will notice however that it will slow down your PC momentarily. This is because the core is very central to the ship both in function and in the code, as Schema has made a note of. The process of moving a core may be as simple as designating a new location and copy/pasting the rest of the ship relative to it. This would probably rewrite the entire entity in the end. I'm no java guru so I can't say honestly.

    The problem comes with making it do all that and not melt your PC as you theoretically are moving what could be a massive ship. Anyone that has copy pasted more than a 100 meter long object will know.

    There may be other more accurate reasons why it was not done before, but rest assured if it were easy it would be in the game already and we will attempt to get it working somehow in the future.
    You're taking this the complete wrong way. You're assuming that you'll have to copy/paste the entire ship when the core is moved, there's no reason to do so. Every block will have it's relative position stored, therefore, when moving the core, all you have to do is move the position of the core relative to the blocks, and then quickly alter the co-ords of the blocks without actually moving them.

    And if that doesn't work, make a fake core. You won't even have to move the entire core that the code centers around, only move half of it, the physical part that players interact with, since the players only really care about that part of it. They won't give a shit of the co-ords of the blocks are relative to the original core placement, since it won't affect them in any way. You delete the physical rendition of the core from the original place, and then create a new, fake one that simply acts as the entrance to the ship, with the blocks still being relative to the original core.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    Every block will have it's relative position stored, therefore, when moving the core, all you have to do is move the position of the core relative to the blocks, and then quickly alter the co-ords of the blocks without actually moving them.
    That won't work, as the voxel grid has to use absolute coordinates.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    And if that doesn't work, make a fake core. You won't even have to move the entire core that the code centers around, only move half of it, the physical part that players interact with, since the players only really care about that part of it.
    This isn't worded in the best way, but you have a good point. If the core could be reduced to metadata instead of a block, the problem would be solved.

    keptick, could you give the team another poke about this one? Perhaps we can have a "core" without a block. That would almost definitely be a better solution than trying to keep a computer from melting while copy/pasting an entire Titan.
     

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    You're taking this the complete wrong way. You're assuming that you'll have to copy/paste the entire ship when the core is moved, there's no reason to do so. Every block will have it's relative position stored, therefore, when moving the core, all you have to do is move the position of the core relative to the blocks, and then quickly alter the co-ords of the blocks without actually moving them.

    And if that doesn't work, make a fake core. You won't even have to move the entire core that the code centers around, only move half of it, the physical part that players interact with, since the players only really care about that part of it. They won't give a shit of the co-ords of the blocks are relative to the original core placement, since it won't affect them in any way. You delete the physical rendition of the core from the original place, and then create a new, fake one that simply acts as the entrance to the ship, with the blocks still being relative to the original core.
    Perhaps without physically moving a ship, but you still need to take the location data for all of that ship, rewrite it to it's new position, and keep the ship exactly in it's previous place to prevent catastrophic clipping issues. So no maybe not physical copying, but code wide I imagine even more is happening here, and as such may impact performance more than normal copy pasting. Again, just placing a docker on a rail in build mode will slow down the PC for a few moments and that is just to get a core placed on a ship that does not have anything else on it.
     

    schema

    Cat God
    Joined
    Feb 17, 2012
    Messages
    1,552
    Reaction score
    2,604
    • Schine
    Hi Rymac, glad you like the game and thanks for the suggestion.
    Moving the core is possible, however it does indeed require the ship to realign every block in the coordinate system, especially when rotating the core. Theoretically with the center of mass now working, the block itself could be just moved, however that might lead to unforeseen problems.
    Fortunately moving the core can be done completely threaded (copy the current data, and then do it in a thread peacefully without putting to much strain on a server).
     
    • Like
    Reactions: Rymac and Criss

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    Thanks for clearing that up Schema!
     

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    Hi Rymac, glad you like the game and thanks for the suggestion.
    Moving the core is possible, however it does indeed require the ship to realign every block in the coordinate system, especially when rotating the core. Theoretically with the center of mass now working, the block itself could be just moved, however that might lead to unforeseen problems.
    Fortunately moving the core can be done completely threaded (copy the current data, and then do it in a thread peacefully without putting to much strain on a server).
    I was just wondering if shoving the operation into a separate thread was possible... Thanks a lot for the info.
     
    Joined
    Mar 30, 2013
    Messages
    729
    Reaction score
    281
    • Purchased!
    • TwitchCon 2015
    • Legacy Citizen 5
    Is SMedit still updated? You can move the core in that. But yeah, would be nice for that (and ship core facing direction) in the normal game itself.
     

    Blaza612

    The Dog of Dissapointment
    Joined
    Nov 16, 2013
    Messages
    787
    Reaction score
    209
    • Legacy Citizen 4
    Hi Rymac, glad you like the game and thanks for the suggestion.
    Moving the core is possible, however it does indeed require the ship to realign every block in the coordinate system, especially when rotating the core. Theoretically with the center of mass now working, the block itself could be just moved, however that might lead to unforeseen problems.
    Fortunately moving the core can be done completely threaded (copy the current data, and then do it in a thread peacefully without putting to much strain on a server).
    The cat god has spoken! \o/

    On a side note, fuck unforeseen consequences, seriously that's the most pathetic excuse to not implementing a feature. :p

    If it will cause many other problems that will be extremely difficult to fix, then that raises the question of, what else is the core doing, and how much of that is redundant/will be made redundant in future updates? The only thing it's used for is the creation of the ship/grid (and supplying the start co-ords on said grid) and entering/exiting the sip to fly or build, and not even fly once we get cockpits.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,168
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    The cat god has spoken! \o/

    On a side note, fuck unforeseen consequences, seriously that's the most pathetic excuse to not implementing a feature. :p

    If it will cause many other problems that will be extremely difficult to fix, then that raises the question of, what else is the core doing, and how much of that is redundant/will be made redundant in future updates? The only thing it's used for is the creation of the ship/grid (and supplying the start co-ords on said grid) and entering/exiting the sip to fly or build, and not even fly once we get cockpits.
    No worries. :schema:will get it done.
     
    Joined
    Nov 30, 2015
    Messages
    855
    Reaction score
    75
    I really think, as someone said, just let the core be a core. Make a cockpit if you want, people get into that instead(you can still pilot through the core), and solve a lot of problems. As for rotating ships, you could make it so the arrow keys moved the ship relitive to the cockpit(somehow, this is the main problem of my suggestion), and keep cameras the same. Your ship orientation would be relitive to the core/cockpit you entered, but you could use the same system as camera to move between cockpits, cameras, and the core. When in a cockpit/core, if your looking trough another cockpit/core, when you jump out you teliport to that cockpit/core.
     
    Joined
    Jun 24, 2015
    Messages
    148
    Reaction score
    33
    I really think, as someone said, just let the core be a core. Make a cockpit if you want, people get into that instead(you can still pilot through the core), and solve a lot of problems. As for rotating ships, you could make it so the arrow keys moved the ship relitive to the cockpit(somehow, this is the main problem of my suggestion), and keep cameras the same. Your ship orientation would be relitive to the core/cockpit you entered, but you could use the same system as camera to move between cockpits, cameras, and the core. When in a cockpit/core, if your looking trough another cockpit/core, when you jump out you teliport to that cockpit/core.
    This isnt just a ship issue, say you are working on a turret and half way through making a massive turret you realized you misplaced the core. GG.