Tuesday, February 12, 2013

Star System Random Generation

Just a quick update, but I don't have a screenshot for it.

I've begun work on the random generation code for solar systems. In the UQM, I believe (may be wrong) that all the solar systems are static, and do not randomly generate. Either way, FotP will have random generated star systems, based upon all the stuff we know about how star systems form (Goldilocks zone, suitability, solar radiation, etc). The code currently generates a star system, then saves it to a file for later reading.

I'm also contemplating adding in a "Ironman" option to the game, which is basically an autosave like the game XCOM: Enemy Unknown has; turning the game into a rougelike (you can't load a previous save if you screw something up). But like any option, it will be OPTIONAL.

3 comments:

  1. I wrote up a mock-up program to prove some code.

    http://www.mediafire.com/?mq9xv4m5yid2r4d

    The code for the goldilocks zone that I used (in VB6) was this:

    ------------------------------------
    bm = Magnitudev + class
    alum = 10 * ((bm - 4.72) / -2.5)
    MsgBox (alum)
    gzone1 = 500 * Sqr(Abs(alum / 1.1))
    gzone2 = 500 * Sqr(Abs(alum / 0.53))
    gzone = (gzone1 + gzone2) / 2
    ------------------------------------

    - bm is bolometric magnitude
    - Magnitudev is absolute magnitude
    - alum is absolute luminosity
    - gzone1 is inner Goldilocks zone border
    - gzone2 is the outer Goldilocks zone border
    - gzone is the average of the two (which is what
    is shown in the program)
    - class is any of these
    format: zone_letter(numeric value)

    B(-2.0)
    A(-0.3)
    F(-0.15)
    G(-0.4)
    K(-0.8)
    M(-2.0)

    ReplyDelete
    Replies
    1. ALSO: I wrote this in about 40 minutes, and therefore this likely has some error somewhere in it.

      Delete
    2. ALSO 2: In 'gzone1 = 500 * Sqr(Abs(alum / 1.1))' and 'gzone2 = 500 * Sqr(Abs(alum / 0.53))' the results are multiplied by 500 so the results are displayed correctly.

      Delete