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.

DarkBASIC Discussion / tiling images

Author
Message
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 25th Nov 2002 20:51
can you tile an image coz i have a wall + i have a small seamless brick texture, i want the the brick pattern repeat over so it looks like it is one big texture,

help me if you can.

if there a command such as tile image to object??
l8er

----- dark coder -----
Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 26th Nov 2002 00:16
use this:

LOAD IMAGE "imageName", Image Number
TEXTURE OBJECT Object Number, Image Number

and make sure that the texture is saved in the same directory and that the image does not exceed the maximum texture size of 256x256.

xxxpetratxxx
B. R. W
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 26th Nov 2002 09:58
i know how to texture an object but how do you tile it, say you had a 50*50 matrix and had the same seamless texture on it the texture would be tiled 50 times,right but how do i do the same effect onan object, btw the image doesnt have to be in the same directiory you can go
load image "media/images/floor_1.bmp",1

l8er

----- dark coder -----
BarZoule
21
Years of Service
User Offline
Joined: 26th Nov 2002
Location:
Posted: 26th Nov 2002 10:11
the command you're looking for is scale object texture

look in DB help for more details about it.

dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 26th Nov 2002 19:36
thanks alot BarZoule,

to stop spamming these boards i will post my secon question.

how do you inclide code to your main code, coz #include(file.dba), only incluses functions

l8er

----- dark coder -----
sgalland
21
Years of Service
User Offline
Joined: 18th Nov 2002
Location: United States
Posted: 26th Nov 2002 21:04
there is now way to include plain source thats not in functions, however as a programmer of many years its easier to write the main code in your main file and #include all your functions seperately. I always make a file for input commands, screen functions, etc.

Have fun,
Sean
dark coder
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 26th Nov 2002 21:53
well the code i want separate is the positioning of objects as i have lots!! i need a separate file

l8er

----- dark coder -----
TheCyborg
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 27th Nov 2002 09:59
Just put all the positioning inside a Function and put the function inside an include file.
Example: (game.dba)


Example: (functions.dba)


TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.

Login to post a reply

Server time is: 2024-04-25 10:58:18
Your offset time is: 2024-04-25 10:58:18