Isomap?? Here we go ;)

Previous topic - Next topic

Schranz0r

Hi my english speaking friends,

I've made a simpel Isomap.
I hope anyone need this, or was looking for.
Screenshot:



Tile "ground.png": (save as PNG):



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

[attachment deleted by admin]
I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Lazarus

Very handy. :)  Thanks a mill, Schranz0r.

Schranz0r

I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

Hb!

Umm I might need it, Thanks, I think it could be handy.

bigsofty

Cheers,

Ian.

"It is practically impossible to teach good programming style to students that have had prior exposure to BASIC.  As potential programmers, they are mentally mutilated beyond hope of regeneration."
(E. W. Dijkstra)

Kitty Hello

aye! Looking ace!

kin

Great! Now I have a good example to use!
I guess this method is faster than tiling 5000+ sprites lol.

thnx

onugl

 :giveup: Please, can anyone give me this code?.

Thank you

Kitty Hello

it's in the 1st post. The download is broken, but the code is there in text form.

onugl


Schranz0r

I <3 DGArray's :D

PC:
AMD Ryzen 7 3800X 16@4.5GHz, 16GB Corsair Vengeance LPX DDR4-3200 RAM, ASUS Dual GeForce RTX™ 3060 OC Edition 12GB GDDR6, Windows 11 Pro 64Bit, MSi Tomahawk B350 Mainboard

onugl

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!)

AndyH

Looks good Schranz0r!