Bump n Jump 1.1
Christopher Snyder
COMP50-GD, Spring 2009
This project builds on the Java game Bump n Jump by Aaron Haurwitz, Martin Rosas, Mireille Gallegos and myself. The primary addition is a level editor, which runs independently from the game, allowing players to easily customize and expand beyond the original six levels. A secondary addition is a timer and a points system, where players receive more points the quicker they complete levels.
|

|
Downloads:
Source updated 10:01pm 5/5/09 with missing image file
See Updates to download just the missing file.
Source code: .zip file (size: 716 KB)
Music files: .zip file (size: 19.6 MB)
Jump to a section:
Updates |
Project Overview |
Setup Instructions |
How to Edit a Level |
Changes since v1.0 |
Known Bugs/Incomplete Items |
Future Work |
Screenshots |
Attributions |
Updates
05/20/09 1:56am: I've been working on two separate projects: custom backgrounds and a better way to render the object choices a user has. I have a sneak preview of what the latter looks like -- after much playing around with JFrames and JPanels (and remembering that Java is not a mind-reader!), I got a toolbar to work. Click here to view how the new interface will generally look.
05/05/09 10:01pm: I put a small star image in the place of the orange block. Since the actual small star is not yet implemented in BnJ, this won't pose a problem. To download just the missing file, click here. Save the image to the "images_leveledit" folder in your Bump n Jump folder.
05/05/09 9:55pm: While testing out executable .jar files, I ran across an error in the Level Editor. After a fight with my image processing program, the orange block went missing, and this means the Level Editor currently doesn't work. I am rushing a quick fix up and will update when it is ready.
Go to Top of Page
Project Overview
This project extends Bump n Jump. The game was created with text-based levels that were imported at runtime. This made them easier to code, and also made it easy to extend the game with a level editor. The inspiration for a level editor came from Ming Chow, who teaches COMP50-GD and noted that the Excel file I used to help me with making the text files was awfully similar to a level editor, and that I should consider building one for my final project in the class.
While the original six levels are fun, encouraging creativity in designing new levels is where the replay value of Bump n Jump really lies. Having an immediate visual confirmation of one's design increases user-friendliness considerably, and opens up level editing to those uncomfortable with ASCII and learning which keyboard symbols represent which objects.
Additionally, after I was able to get through all six original levels in one sitting (albeit with many deaths on the leftmost spike in Level 4), I was inspired to add a points system, which was a planned secondary feature of Bump n Jump 1.0. To encourage players to get through the level as quickly as possible, I based the points on a timer. Players who take longer than the time allotted will not receive any extra points for actions that occur after time expires, but the quicker a player gets a star or finishes a level, the more points those actions will accrue.
Go to Top of Page
Setup Instructions
The level editor and Bump n Jump require a program like Eclipse to work.
- Download all the zip files. When you unzip, make sure the sound files end up in a folder called "Music" alongside the other Bump n Jump folders.
- Load the project into Eclipse.
To play the game, you will need to import into Eclipse the external library timer.jar (which you downloaded with the source code). Right-click on the project folder and select Properties. Under Java Build Path, click the Libraries tab and click Add External JARs. Select timer.jar (located in the project's "libs" folder), and click the necessary prompts to save the selection. (Screenshot)
- GameFrame.java is the main Bump n Jump game. EditorFrame.java is the main level editor. Run these files to launch the respective programs.
Go to Top of Page
Instructions to Edit a Level
- 1. Open the level editor.
- 2. To edit a new level, press the right arrow button until a blank level displays (the bottom row will be filled in with blue blocks, but it is otherwise empty.
- 3. Press the keyboard key associated with each object to select it. (Note: Small stars are not supported at this time.)
- 4. To save a level and continue editing, press Enter. Note that when you move from one level to another with the left and right arrows, the level you were working on will automatically save any changes.
- 5. To clear a level's contents and start over, press Backspace twice in succession.
- 6. To play your edited levels, open Bump n Jump. The game will automatically import your levels.
Go to Top of Page
Changes from v1.0 to v1.1
- Creation of a level editor:
- Using the basic code which powered the game, I created a frame in which each level renders.
- Level objects are rendered by reading in
- All of the objects are shrunk by 80 percent in the editor to allow the full editor to more easily fit with my Macintosh's screen resolution.
- I use both a mouse listener and a key listener to make the editor work. The key listener lets the player control which object is selected, and the mouse listener replaces a clicked-on object with whatever object is selected. The mouse listener returns a coordinate, which the editor interprets to find the object which corresponds with the button press.
- I attempted for a long while to get JButtons to change the object selected, or to represent the objects on the gameboard. I could not get them to work.
- The ability to save consists of writing the gameboard array out to a file.
- To make new levels work with the game, I modified the game, replacing the old switch statement of level selection with a new system by which the level filename itself is incremented (using a String append function). If the next level file does not exist, a catch statement tells the program that there are no more levels -- presumably, the player has won!
- Adding a points system:
- I took the timer apparatus from Zapped! and plugged it into the game.
- Rather than having the timer dictate when a level ended, as in Zapped, I set the timer to return "0" after the time for each level was up -- that way, there wouldn't be negative points after a certain amount of time.
- Points are determined by how much time is left. Each star is 3 points times the time left, the door's opening is 5 points times the time left, and completing the level is 8 points times the time left. These are fairly arbitrary point levels at the moment.
- At the end of each level, points are added to a running tally of points. I had to make sure that players didn't get credit for any points accrued before they died in a level.
Go to Top of Page
Known Bugs/Incomplete Items
- Because of the rendering method in the level editor used to ensure that blank tiles don't overlap other, larger tiles, there are rendering problems when large items overlap each other. The game displays them properly, but not all objects may appear in the level editor.
- It's possible to put objects under other objects in the level editor.
- In the level editor, only the top-left of any object larger than a blank tile will respond to a mouse click. Clicking elsewhere on the object results in a change to a different square in the grid.
- The level editor does not currently check to make sure there is one door and one ball sprite in each level. The game will crash if both items are not present.
- Additionally, it does not check to make sure there is only one of each, or that both a warp entrance and exit appear. These errors will not crash the game, but some objects may not appear.
- Dogs will traverse 200 pixels regardless of placement, so they will go through walls and walk on air if placed improperly.
- The warp entrance is greater than 25 pixels, so some placements will result in an ugly-looking overlap with other sprites.
- There is no way to delete a level without removing it from the file system. If a level is thusly removed, and not replaced with a new level, the game will not recognize the existence of any further levels (i.e. if Level 7 is gone, the game will stop at Level 6, regardless of whether there is a Level 8).
- After using backspace to clear a level of objects, the user must place new objects; otherwise, the cleared level will not save.
- There are occasional "invalid memory access" errors in the game. It is unclear whether this is the result of the sound playback feature or the timer feature.
- All levels have the same background and have a 30-second allotment of time to gain points. Changes to this need to be built in to the level text file, which requires modifying the level editor.
- Many of the images in the level editor are temporary. I did not have the time to find image software which would allow me to easily scale down the images.
Go to Top of Page
Future Work
- Adding the ability to pause a level (in progress)
- Adding a 25-pixel star to the game and the level editor
- Documenting the range of the bouncing ball, both with and without trampolines, so that gamers can more easily create levels.
- Making it easier for gamers to import new stationary objects (such as gates that don't do anything) into the level editor.
- Translucent sprites, especially for the top of the screen where level info displays.
- Making the readout of points and time remaining more visually appealing in the levels, and making the total points display at the end more visually appealing.
- Adding a high scores feature.
- Adding the ability to modify the background of a level and to change the amount of time allotted to earn points.
- Tweaking the points system to reward behavior as well as possible.
- For version 2.0: Have the gameboard on the level editor behave, to the extent possible, like the game itself -- dogs moving, ball sprites bouncing, deaths, trampolines, the whole nine yards. This way, someone designing a level can immediately determine whether a jump is doable, whether a level is too easy or too hard, et cetera.
Go to Top of Page
Screenshots
Click each thumbnail to see a larger image.

The first level, as displayed in the level editor. |

A blank level in the level editor to begin editing.
|

A new level, created entirely in the level editor.
|

The new level, in gameplay. It is completely playable!
|
Go to Top of Page
Attributions
Credit is due to the following places:
- Aaron Haurwitz and Martin Rosas were the primary coders for Bump n Jump 1.0.
- Mireille Gallegos was the artist for Bump n Jump 1.0.
- Parts of the structure of Bump n Jump, such as the application of the timer, are from a previous Introduction to Game Development production, Zapped!, created by Marwan Al-Jubeh, Zach Bialecki, Ari Kobren and Niraj Shrestha.
- Music for Bump n Jump was mixed in Apple's GarageBand.
- This game is inspired by the Flash game Jump n Bump.
Go to Top of Page
This site last updated 5 May 2009.

This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 Unported License.
Webpage layout construction by Christopher Snyder.