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.

Newcomers DBPro Corner / matrix questions

Author
Message
rob3d
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Canada
Posted: 5th Jan 2003 06:40
I am trying to create a matrix that i can define each tile of the matrix. If I use the code below all it does is create a matrix with the same tile repeated in every tile location.
Make matrix 1,500,500,20,20
Load image "tile1.jpg",1
Prepare matrix texture 1,1,1,1

When I try to place another tile in other locations but I get "matrix illegal tile at line ____"

Isn't there a easy way to assign images to each tile location in my matrix without resorting to some matrix making program? I would think you should be able to simply load your tile bitmaps and assign the bitmaps to each tile in the matrix using a simple loop that defines which bitmap goes on what tile
This matrix stuff seems more complicated than it has to be.
Matto
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location:
Posted: 6th Jan 2003 01:14
Everything is easy when you know how, knowing how is the hardest part.., I don't use Matrices much, but you can texture individual tiles of a matrix and the best way to learn this is to go through the examples provided in DB/DBPRO and then try changing the examples enough untill you discover what is going on, just tweek small things here and there to see what things do and then progress until you can create and tile you own matrix with your own textures..

1ghz Cel,512 sdram 133,Gf2 MX 400 64,SBL 5.1,Win98
Best Upcoming MMOG - http://WWW.Atriarch.com
Project: Card Game with No Name
xtom
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Ireland
Posted: 6th Jan 2003 03:14
Looking at your code you seem to just have one texture tile which is the entire bitmap. What you have to do is use just one bitmap for texturing a matrix and have all your tile textures in that bitmap layed out in a grid. Then state the size of your texture grid in Prepare matrix texture. eg. Prepare matrix texture 1,1,4,4 if you have 16 texture tiles in the one bitmap. Then you can use set matrix tile to texture the individual tiles in the matrix. Tile 1 would be the top left texture tile in your bitmap and tile 16 would be the bottom right. Having said all that I just remembered that prepare matrix texture is mirrored or something at the moment because of a bug. So tile 1 could be the bottm right or something. Anyway have a look at the help and play around with.
rob3d
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Canada
Posted: 6th Jan 2003 05:54
Thanks for the replies.

I Jammed out and tried Matedit. It sort of worked. (It actually mirrored my textures "weird" so I re-built my matrix with the tiles mirrored and then it worked. ) I saved the code out and now I beleive I can reverse engineer it and build my matrixes on the fly or by using data statements like the output from matedit.

Thanks For the advice

Matto - DbPro seems to be sort of short on examples compared to DB

Xtom - Your method is a good idea also. ( I guess I found the Mirrored bug you are talking about also )

Login to post a reply

Server time is: 2024-04-13 17:38:40
Your offset time is: 2024-04-13 17:38:40