This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-03-24 21:56:44

Common_Sense
Scratcher
Registered: 2009-12-21
Posts: 100+

Grid drawing tutorial - Easily draw a grid of any size

Grid drawing
Project link
Size: 4 KBs

Recent updates:
I added a slider and an "Update grid" button.
The pictures are a little outdated.

The code is simple:
http://img138.imageshack.us/img138/9840/gridscript.gif

The "Grid size" Can be changed to any number above 0, even one if for whatever reason you wanted to make the entire game black.

It's often better than saving an image of a grid, as this script is only 4 kilobytes and when making a small game it's better not to make your users wait. Oh, and you can still use a custom grid piece.

Grid size examples:
(Note, smaller grids take longer to draw, but it is an interetsing effect to watch it make itself. The grid appears cut off in the photos, but it doesn't ingame)

Grid size: 16
http://img176.imageshack.us/img176/385/gridss16.gif

Grid size: 2
http://img442.imageshack.us/img442/3831/gridss4.gif

Grid size: 32 (Probably most common)
http://img338.imageshack.us/img338/6039/gridss3.gif

Grid size: 4
http://img202.imageshack.us/img202/6821/gridss1.gif

Feel free to use it if it'll save you some time, just give credit in your game
description.

And the link once again

Last edited by Common_Sense (2010-03-25 01:32:40)


http://i44.tinypic.com/6dvort.png

Offline

 

#2 2010-03-25 15:18:38

Common_Sense
Scratcher
Registered: 2009-12-21
Posts: 100+

Re: Grid drawing tutorial - Easily draw a grid of any size

It's been a day, does this not help anyone?


http://i44.tinypic.com/6dvort.png

Offline

 

Board footer