Friday, May 13, 2011

Movement Problems

My post apparently got deleted somehow so I am going to repost what's been deleted.



For the past two days, we have been trying to make things move in greenfoot. First we started playing around inside the wombat class. If we call the turnleft() or move() in the void act(), we can make the wombat move around all over the place. We also thought about moving it to random spots, which is under one of the tutorial exercises on the website.

What we really want to do is move around with arrow keys. What I did today was get the source code of a couple of game on the site. Then I opened it up on greenfoot and tried to understand some of the code. I will stay after school tomorrow and try to figure out how to move with arrow keys. I think movement is crucial right now before we move on to other things.

1 comment:

  1. See step 9 of this page for an example of using the arrow keys: http://www.greenfoot.org/doc/intro1.html

    ReplyDelete