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

2015/1/26

Combining Multiple Worlds into One Composite World?

decadence18 decadence18

2015/1/26

#
Is it possible to take multiple worlds (or, technically, pieces of worlds) and combine them depending on what the user wants? Example: A game board can be created by combining 3 pieces into one large board. In order to do this, a base piece is chosen (We'll say 1). From this piece 1, the other two can be added to it by: Putting them horizontally ( 1 2 3 or 3 2 1 or 2 1 3 etc) Putting them vertically: 1 1 2 3 3 2 and so on. How would this possibly be done? Or does this exceed the capability of the Greenfoot program?
danpost danpost

2015/1/26

#
I seriously doubt that this would exceed the capabilities of the Greenfoot program. I am not sure, however, that this is what you want to do. Each piece would be an object (not necessarily an Actor object). These pieces can be placed within an array. As you add pieces,, you can recreate the array with the new pieces included, then create a new world from it. The Level class of my Super Level Support Class demo is an example of creating different worlds using specified data within the class. If each piece is actually a separate world in itself (no interaction between the two, my PIP Actor Class shows the capabilities of greenfoot in that respect (the PIP subclass of Actor creates actor objects that can each portray a different world).
decadence18 decadence18

2015/1/28

#
I'm attempting to utilize this now...
You need to login to post a reply.