Tuesday, May 10, 2011

5/10/11 - Movement Problems

Today, we tried to make things move in greenfoot using the arrow keys.  Most of the games on greenfoot have this function working very well and easily. 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 using the random class, which is under one of the tutorial exercises on the website.  I got the source code from some games on greenfoot.  But, their code is so confusing and long, and it is hard to find which part of it is the code for the movement.  Every time we found some sort of code, it did not work because it needed some other code that was called from somewhere else.  Needless to say, it was very frustrating...  Hopefully we can get it to work tomorrow. 

No comments:

Post a Comment