Cube Runner Level Making Tutorial (With Pictures)

Discussion in 'iTunes App Store Games & Apps' started by Hoplite, Jul 18, 2008.

  1. Hoplite

    Hoplite New Member

    Joined:
    Jul 18, 2008
    Messages:
    11
    Likes Received:
    0
    Decided to write a Cube Runner Level Construction Walkthrough / Guide / FAQ / Instruction set after being dissatisfied with the quality of other tutorials out there. I'll post revisions and refinements to these instructions based on questions that other posters raise.

    Greets and thanks to Andy Qua for developing an elegant game, and free no less. These instructions are just a refinement on what Andy has provided on the Cube Runner website. I've also posted this over on CubeRun, the community site.

    So you want to make a Cube Runner level

    Easy peasy. We'll tackle the problem in 2 parts, (1) constructing the level then (2) getting it onto your iPod Touch 2.0 or iPhone 2.0.

    1. Open up any text editor and create a new, blank document.
    2. Copy and paste the following template into it:

      PHP:
      @deflayout CRTemplate
      Intro 15 1
      Random 15 15 25 0
      columns 20 1
      Random 15 15 25 0
      heart 12 1
      Random 15 15 25 0
      foo 20 1
      loop 1
      @end deflayout
      @level columns
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      @end level
      @level foo
      x                        x
      x                        x
      x                        x
      x                        x
      x                        x
      x  xxxxx                 x
      x  x                     x
      x  x                     x
      x  xxxxx                 x
      x  x                     x
      x  x                     x
      x  x                     x
      x                        x
      x   xxxx                 x
      x  x    x                x
      x  x    x                x
      x   xxxx                 x
      x                        x
      x   xxxx                 x
      x  x    x                x
      x  x    x                x
      x   xxxx                 x
      x                        x
      @end level
      @level heart
      x     xxx   xxx          x
      x    x   x x   x         x
      x   x     x     x        x
      x   x           x        x
      x    x         x         x
      x     x       x          x
      x      x     x           x
      x       x   x            x
      x        x x             x
      x         x              x
      x                        x
      x                        x
      x                        x
      x         x              x
      x        x x             x
      x       x   x            x
      x      x     x           x
      x     x       x          x
      x    x         x         x
      x   x           x        x
      x   x     x     x        x
      x    x   x x   x         x
      x     xxx   xxx          x
      @end level
    3. Customize the file to generate the kind of level you would like to play in Cube Runner
    4. Save the level you've created as a text file.

    How to Modify the Template
    The first part of the template,

    PHP:
    @deflayout CRTemplate
    Intro 15 1
    Random 15 15 25 0
    columns 20 1
    Random 15 15 25 0
    heart 12 1
    Random 15 15 25 0
    foo 20 1
    loop 1
    @end deflayout
    defines each chunk or piece of the level, in order. So, first you will fly through a section called "Intro" (this is the funnel at the beginning of all the default levels). Next you will fly through a "Random" section where the blocks are just littered everywhere. Both Intro and Random are special sections that are preprogrammed in the software.

    Modifying Random Sections
    The Random line has a few numbers on it that control the difficulty of these random sections. Above, Random 30 20 25 0 means that it will take 30 seconds to fly through, at a speed of 20 (low is slow, high is fast) with 25% of the space within the random section filled with cubes.
    The last number, 1, just affects whether it is daylight (1):

    Please Register or Log in to view images



    or nighttime (0):

    Please Register or Log in to view images



    So, Random 10 5 15 1 would be
    • short (10s)
    • slow (speed = 5)
    • easy (only 15% of space is filled with boxes)
    • daylight (1 = day, 0 = green wireframe)

    Random 120 40 50 0 would be
    • long (2 minutes)
    • FAST (speed = 40)
    • HARD (50% of space is filled with boxes)
    • nighttime (1 = day, 0 = green wireframe)


    Modifying Custom Sections
    Remember that header that defines our level?

    PHP:
    @deflayout CRTemplate
    Intro 15 1
    Random 15 15 25 0
    columns 20 1
    Random 15 15 25 0
    heart 12 1
    Random 15 15 25 0
    foo 20 1
    loop 1
    @end deflayout
    After we survive Intro and Random, the game throws us into a section called "Columns," then another Random section, then a new custom section called "Foo."

    These custom sections are laid out by hand after the line "@end deflayout"

    The general format is:
    PHP:
    @level Columns
    x                        x
    x                        x
    x                        x
    x                        x
    x                        x
    x                        x
    @end level
    The simple design above just produces two columns of boxes you fly along, nice and short.

    There are a few key points about custom sections you should understand.
    • Each "x" becomes a box in the level
    • You navigate through from top to bottom
    • Each line MUST END with an "x"
    • Don't forget the "@end level" piece to close off each custom section.

    If you break these rules, you're screwed and will probably crash the game or enter a boring blank plane.

    You can define several custom sections in a level, if you like. Just make sure that each entry within the @deflayout list has a corresponding @level <levelname> custom section after the @end deflayout.

    PROTIP: Remember that you fly through the x's top to bottom, so if you want to put in a message (like foo above), realize that everything will look upside down. So, to make a heart-shaped obstruction that looks like this:

    PHP:
         xxx   xxx
        x   x x   x
       x     x     x
       x           x
        x         x
         x       x
          x     x
           x   x 
            x x
             x
    You will need to define it in the file by entering this:
    PHP:
             x
            x x
           x   x
          x     x
         x       x
        x         x
       x           x
       x     x     x
        x   x x   x
         xxx   xxx
    Finally, the:

    Loop 2

    line just tells you which section to replay when you survive the list of sections. In this example, it will loop back to the second entry, and send you back through the Random -> Columns -> Random -> Foo sequence until you hit something and explode in a shower of electronic bits of gore and vitriol.

    Here's a simple level called Frogboiler that starts easy and slowly turns up the heat on you:

    PHP:
    @deflayout Frogboiler
    Intro 15 1
    Random 15 20 10 1
    Random 15 25 15 0
    Random 15 30 20 1
    Random 15 35 25 0
    Random 15 40 30 1
    Random 15 45 35 0
    Random 15 50 40 1
    Random 15 55 45 0
    Random 15 60 50 1
    Random 15 65 55 0
    Random 15 70 60 1
    Random 15 75 65 0
    Random 15 80 70 1
    Random 15 85 75 0
    Random 15 90 80 1
    Random 15 95 85 0
    loop 1
    @end deflayout
    To get the levels onto your iGadget, the levels need to be on the internet somewhere. So gzip them up and upload them to your website, Andy's repository, or another website.

    Then fire up Cube Runner on your iPod:

    Please Register or Log in to view images



    Press "Select Level Pack"

    Please Register or Log in to view images



    Press "Add Level Pack"

    Please Register or Log in to view images



    Press in the address bar to bring up the keyboard and type in the URL for the level you uploaded, then hit OK:

    Please Register or Log in to view images



    Press the name of your custom level after it appears in the custom levels list:

    Please Register or Log in to view images



    Press Done, press Start New Game

    Voila!

    Note: I have posted for download the two above custom levels at:

    http://cuberun.org/template3.gz

    and

    http://cuberun.org/frogboiler.gz
  2. Jimmy Maz

    Jimmy Maz New Member

    Joined:
    Jan 2, 2008
    Messages:
    126
    Likes Received:
    0
    wow! nice job, although i tihnk i wont be posting any of my own levels as much as using other peoples lol
  3. justinede

    justinede Member

    Joined:
    Dec 24, 2007
    Messages:
    843
    Likes Received:
    1
    Device:
    iPhone 3GS (Black)
    wow nice job.. this is usefull!!
  4. Hoplite

    Hoplite New Member

    Joined:
    Jul 18, 2008
    Messages:
    11
    Likes Received:
    0
    Troubleshooting Level Installation Problems

    Glad you liked it so far. Let me know any improvements to be made.

    Please Register or Log in to view images



    So the Installed Level Crashes or Won't Load-- What Do I Do?

    Not a problem. Andy Qua, author of Cube Runner, is preparing a level generator/validator that will prevent many difficulties in level construction.

    In the meantime, there are a few things you can check to make sure your new custom level is properly built & installed.

    Level Construction Doublechecks
    1. Check custom section names in the @deflayout against their @level names.
    2. No trailing characters after the last "x" on each line.

      CLick and drag over the following example to highlight and see a WRONG format followed by a PROPER format:
      PHP:
      @level wrong
      x      x   
      x       x             
      x      x 
       x      x    
       x    x      
      @end level


      @level proper
      x         x
      x          x
      x           x
      x            x
      x             x
      x            x
      x           x
      x          x
      x         x
      @end level
    3. Is the filesize too big? Did you get too ambitious?
    4. Do you have any extraneous characters between @level <custom level name> and @end level? There should ONLY be "x" and " " (space character)
    5. Are keywords like @deflayout spelled properly? Caps count.
    6. Does each entry in @deflayout have the proper number and kinds of parameters?
      • Intro requires 2 parameters
      • Random requires exactly 4 parameters
      • Custom sections require exactly 2 parameters
      • Are the parameters in the proper range? No negative values, day/night should ONLY be 1 or 0.
    7. Did you save the custom level file as a plain text file (.txt extension, not .doc or .docx, etc.)? When you open the file in Notepad:
      • WRONG:
        PHP:
        {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf330 {\fonttbl\f0\fmodern\fcharset0 Courier;} {\colortbl;\red255\green255\blue255;\red55\green116\blue30;\red0\green23\blue176;} \margl1440\margr1440\vieww9000\viewh8400\viewkind0 \deftab720 \pard\pardeftab720\ql\qnatural  \f0\fs26 \cf2 @\cf3 deflayout\'a0CRTemplate \ Intro\'a015\'a01 \ Random\'a015\'a0349\'a05\'a00 \ columns\'a020\'a01 \ Random\'a030\'a015\'a050\'a00 \
      • RIGHT:
        PHP:
        @deflayout Frogboiler
        Intro 15 1
        Random 15 20 10 1
        Random 15 25 15 0
        Random 15 30 20 1
        Random 15 35 25 0
        Random 15 40 30 1
        loop 1
        @end deflayout

    Level Upload/Download Doublechecks
    1. Did you remember to GZip the file? (Currently, the displayed name of your custom level in Cube Runner will be the name of the file, not the name specified in @deflayout).
    2. Did the file upload successfully to your webhost? Can you download and reopen the archive manually with your web browser?
    3. While in Cube Runner, did you type the archive's URL exactly? Cube Runner currently will not detect an incorrect address and will try to load any error page it receives as a level. This is a common source of crashed levels.
    4. Did you transfer the archive to your webhost in binary mode?
    5. Does the URL you're using point directly at the file (and not to a download form)?

    If your level isn't working for you, post the raw text of it over on CubeRun.org or here and we can take a look at it for you. BE SURE to put [ php] [ /php] tags around the level text otherwise it is VERY HARD to proofread.

Share This Page