This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

getreides
getreides presents ...

2014/7/20

Multiples screen world in one world class

This program is a rather unorthodox way to create a multiple screen scenario.

It consists of nine different screens arranged in a square of 3X3 screens.
Use the arrow keys to move the crab to each of the nine screens, but you cannot cross the border of the whole 3X3-square.

As this is my very first program, it has some limitations/room for improvement:

* I used public variables instead of the set-/get-methods
* Instead of using getWidth/getHeight to determine the border of each screen, I used constant values
* One could redefine the immo class so one would not need a separate border class. Instead, each object could be defined by using setImage(). So you could construct a world with borders, buildings, obstacles etc.
* Use of separate methods for borders ( setHorizontalBorder() )
* Construction of a memory structure that saves everything that has been changed by Crab actions in each screen (collected item, defeated enemies etc.)


Feel free to use and improve this scenario!

2783 views / 885 in the last 7 days

1 vote | 0 in the last 7 days

Tags: game demo with-source zelda

open in greenfoot
Your browser does not support the canvas tag.

No Comments

Want to leave a comment? You must first log in.

Who likes this?

davemib123