creating greenfoot backgrounds. gimp: gimp: is a software graphics editor is a software graphics...

10
Creating Creating Greenfoot Greenfoot Backgrounds Backgrounds

Upload: damian-dalton

Post on 04-Jan-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

Creating Creating Greenfoot Greenfoot

BackgroundsBackgrounds

Page 2: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

GIMP:GIMP: is a software graphics editoris a software graphics editor is similar to Adobe Photoshop – but is similar to Adobe Photoshop – but

FREE.FREE. stands for:stands for:

G – GNU (GNU’s Not Unix)G – GNU (GNU’s Not Unix) I – ImageI – Image M – ManipulationM – Manipulation P – ProgramP – Program

runs on Windows, Apple OS, and Linux.runs on Windows, Apple OS, and Linux. can be downloaded at:can be downloaded at:

http://http://www.gimp.orgwww.gimp.org//

Page 3: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

Please watch the online videos to Please watch the online videos to see the:see the:

1. Demo: Creating a Road1. Demo: Creating a Road

andand

2. Activity: Creating Outer Space2. Activity: Creating Outer Space

Page 4: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

Once you have created your Once you have created your background you are ready to insert background you are ready to insert it into Greenfoot.it into Greenfoot.

1. Create A New Scenario In 1. Create A New Scenario In Greenfoot.Greenfoot.

Page 5: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

2. Create Your World Class2. Create Your World Class Right-Click on WorldRight-Click on World Select “New Subclass”Select “New Subclass” Give your subclass a name.Give your subclass a name. Click “OK”Click “OK”

Page 6: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

3. Make the image file available.3. Make the image file available. Using Windows Explorer, open the Using Windows Explorer, open the

folder for you Greenfoot scenario.folder for you Greenfoot scenario. Find the “images” folder.Find the “images” folder. Copy your JPEG image into that Copy your JPEG image into that

“images” folder“images” folder This folder is where we will save all of This folder is where we will save all of

our images.our images.

Page 7: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

4. Set the image in Greenfoot:4. Set the image in Greenfoot: Go back into GreenfootGo back into Greenfoot Right-click on your World sub-class that Right-click on your World sub-class that

you created.you created. Select “Set image”Select “Set image” Select your image file and click “Okay”Select your image file and click “Okay”

Page 8: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

5. Your image should appear as the 5. Your image should appear as the background for the World!background for the World!

But notice how the size is not correct. We But notice how the size is not correct. We have to fix that!have to fix that!

Page 9: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

6. Double-click the World sub-class 6. Double-click the World sub-class that you created to edit it.that you created to edit it.

The default World size in the constructor The default World size in the constructor is:is:super(20, 20, 10);super(20, 20, 10);

Change the settings so that they match Change the settings so that they match the width and height of your image (in the width and height of your image (in pixels). For example, if your world is 500 pixels). For example, if your world is 500 pixels wide by 400 pixels high, you would pixels wide by 400 pixels high, you would set the size to:set the size to: super(500, 400, 1);// 1 is for the height and super(500, 400, 1);// 1 is for the height and

width of one cell in Greenfoot.width of one cell in Greenfoot.

Page 10: Creating Greenfoot Backgrounds. GIMP: GIMP: is a software graphics editor is a software graphics editor is similar to Adobe Photoshop – but FREE. is similar

7. We are finished setting the 7. We are finished setting the background!background!