SV Racer -- Editing Levels

About

  • Intro

  • Controls

  • Goals

  • Navigation

  • Editing Levels

  • License

  • Missions are described as text files. You can edit these text files to change the levels, or create your own levels and insert them into the game. To find the level descriptions, right-click or control-click on the SV Racer icon, and choose "Show Package Contents":

    Then, in the folder that appears, navigate to the Resources folder, where you'll find the level descriptions:

    We'll use Mission 1 (level1.txt) as a starting point for understanding the level file format. It begins with the line:

    9 30
    
    Each level begins with two numbers followed by a level description. These numbers indicate the number of lines in the level description, and the maximum number of characters per line. In this case, the description is 9 lines long, and each line has at most 30 characters. The number of characters also determines the size of the text.
    Mission 1
    we'll start easy; just fly
    through way-gates as they are
    activated.
    take this chance to get used
    to your weapon and control
    systems.
    make sure you move out of the
    way after dropping a mine.
    
    Each line in the description will be centered, unless it is space-justified in the mission file. Text will be converted to the all-caps font, so capitilzation doesn't matter. Not every character is defined in the internal font. Unknown characters will be replaced with blank spaces.
    Goal
    
    Each level has any number of goals which you most pass or overcome. Objects designated as goals are proceeded by the world Goal. (This is case sensitive.) Goals must be passed in the order they are found in the level description.
    WayGate
    0 0 10 0 0 0 1.5 8
    
    The waygate is the most basic world structure. When it is a goal, it will have animated green lines inside it. When a goal is passed, the next goal in the level is activated.

    In this level you must simply pass through 5 consecutive way gates. The parameters listed after the waygate are described below.

    Goal
    WayGate
    0 0 40 0 0 0 1.5 8
    Goal
    WayGate
    0 0 70 0 0 0 1.5 8
    Goal
    WayGate
    0 0 100 0 0 0 1.5 8
    Goal
    WayGate
    0 0 130 0 0 0 1.5 8
    
    Besides goal objects, other objects can be placed in the world. Stars and Music are both special-effect objects, that you do not interact with while playing the game.
    Stars
    0 0 65 6000
    Music
    99 16 4 48 4 0 30 50 30 0 30 45 30 0 30 47 30 0 30 49 30
    
    Yes, the music for each level is contained in the level description. If you turn off music in the game, this is the music it will mute. All other sounds created in the game are muted when you turn off sound.

    When you begin a new level, your ship is at (0, 0, 0). The negative x-axis is on your left, and the positive x-axis is on your right. You are looking down the positive z-axis, and the positive y-axis is above you.

    Here is a description of all possible world objects. Parameters have either a subscript f for a floating point number (eg 1.35 or -0.123) or d for a decimal number (eg 37 or -24).


    GateKeyGoal: noParams: xf yf zf f f d
    descriptionblah
    exampleblah

    HomingMineGoal: yesParams: xf yf zf
    descriptionThe three parameters are the (x, y, z) location of the homing mine. A homing mine will activate when your ship gets within 10 units of the mine. A homing mine that is a goal object will be inert and immune to damage until it is activated by the previous goal. When activated as a goal, a homing mine will immediately start tracking after your ship.
    example
    HomingMine
    0.0 1.0 3.14
    
    Place a homing mine at (0.0, 1.0, 3.14).

    MineGoal: yesParams: xf yf zf
    descriptionThe three parameters are the (x, y, z) location of the mine. A mine will activate when your ship gets within 10 units of the mine. A mine that is a goal object will be inert and immune to damage until it is activated by the previous goal.
    example
    Mine
    1.0 1.0 -2.5
    
    Place a homing mine at (1.0, 1.0, -2.5).

    MusicGoal: noParams: d d d d (d d ...)
    descriptionm = new Music(score, len, options, param, instr, false);
    example
    Music
    99 16 4 48 4 0 30 50 30 0 30 45 30 0 30 47 30 0 30 49 30
    
    Play instrument 99 (xxx)
    There are 16 parts to the music description.
    Play style 4 -- rise repeating
    play 4 times before rising, 48 times total.
    (notes)

    StarsGoal: noParams: xf yf zf countd
    descriptionThe first values are the (x, y, z) location where the stars are cenetered. 8*count stars will be drawn in a cube radius 100 around this point.
    example
    Stars
    0 0 65 6000
    
    Draw 8*6000 = 24000 stars centered at (0, 0, 65). They will be spread from (-100, -100, -35) to (100, 100, 165).

    TurretGoal: noParams: f f f f f d f
    description fscanf(f, "f f f f f d f\n", &x, &y, &z, &fireRate, &shotSpeed, &what, &rad);
    return new Turret(x, y, z, targ, what?kBullet:kMine, .25, fireRate, shotSpeed, rad);
    exampleblah

    WayGateGoal: yesParams: xf yf zf rotxf rotyf rotzf radiusf resolutiond
    description fscanf(f, "f f f f f f f d\n", &x, &y, &z, &rx, &ry, &rz, &radius, &resolution);
    return (last = new WayGate(x, y, z, rx, ry, rz, radius, resolution));
    example
    WayGate
    0.000000 32.725425 33.776413 -108.000005 0.000000 0.000000 1 8
    
    Create a waygate at (0, 32.7, 33.8), rotated -108 degress on the x-axis. The waygate will have a radius of 1, and will be drawn as 8 segments. (Unless you are in high-resolution mode.)

     

     

     

    SV Racer ©2004 NS Software