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

Report as inappropriate.

computers.fun
computers.fun presents ...

2008/12/17

wombat cross creek -- basic example of making world

Use arrow keys to help the wombat cross the creek by stepping on the stones.

This is part of a series of Greenfoot lessons.

The source code can be viewed on kidslike.info at
http://www.kidslike.info/greenfoot_game_wombat_crosses_creek

The move code is from one of the Greenfoot video tutorials
http://www.kidslike.info/code_for_a_penguin_that_jumps_greenfoot_programming


5287 views / 832 in the last 7 days

Tags: demo with-source example basic

Your browser does not support the canvas tag.
computers.funcomputers.fun

2008/12/17

Use the left, right, up, down, arrow keys to help the wombat go across the creek.by stepping on each red brick. The code for this scenario is published on kidslike.info at http://www.kidslike.info/greenfoot_game_wombat_crosses_creek
computers.funcomputers.fun

2008/12/17

This game illustrates 1) how to create a new world that already has objects 2) how to use a for loop 3) how to accept keyboard input to move an actor around
mjrb4mjrb4

2008/12/17

You may want to consider making the world a bit smaller - it doesn't fit on my laptop's screen all at once, which does make running it / moving around more difficult!
computers.funcomputers.fun

2008/12/18

mjrb-4, thank you for your suggestion. I can make it smaller. Can you tell me what size would fit on a laptop?
mjrb4mjrb4

2008/12/18

That's an interesting point actually - for me it's around 1000x450 but, as they say, milage may vary. If you have a look on greenfoot discuss I've started a thread about what sizes fit what people... hopefully people will reply which may give you a better idea! Also, note the sizes I've used there are in pixels, not in 2 pixel blocks like you've used here (which will invariably make it twice as big!) - was there a reason behind using a cell size of two pixels? Usually when you want the smoothest movement, the 1 pixel size is best.
A new version of this scenario was uploaded on Fri Dec 19 16:03:40 UTC 2008
computers.funcomputers.fun

2008/12/19

mjrb4, Thank you. I changed the screen to 600, 400, 1. The 2 was an accident. I'm glad you pointed that out. I'll sign up for Greenfoot discuss.
computers.funcomputers.fun

2008/12/19

by the way, when you unzip this scenario, it's called obiwanfightsanakin, because the eventual goal is to turn this into a game where Obi-Wan Kenobi fights Anakin (Star Wars)
supersupersupersuper

2008/12/19

you don't fall

Want to leave a comment? You must first log in.

Who likes this?

No votes yet.