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

2012/9/11

Scrolling Backgrounds + objects

groengeel groengeel

2012/9/11

#
I am fairly new to Greenfoot, but have a somewhat advanced question. I was hoping someone could point me to an accessable tutorial or good commented example to do what I want. I want to create a small game. It should have a world with objects which is scrollable in both axes. These objects should be pinned to the background. The player would just walk through the world and be centered in the screen. If you find this a rather cryptic description: think about Zelda or Pokemon on your Gameboy. Remember how you walked through the world? I would like to do just that!
groengeel groengeel

2012/9/11

#
For an example see this Youtube vid on Pokemon Yellow: http://www.youtube.com/watch?v=NH4ZSFOFsqM I you don't like waiting, skip to 1:39.
groengeel groengeel

2012/9/12

#
Today I spend an hour or two searching the scenario's, comments and discussions. Luckily, I just found this link: http://www.greenfoot.org/scenarios/5279 It has an rtf file in the GreenfootImages folder Thought I'd share it here...
MatheMagician MatheMagician

2012/9/12

#
This might be helpful to you as well, http://www.greenfoot.org/collections/325. If you have any specific questions though, feel free to ask them in this discussion.
Zamoht Zamoht

2012/9/12

#
I tried to make a game with a scrolling world. I wanted the game to have a big world (like pokemon), but no matter what I did i ended up having memory issues. The issues were too big background images, too many objects moving at the same time (I even tried to delete some of the objects when they were offscreen, but that took a lot of cpu) etc. I don't know how to avoid these memory issues any ideas?
MatheMagician MatheMagician

2012/9/12

#
Can't help you much with the actor problem:(. For the scrolling issue, maybe if you divided the world into multiple smaller sections, say 100, and then draw only the sections visible at the time.
SPower SPower

2012/9/13

#
Maybe my Scrolling World scenario is also helpful. Choose which one you like.
groengeel groengeel

2012/9/13

#
@MatheMagician: Thanks. I will see whether it helps. @zamoht: Thanks for sharing the problems you encountered. It helped! @SPower: Will try, it looks a lot simpler at first sight. I'll see which of the options help me better. Expect updates here ;-)
You need to login to post a reply.