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 / Big, small tile size matrix

Author
Message
jimbo1913
22
Years of Service
User Offline
Joined: 19th Apr 2003
Location: - Please Select -
Posted: 2nd Jun 2003 16:42
I need a big matrix (10kx10k) but with tiles 20x20 or so in size. Can this be done with one matrix or will I have to use multiple matices?

ps - I bet this questions been answered several times before. These forums would be *so* much more useful with a search facility. Prayer to DB gods:'please make the forums searchable. Amen'
from future review of next game....
'..while the programmer of this game may not be God-like he certainly represents the next step in human evolution. (10/10).'
Beta1
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 2nd Jun 2003 17:49
No it cant.

Maximum number of tiles in a maxtrix is 128x128. So for a 10K matrix the minimum tile size would be 78.125 units. Thats not so far off you 20 unit tile though so maybe you could live with it.



Someone wrote a rather nice memblock matrix system which apparently is faster than the built in one, I havnt had a chance to try it yet but if you want multiple matrixes this may be the way to go.

And if you go to google's advance search and limit it to the www.darkbasicpro.com domain you can search the forum.

jimbo1913
22
Years of Service
User Offline
Joined: 19th Apr 2003
Location: - Please Select -
Posted: 2nd Jun 2003 19:56 Edited at: 2nd Jun 2003 19:58
thanks for quick reply Beta

that tile size I could probaby live with but when I try to make a matrix that size i get the error - 'matrix too large. maximum 10000 pologons'.

make matrix 1,10000,10000,128,128

i got DB classic 1.13 (upgraded box version 1.12),Athlon 2k,512mb ram and radeon 9000 128mb graphics.

from future review of next game....
'..while the programmer of this game may not be God-like he certainly represents the next step in human evolution. (10/10).'
Beta1
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 2nd Jun 2003 21:37
just realised I wandered into the wrong forum - thats 128x128 is the max for DBPro. Not so sure about DBC. Its to do with the maximum number if vertexes allowed in a single mesh in DBP. 10,000 polys would approximate to 70 tiles per side so your looking at around 150 units per tile.

Looks like its time to bolt a few matrixes together....

jimbo1913
22
Years of Service
User Offline
Joined: 19th Apr 2003
Location: - Please Select -
Posted: 4th Jun 2003 13:26
hehehe

thanks for all the help beta - the search tip is invaluable

from future review of next game....
'..while the programmer of this game may not be God-like he certainly represents the next step in human evolution. (10/10).'
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 4th Jun 2003 14:31
I can show you a method to traverse multiple matrices if your interested in learning it.

its based on a linear method so either x or z dimension is cascaded along to new matirces.

dont forget with a little coding knowhow the scroll matrix commands help a great deal when applying one matrix to more than one area or larger than the displayed matrix area.

jimbo1913
22
Years of Service
User Offline
Joined: 19th Apr 2003
Location: - Please Select -
Posted: 4th Jun 2003 20:53
Hmm, you mean you dont just position them in 3D space and DB looks after the rest?

I would be very interested in learning that indi.

from future review of next game....
'..while the programmer of this game may not be God-like he certainly represents the next step in human evolution. (10/10).'
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 5th Jun 2003 03:56
jimbo1913
22
Years of Service
User Offline
Joined: 19th Apr 2003
Location: - Please Select -
Posted: 5th Jun 2003 22:32
hmmm, been thinking about how slow multiple matrices are gonna be. Its for a game for the Retro Remakes compo and it would be a bit rubbish if my Remake of a Spectrum game needed a 2 gigahertz CPU to run it

I think I'll try a scrolling matrix. Looked at the example and its relatively straighforward (he says hopefully)

from future review of next game....
'..while the programmer of this game may not be God-like he certainly represents the next step in human evolution. (10/10).'
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 6th Jun 2003 16:05
hehe good luck with that, a little more prethought to affect and manipulate it but still works very well for memory reduction i would assume

Wiggett
21
Years of Service
User Offline
Joined: 31st May 2003
Location: Australia
Posted: 6th Jun 2003 16:34
omg its indi! man havent seen u in ages (i used to be on teh old forums as mr bungle.) anywya how is that game with teh dwarf going? still in the works? or completed? please dont say abandoned

i need a copy of the 1.03 exe or i cant work on my game anymore
Andy Igoe
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 6th Jun 2003 18:59 Edited at: 6th Jun 2003 19:01
Quote: "I need a big matrix (10kx10k) but with tiles 20x20 or so in size. Can this be done with one matrix or will I have to use multiple matices?"


Quote: "No it cant."


Yes it can.

You should never create a single matrix that big even if DB allowed you too, there's just too many polygons for your game to run smoothly, it would play at about 1000 seconds per frame. You need to think outside the box a little bit.

Download my Terrascape engine demos (two are available from my W.I.P. section in NFP and Terrascape) for a demonstration of 2000x2000 and 1000x1000 matrices respectively.

Although now a DBPro project, both techniques use an actual matrice of around 30x30 or 40x40.

The system works by showing only what is local to the camera and storing the actual matrix in an array.

The technique isn't particularly complicated, a few hours fiddling, or a few weeks if your new to programming, and you will have a working system.

The real challenge is filling that landscape with multiple objects, any idiot can make a big map - but making a big map with content is another matter and that's where the real skill is.

Several times in the past i've given tips on how to accomplish this, but there is no foolhardy system. It depends on what you are trying to achieve. Optimisation is the difference between skilled programmers, and somebody who knows how to make a cube rotate onscreen.

We can all make a game that looks as good as Quake with a gazillion polygons and a game with 1,000,000 objects above 10,000 polygons. Making that playable and run at an accepteable speed onscreen, that is the true art of programming.

Pneumatic Dryll
Beta1
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location:
Posted: 6th Jun 2003 19:09
While I dont really want to argue with Dryll as his terrain trickery is very impressive, I can run a single matrix thats bigger than 10Kx10K units and is 100x100 at far less than 1000 seconds per frame - I get around 100-150 fps in dbp like that with textures, a couple of hundred objects and collision detection.

But enough about DBP

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 6th Jun 2003 19:38
hello mr bungle ltns

Im still working on it with Ipakagun mostly blivvy and rich are silent at the momo with work.

website for it now is
http://www.lunarpixel.com/dt

last public shots of it are here
http://www.realgametools.net/forums/attachments/Welf01.jpg
http://www.realgametools.net/forums/attachments/Welf02.jpg
http://www.realgametools.net/forums/attachments/Welf03.jpg
http://www.realgametools.net/forums/attachments/Welf04.jpg
http://www.realgametools.net/forums/attachments/Welf05.jpg

Andy Igoe
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 6th Jun 2003 20:36
Quote: "While I dont really want to argue with Dryll as his terrain trickery is very impressive,"


*blush* - but really it is not very complicated, at least the matrix side of things isn't. The difficult part is filling a large world with enough objects to make it interesting.

Quote: "I can run a single matrix thats bigger than 10Kx10K units and is 100x100"


The significant thing is the number of tiles, 100x100. Whilst not overtly huge, it is far from optional when the camera can only see an area of around 20x20.

When you divide your area (10,000) by the tiles (100) you end up with 100 area per tile. The original post is aiming for 20 area per tile in the same map size.

To achieve this, that would take a 500x500 matrice (rather than 100x100) which neither DBC or DBP inately supports, and if they did, this would display very slowly indeed.

The same onscreen effect could also be achieved with a matrice texture 5 times the size. However DB's size limit on matrix textures (because of 1 texture per matrix) is really very inhibiting and makes this inplausable. Especially if you wish to have some 'blend' tiles.

Therefor upgrading to DBP isn't going to solve these issues, whilst it does allow for a slightly larger matrice and certainly the 3D engine is much faster - it still wont be sufficient to create the world.

Using techniques like my Terrascape engine however will get around the problem, and give you the ability to make a world any size you like, with as much detail as you like, but like I said earlier, any idiot can make a big game world, it takes a skilled programmer to fill it with content.

Pneumatic Dryll
jimbo1913
22
Years of Service
User Offline
Joined: 19th Apr 2003
Location: - Please Select -
Posted: 7th Jun 2003 20:20
Id like to see that demo but 29meg? I only got a dial-up!

Reading between the lines (and Im probaby way off) it sounds to me like your scrolling a much smaller matrix and just updating the new height data at the newly visible edges. Thats what im coding right now.

from future review of next game....
'..while the programmer of this game may not be God-like he certainly represents the next step in human evolution. (10/10).'

Login to post a reply

Server time is: 2025-05-19 04:06:37
Your offset time is: 2025-05-19 04:06:37