[TUTORIAL]TouchGrind Park Creation

Discussion in 'iTunes App Store Games & Apps' started by stillercity, Mar 18, 2009.

  1. stillercity

    stillercity New Member

    Jan 8, 2008
    Likes Received:
    How To Make Parks for TouchGrind


    1) You'll DEFINITELY need a jailbroken iPod/iPhone with openSSH installed. You will also need a program on your computer to connect to your iPod through openSSH. I will be using WinSCP.

    2) TouchGrind (duh)

    3) To understand this tutorial, you may need to know a bit of programming. I will try and teach it so it will be easy to all users, but that is not a promise.


    Alright, so you've had TouchGrind for awhile now and you're thinking, "I'm sick of this stupid park, I wish I could make my own!" Well now you can, thanks to an excellent find by Emb531! This is a basic tutorial, and will be updated as I learn more things.

    Alright so here we go!

    Navigating to the Park Directory

    1) SSH into your iPod/iPhone by opening your SSH program and entering in the IP address as well as the username and password. The default username is "root" and the default password is "alpine".

    2) Navigate to /private/var/root/mobile/Applications/[bunch of random characters]/Touchgrind.app

    3) Open the Parks folder, and there should be three parks in there: park-backyard.xml, park-howto.xml, and park-default.xml. park-default.xml is the park that everyone uses (if they haven't changed the park yet).

    Changing the parks

    This is how you switch to another park.

    1) Rename "park-default.xml" to "park-main.xml". NOTE: You can rename it to anything you want, but for this tutorial, we're going to stick with park-main.xml so we can remember it.

    2) Rename the park you want to use (for instance, "park-backyard.xml") to park-default.xml

    3) Reboot TouchGrind, and you should see the new park!

    Making a Park Part I

    Making a park is actually pretty simple. It takes a little bit of practice and a little bit of trial and error, but all you really have to know is how to call the objects. In Part I, we will be setting up a fence as well as placing a "box" in the center of the park.

    1) Open up any editor (you can even use Notepad if you want).

    You will be making what is called an xml file. This file tells the TouchGrind app where to place objects, how big the park is, etc.

    2) Copy and Paste this into your editor:
    <!-- park-myPark.xml -->
    <?xml version="1.0" encoding="UTF-8"?>
    <park name="mypark" width="24" height="48" startx="-6">
    		<!-- The Fence that surrounds the park -->
    		<wall y="24"  width="24"/>
        		<wall x="-12" width="48" angle="90"/>
        		<wall y="-24" width="24" angle="180"/>
        		<wall x="12"  width="48" angle="270"/>
    		<group y="0">
    			<box x="0" y="0" width="4" height="4" depth="1" />
    Alright, so let's dissect this baby:

    <!-- park-myPark.xml -->
    <?xml version="1.0" encoding="UTF-8"?>

    These two lines should be in every park you make. The first line is only visable to the programmer (you) because it is a comment. It does not affect the park at all, but it is nice to know what the file is (especially since we have to rename it to park-default.xml all the time). The second line tells TouchGrind that it is an xml file. Don't read into it to much. Just remember: YOU NEED THIS LINE IN EVERY PARK. Otherwise it won't work.

    <park name="mypark" width="24" height="48" startx="-6"> and </park>
    This sets up the park and defines it's dimensions. We may change the dimensions later on to observe it, but the only property you should be worried about now is the startx property. This is how you define where to start the board when you load up the park. Before moving on, I need to explain axes in TouchGrind a little more. If you are looking at it as you would if you were playing regularly, the axes work like this:

    Please Register or Log in to view images

    I know it's weird, but you're just going to have to get used to it. So since startx=-6, the board will start 6 units below the center of the park. NOTE: The board in this picture is not at startx=-6, it is at startx=0. You tell me where it would be if startx was -6.

    <obstacles> and </obstacles>
    You need to use these to tell the program that the user can run the board into any of the obstacles between those two lines.

    <wall y="24" width="24"/>
    <wall x="-12" width="48" angle="90"/>
    <wall y="-24" width="24" angle="180"/>
    <wall x="12" width="48" angle="270"/>

    These four lines lay the fence out. I wouldn't change them too much just yet, but I'll explain the properties anyhow. The y property means it will be a vertical fence (at regular view). It is set to 24 or -24, which tells how far out the fence is to the left or right(see the axes picture). The x property means it will be a horizontal fence (at regular view) and it will be 12 units above or below the origin of the axes. Their widths are set to 48. Don't change the angle values at all. Otherwise, it won't be a rectangular park.

    <group y="0">
    <box x="0" y="0" width="4" height="4" depth="1" />

    The line <group y="0"> sets up a mini-axes (that works the same way as the main axes). All objects in between the group tags will be respective to the axes.

    The box object is the first object we will be creating. We put it at the origin of the group axes (x=0,y=0). The height and width will be 4 so that it is a square. NOTE: A value of 4 means 2 from the center going left and 2 from the center going to the right for width. A value of 4 means 2 from the center going to the top and 2 from the center going down for the height.

    The depth property defines how tall the box will be. A value of 1 is a fairly hefty jump, but this isn't supposed to be a fun park just yet.

    3) Save the xml file as "park-myPark.xml" and as a UTF-8 file.
    For notepad, click File->Save, then type in the park name as the file name AND MAKE SURE YOU HAVE .XML AT THE END OF IT. Save as type: Text Documents(*.txt)
    Encoding: UTF-8

    4) Place it into the parks directory.

    5) Rename "park-default.xml" to the original park name.

    6) Rename your park to "park-default.xml"

    7) Load up TouchGrind and you should see this:

    Please Register or Log in to view images

    Congratulations, you have made your first park!

    I will be updating this with future tutorials, but I just wanted to get the ball rolling for the first one. Thanks for reading!
  2. tennisking1o1

    tennisking1o1 New Member

    Mar 14, 2009
    Likes Received:
    It's interesting how the axis is set up for an iPhone in portrait mode but this game is in landscape. You would imagine that the SDK would allow you to set which axis is which so it may be a little easier for devs. Nice tutorial as well...I'm not interested in making my own park but I'm sure it'll help someone

    Please Register or Log in to view images

  3. steven-026

    steven-026 New Member

    Jan 2, 2010
    Likes Received:
    2G iPod touch
    I'm gonna do this when the untethered jailbreak comes out for 3g, cuz' my brother doesn't want me to jailbreak it.

Share This Page