GLBasic forum

Main forum => Tutorials => Topic started by: Schranz0r on 2007-Apr-05

Title: Isomap?? Here we go ;)
Post by: Schranz0r on 2007-Apr-05
Hi my english speaking friends,

I've made a simpel Isomap.
I hope anyone need this, or was looking for.
Screenshot:
(http://www.glbasic.com/forum/index.php?action=dlattach;topic=789.0;attach=240;image)


Tile "ground.png": (save as PNG):
(http://www.glbasic.com/forum/index.php?action=dlattach;topic=789.0;attach=243;image)


Code (glbasic) Select
// --------------------------------- //
// Project: Iso
// Start: Thursday, April 05, 2007
// IDE Version: 4.142


LOADSPRITE "ground.png",1 // Load Isosprite

DIM tile[20][20] // Set Array

WHILE TRUE

//-----Set Locals----------
w=72     // Tile width
h=36     // Tile hight
w2=w/2   // Half Tile width
h2=h/2   // Half Tile hight
//-------------------------

FOR x = 0 TO 19
FOR y = 0 TO 19

xpos = w2*(x-y)-w2  // calculate xpos
ypos = h2*(x+y)     // calculate ypos

DRAWSPRITE 1,xpos-ScrollX,ypos-ScrollY    // Draw sprite

NEXT
NEXT

//--------Scroll-----------------------

IF KEY(200) THEN ScrollY = ScrollY -3
IF KEY(208) THEN ScrollY = ScrollY +3
IF KEY(203) THEN ScrollX = ScrollX -3
IF KEY(205) THEN ScrollX = ScrollX +3

//---------------------------------------

SHOWSCREEN
WEND
END


Download : Click me (http://www.glbasic.com/forum/index.php?action=dlattach;topic=789.0;attach=242)

[attachment deleted by admin]
Title: Isomap?? Here we go ;)
Post by: Lazarus on 2007-Apr-05
Very handy. :)  Thanks a mill, Schranz0r.
Title: Isomap?? Here we go ;)
Post by: Schranz0r on 2007-Apr-05
no problem  ;)
Title: Isomap?? Here we go ;)
Post by: Hb! on 2007-Dec-11
Umm I might need it, Thanks, I think it could be handy.
Title: Isomap?? Here we go ;)
Post by: bigsofty on 2007-Dec-11
Nice example! ;)
Title: Isomap?? Here we go ;)
Post by: Kitty Hello on 2007-Dec-11
aye! Looking ace!
Title: Isomap?? Here we go ;)
Post by: kin on 2008-Jan-05
Great! Now I have a good example to use!
I guess this method is faster than tiling 5000+ sprites lol.

thnx
Title: Re: Isomap?? Here we go ;)
Post by: onugl on 2008-Jul-25
 :giveup: Please, can anyone give me this code?.

Thank you
Title: Re: Isomap?? Here we go ;)
Post by: Kitty Hello on 2008-Jul-26
it's in the 1st post. The download is broken, but the code is there in text form.
Title: Re: Isomap?? Here we go ;)
Post by: onugl on 2008-Jul-26
 :noggin: :rolleyes: :zzz: Thank you
Title: Re: Isomap?? Here we go ;)
Post by: Schranz0r on 2008-Aug-18
 :good:

see first post :)
Title: Re: Isomap?? Here we go ;)
Post by: onugl on 2008-Aug-18
Quote from: Schranz0r on 2008-Aug-18
:good:

see first post :)
=D Thank you! it give me some ideas for a pendent remake ;) (Now, I only need more time!)
Title: Re: Isomap?? Here we go ;)
Post by: AndyH on 2008-Aug-19
Looks good Schranz0r!