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

2014/2/8

aHadAQuestionAboutSomethingOdd

nickvcg nickvcg

2014/2/8

#
Is it possible to run worlds side by side? like this: ___________________________________ | | | | | | | World 1 | | | | | |___________________________________| | | | World 2 | |___________________________________| and have them interact with one another?
danpost danpost

2014/2/8

#
Greenfoot only allows one world to be active at one time. However I have a support class that may help. Check out my PIP Actor Class which has actors emulating world objects.
nickvcg nickvcg

2014/2/8

#
So then if I wanted to have borders like your wombat thing in that, but I want it to be 2/3 of the screen like in the first post and then have a separate interactive thing below it that can work in unison with the top
nickvcg nickvcg

2014/2/9

#
danpost wrote...
Greenfoot only allows one world to be active at one time. However I have a support class that may help. Check out my PIP Actor Class which has actors emulating world objects.
I went in and tweaked the coding of the scenario you linked me (by tweak I mean just moved around and adjusted where and what size the sub worlds are and start at so that they look like what I have in the OP) to and basically got it to look how I want, now I just need to figure out how to do everything else I want to do as far as adding to this idea, which by the way works 99% flawlessly for the purpose I need. However, I have another question in relation to that scenario now. How would I go about removing the "press '1' press '2'" to start each of the separate sub worlds? I just want them to be running when I press run. Thanks, and I really appreciate that feedback Danpost.
danpost danpost

2014/2/9

#
nickvcg wrote...
So then if I wanted to have borders like your wombat thing in that, but I want it to be 2/3 of the screen like in the first post and then have a separate interactive thing below it that can work in unison with the top
You can have your main world be the interactive part (so mouse action are easier to work with) and the other part be the PIP actor (which would be difficult to work mouse interaction with -- but, possible). You will only need one PIP actor object. You can pretty much remove everything from my Major world act method and call 'run' on your PIP actor in your world constructor.
nickvcg nickvcg

2014/2/9

#
danpost wrote...
You can pretty much remove everything from my Major world act method and call 'run' on your PIP actor in your world constructor.
I figured that part out too now, so now I suppose I need to figure out where to go from here as far as making the bottom half work how I want it to. I've only had 5 or 6 days of CS1010 so far so as far as my experience programming goes, it's basically no where, but I have been catching on quick and already read that whole text book so I'm just trying to make my own stuff now, but your scenario really helps with my next idea! Now I need to figure out how to work a tab system into this. Oh boy.
You need to login to post a reply.