Side-scroller: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
== Documentation for the side-scroller (Under Construction):== |
== Documentation for the side-scroller (Under Construction):== |
||
The side-scroller engine allows for easy level creation, image-swapping, and enemy customization. None of these require any skill in programming, but does require Python and pygame to be installed. |
The side-scroller engine allows for easy level creation, image-swapping, and enemy customization. None of these require any skill in programming, but does require Python (version 2.4 and above recommended) and pygame (version 1.7 recommended) to be installed. Directions to installing python and pygame can be found elsewhere on the OLPC Wiki - Links to be posted here later. |
||
== Tutorial: == |
== Tutorial: == |
||
I suggest playing the game first, so you can get an idea what I mean by "tile" and "player image" and a few other terms. To do so, run play.py or at the terminal: |
|||
your_name@computer_name:~$python ~/path_name_here/play.py |
|||
This should start the game assuming you have Python 2.4 or above and pygame 1.7 or above. |
|||
⚫ | |||
You will see the following variables under the words "def main():" |
|||
screen_width -> This variable determines how wide you want the screen to be, in number of tiles. |
|||
screen_height -> This variable determines how tall you want the screen to be, in number of tiles. |
|||
tile_size -> This variable determines both how wide and how tall you want a single tile to be, in number of pixels. |
|||
I suggest 25 tiles by 19 tiles, with a tile size of 32 pixels. If you experience extreme slowdown at these settings, then, after emailing me the details of your computer and play.py file, you could try lowering the width or height of your levels. |
|||
⚫ | |||
Revision as of 08:04, 11 August 2007
Documentation for the side-scroller (Under Construction):
The side-scroller engine allows for easy level creation, image-swapping, and enemy customization. None of these require any skill in programming, but does require Python (version 2.4 and above recommended) and pygame (version 1.7 recommended) to be installed. Directions to installing python and pygame can be found elsewhere on the OLPC Wiki - Links to be posted here later.
Tutorial:
I suggest playing the game first, so you can get an idea what I mean by "tile" and "player image" and a few other terms. To do so, run play.py or at the terminal:
your_name@computer_name:~$python ~/path_name_here/play.py
This should start the game assuming you have Python 2.4 or above and pygame 1.7 or above.
After a few games, open up play.py in your favorite text editor or Integrated Development Enviornment. side_scroller.py is the nitty-gritty code that, while you can change, it's not wholeheartedly recommended unless you know the programming language Python.
You will see the following variables under the words "def main():"
screen_width -> This variable determines how wide you want the screen to be, in number of tiles. screen_height -> This variable determines how tall you want the screen to be, in number of tiles. tile_size -> This variable determines both how wide and how tall you want a single tile to be, in number of pixels.
I suggest 25 tiles by 19 tiles, with a tile size of 32 pixels. If you experience extreme slowdown at these settings, then, after emailing me the details of your computer and play.py file, you could try lowering the width or height of your levels.
This page and the side-scroller engine were created by Patrick DeJarnette in conjunction with Google's Summer of Code 2007. Feel free to email me at pepboy@uchicago.edu or AIM screen-name pepboy013.