Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / image as background?

Author
Message
mossy1991
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 11th Feb 2005 02:38
hey everyone
im tryin 2 make a 2d rpg game but i havnt figured out how to make an image into a tiled background
is it possible and if so plz plz plz can i have the code/ a tip
Agent
20
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 12th Feb 2005 15:39
Anything is possible.

Use two nested FOR... NEXT loops to display each small tile one by one.

FOR x = 1 TO 20
FOR y = 1 TO 20
PASTE IMAGE tilenum, (x*tilesize), (y*tilesize)
NEXT y
NEXT x

tilenum is the image number of the tile you want to draw at that coordinate. tilesize is the physical size of the (square) tile in pixels.
mossy1991
20
Years of Service
User Offline
Joined: 26th Dec 2004
Location:
Posted: 13th Feb 2005 01:13
thx

Login to post a reply

Server time is: 2025-05-18 05:45:57
Your offset time is: 2025-05-18 05:45:57