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

#1 2009-12-16 14:31:12

TheSalamander
Scratcher
Registered: 2009-11-23
Posts: 16

Tiling example

http://scratch.mit.edu/projects/TheSalamander/805852
It doesn't appear to be working online so please DL  smile

When making a platform game I decided that I did not want to have to have a lot of sprites to just be floor/walls etc. So I decided to make a single sprite that could do all of it... It could stamp 99 different designs and mathematically create 99 to the power of 150 different maps... That is roughly

Code:

221451787238861217340759025507787415983335644990829824070446858118838802522867639649398882473822190590626844436760560667093734302716161107239111405730454375426189759715380334025165802733032686053184393755354097177513400000000000000000000000000000000000000000000000000000000000000000000000000000000000

designs  wink 

Currently it only has a few sprites (My version with mario tiles got corrupted  sad  ).

When asked for a code you need to enter a 300 digit number, This is what it reads and prints the level to.

Sample code that will just have vertical stripes:

Code:

010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405010203040501020304050102030405

Offline

 

#2 2009-12-16 14:56:28

archmage
Scratcher
Registered: 2007-05-18
Posts: 1000+

Re: Tiling example

This sort of tiling is pretty common. Most retro games used tiles in order to have a small file size.

Here is my version of such a program http://scratch.mit.edu/projects/archmage/280391

putting in a huge number is impractical so I think you should make a tool that lets users create maps easily.

Last edited by archmage (2009-12-16 14:57:33)


Hi, I am Archmage coder extraordinaire. I do Scratch,pascal,java,php,html, AS2 and AS3. Leave me a message if you want coding advice. Also check out my personal website, lots of good stuff about web development, Flash, and Scratch (v1 and v2) !

Offline

 

Board footer