Feb 01 2007

Greenfoot Release 1.1!

Published by matt under Uncategorized

Most of you don’t actually see Poul Henriksen on a regular basis don’t know that he has been claiming this release would come out “any day now” for, like, the last two weeks. But, today is today, and here it is!

Straight from the announce list:

Greenfoot 1.1 is available for download now.

http://www.greenfoot.org/

This version of Greenfoot adds various improvements, both the
performance and stability, as well as some new features.

The most noticeable of the new features is the support for sound. To
demonstrate the sound support (and exciting game programming in
general), we have also released a new scenario, named asteroids.

Both are available form the Greenfoot web site.

For those of you who are planning to attend the SIGCSE’07 conference
in March: We will be holding a Greenfoot workshop at the SIGCSE
conference. Come and join us!

The Greenfoot Team

Oooh! And I got to use the “releases” category, too!

Comments Off

Sep 13 2006

IOU

Published by matt under Uncategorized

I’ve made IOU, a command line app of ill repute, available for download.

http://www.sububi.org/software/iou/

This is a specialized tool, and is likely not of interest to a broad class of users. I use it for reconciling receipts in our house. We share grocery (and other) costs in the house, and routinely have to split this up across different subgroups of the house’s residents. IOU lets me easily enter all of the receipts, who split that particular receipt, and then find out who owes whom, and how much.

It is only available for the Mac at the moment, but if there is interest, I could make it available for Windows. At least, I think I can.

No responses yet

Jun 04 2006

Magic Mushrooms!

Published by matt under Uncategorized

I really want to apologize; I just started the weblog, and promptly went silent for too long! My intent is to post weekly. The last few weeks, however, were difficult. I was busy trotting the globe, obtaining work permits (so as to remain in the UK legally), and this was really quite stressful.

But, that’s over now… I’ve decided to become a refugee in the UK. Just kidding! Now that we’re getting back on track, it’s important to say the important things up front: Greenfoot is 1.0! This is excellent news; Poul, Davin, and Michael, and Bruce all put in some hard work to make Greenfoot ready for use sooner rather than later. Therefore, I need to step up my explorations.

Magic Mushrooms

In my last post, I built LumpWorld, which was a world with mushrooms that didn’t do anything. This wasn’t very exciting, but it demonstrated that we could do something in Greenfoot without ever writing a single line of Java. That’s kinda cool. However, I’m not content to produce LumpWorlds over and over… my Lumps need to move around, interact, and ultimately, take over the world.

We’ll start small, though. :)

My next steps will carry on from where I was, so you can create your own LumpWorld, and pick up where I’m at. If all goes to plan, I’ll have a bunch of mushrooms dancing around the world. To start, lets see what kind of code I’ve got in my Lump Actor.


walkabout-mm-002


Every Actor comes with a template of code for you to work with.

What does this stuff mean? When you write programs in Greenfoot, you’re writing code in the Java programming language. Now I’m not gonna lie to you: the Java programming language is large and complex. That said, if I can write code in Java, I’m confident you can make your way around it as well; besides, we’re going to take small steps to tackle the language. Also, I will say this (and will say it more than once): if you’re new to programming, grab a copy of Studying Programming. Yes, I helped write it, but so did a lot of other excellent people at the University of Kent. It’s intended for people just starting out writing programs, and I think there’s a lot of good stuff to help you learn how to read code and make sense of programming environments like Greenfoot.

Editing the code

Now that I’ve attempted to scare you off programming, and encouraged to buy the book that I helped write, let’s get back to the task at hand: making the Mushrooms in the world spin like crazy fungal tops.

  1. Add a field

    First, I’m going to add a field to my Actor; this is a place where we store information about the Actor. Technically, information about your Actors is referred to as the Actor’s state. The field will hold a number (without any fractional parts), so it will be of type int. And since I get to choose the name of the field, I’ll call it lump_rotation, as it will hold information about the current rotation of the object.

  2. Increment the field

    For the moment, most of the interesting stuff happens in the Actor’s act method. You see, Greenfoot constantly is poking at our Lump, saying “Hey! Act! Do something!” When you hit the “Act” button, the act method gets invoked once; when you hit the “Play” button, it does this over and over and over. However, if there’s nothing in the act method, nothing will happen. For now, I’m going to do two things in the act method, and the first one is to increment the value of lump_rotation. Specifically, I’m going to add one to the value of lump_rotation, and overwrite the existing value of lump_rotation with this new value. This is given by the code


    lump_rotation = lump_rotation + 1;
  3. Set the Actor’s rotation

    I cheated; I looked at the Wombat tutorial to see what Michael had done there. I thought rotating my mushrooms would be a good start. So, every time we’re asked to act, we increment our rotation, and then set our Actor’s rotation to that value. This is accomplished by the code


    setRotation(lump_rotation);

    Of course, there’s some details here that might be worth mentioning… but I’m going to gloss over them for the moment.

You can see all three of these changes below.

walkabout-mm-005

And that’s it! I’ve added three lines of code to my Lump, and now they rotate in a most excellent way. :) (Don’t forget; you need to compile your program before you can add Actors to the world and have them do anything interesting.) I was so pleased with the success of my experiment, I created a small movie of a spinning mushroom (right-click and “Save As”). It’s 7.8MB, and in in the Quicktime MP4 format. As I get settled in with making screencapture movies of Greenfoot, I’ll work out how to quickly and easily generate files that I know for certain will play on both Mac and Windows. For the moment, just drop me an email if things don’t work for you, and I’ll see what I can do.

Oooh… and I need to come up with a well-structured way to include/aggregate the source code from all my explorations. For now, here’s a zip file of the Greenfoot project that I ended up with when I was done spinning mushrooms all over the world.

What next?

Spinning mushrooms are all fine and good, but they’re still just lumps. I think it would be fun if they were mobile, and I think it would be great if they interacted with each-other in some way. We’ll see where the next installment takes us.

Questions?

I suspect I have some fancy greenfoot.org email address, but I’m not sure about that. For now, if you have any questions, don’t be afraid to drop me a note at my gmail.com address; that would be ‘jadudm’. Or, leave a comment here on the blog; I think I have moderation turned on (to block weblog SPAM), but that may change as I get the hang of using Wordpress. Comments may someday loose to SPAM, mind you.

Comments Off

May 12 2006

Woot! 0.9 hit the streets!

Published by matt under Uncategorized

I don’t think I’ve got any readers yet. Helloooo! Big news! Big news!


Greenfoot-09-Announce

So Bruce, Davin, Mik, and Poul (alphabetical by first name) rolled out version 0.9. Obviously it is time for me to up the ante and start showing you some of what is possible with Greenfoot. Or, to start exploring, and let you tag along. I know Mik has a tutorial in the works (which will be a better place for beginners to start), but I’m going to do a little exploring in the next post just the same.

(And look at that! A plug for the blog! *sniff* It makes me feel loved. :) )

Comments Off