Question about sectors and systems

    Master_Artificer

    Press F to pay respects
    Joined
    Feb 17, 2015
    Messages
    1,588
    Reaction score
    612
    • Top Forum Contributor
    • Legacy Citizen 2
    • Thinking Positive
    So, current systems are composed of a 16x16x16 box of sectors, right?

    I was wondering, what is the significance of that number?
    And, could you change that number? For example, systems only 8x8x8? 10x10x10? 20x20x20? 32x32x32?

    How would that affect the game, and would it even be possible?

    Thanks for reading.
     
    Joined
    Jul 21, 2013
    Messages
    2,932
    Reaction score
    460
    • Hardware Store
    So, current systems are composed of a 16x16x16 box of sectors, right?

    I was wondering, what is the significance of that number?
    And, could you change that number? For example, systems only 8x8x8? 10x10x10? 20x20x20? 32x32x32?

    How would that affect the game, and would it even be possible?

    Thanks for reading.
    The significance is that 16 is a power of 2, like 8 or 32. As such, it uses all possible combinations of the minimum amount of bits required to display all combinations, which makes multiplication and division by powers of 2 a simple bitshift. Changing that number might be very hard though, considering it isn't a simple variable.
     
    Joined
    Aug 21, 2015
    Messages
    165
    Reaction score
    87
    • Community Content - Bronze 1
    • Purchased!
    16x16x16 = 4096 = 2^12 = 12 bits = 1.5 bytes
    32x32x32 = 32768 = 2^15 = 15 bits = a bit short of 2 bytes

    Doubling each dimension of the system will always increase the size of the minimum binary number needed to address each sector by 3 bits.

    While that's a fun fact, those values really don't have any direct correlation to how sectors or systems may be represented in Starmade's source code. Schema could be storing collections of data structures containing system data, in which case addressing a given sector is a 4 or 8 byte pointer, depending whether you have a 32- or 64-bit executable. Or, he could be bit-masking a char or byte value and using the result to directly access a hand-allocated sector array in memory.

    The code could be very flexibly designed, with sector size determined by variables or modifiable constants, and a generic algorithm used to load sectors and populate the galaxy map. Or there could be a low-abstraction, high performance algorithm that takes advantage of the power-of-2 design decision for sectors and systems to save computations, but is specialized for systems exactly 16 sectors on a side. It could also be something entirely different. We can't know how easy it would be to change sector size unless Schine tells us, or we can sneak a peek at their code.

    You got me curious, though. :) What got you wondering about different system sizes? Is it something that would change gameplay?
     

    Master_Artificer

    Press F to pay respects
    Joined
    Feb 17, 2015
    Messages
    1,588
    Reaction score
    612
    • Top Forum Contributor
    • Legacy Citizen 2
    • Thinking Positive
    Totally not a suggestion on a rework to the universe generation after working at an observatory for two months and starting to teach an astronomy class for uninterested college students, why?
     

    Gasboy

    BLRP
    Joined
    Aug 11, 2013
    Messages
    1,311
    Reaction score
    360
    • Community Content - Bronze 2
    • Legacy Citizen 6
    • Purchased!
    Totally not a suggestion on a rework to the universe generation after working at an observatory for two months and starting to teach an astronomy class for uninterested college students, why?
    Because most people simply make the default sector size bigger, instead of asking why couldn't we change the number of cubes in the bigger cube. :P
     

    Master_Artificer

    Press F to pay respects
    Joined
    Feb 17, 2015
    Messages
    1,588
    Reaction score
    612
    • Top Forum Contributor
    • Legacy Citizen 2
    • Thinking Positive
    It is quite hard to fit a scaled down representation in the standard 16 cubed sectors that we currently have for binaries, trinaries, kuiper and oort clouds, and representing the conditions of the glactic core/globulars (where stars are 1/4th of a lightyear apart, leading to plenty of gravitational interactions, but in starmade we will assume that this all happens in a snapshot of time, with no stars actually moving.)