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

#1 2011-11-23 14:28:07

AtomicBawm3
Scratcher
Registered: 2009-06-27
Posts: 1000+

Isometric Infinite Scrolling

Yeah...it's kind of advanced, but I figured I might as well ask about it before I keep going.  I've figured out a perfect horizontal system, but the vertical scrolling is giving me some trouble.  Here's the info you'll need:

7 by 13 grid of isometric squares (85 total, 7 rows are 7, 6 rows are 6)

Isometric squares are 42 by 21, but move on a system of 42 (x) and 22 (y).  Just remember that a row fits in between this, so technically it's 21 by 11.

Uses a map system where item # is y, and item letter is x.  It uses a mod system to be able to adjust to any map size.

Variables:
scrollx -horizontal scroll value
scrolly -vertical scroll value
tx -tile 1's x based off the scrollx (each tile is 1 tx instead of 42 x)
ty -see above but for y
stampx -adjuster as you move away from tile 1, easier than doing each tile individually
stampy -same as above
l -length of map (y value) (i.e. the length of the list 'map')
w - width of map (x value) (i.e. the length of item 1 of list 'map')

I believe that's all...if you need more info, I suppose I could post it, but I'd prefer not to.


http://i50.tinypic.com/j0yw0p.jpg

Offline

 

Board footer