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 / Help with a matrix

Author
Message
MrC
20
Years of Service
User Offline
Joined: 6th Mar 2004
Location: Somewhere in Canada
Posted: 22nd Mar 2004 02:45
Hello out there,

I've had DarkBASIC Classic V1.08 for over a year now, and I've worked with it on and off. Lately I have started on a game project, using DarkEdit. It's a top scrolling shooter game, in which you control a spaceship by yawing it. I have put the spaceship's model into the program, and I have a matrix under the ship. Overall the program works well.

But I'm having a problem with the matrix in the game. I originally had this code to create the matrix:


The program loaded up fine with this matrix code. When I increase the size of the matrix to 10,000 X-world units and 10,000 Z-world units, and have 70 divisions on both the X and Z-axis, the program still works fine.

But when I try to increase the number of matrix divisions to 71, I get an error that says, "Runtime error at line 83. Matrix does not exist at line 83." (I wanted to increase the matrix divisions to make the texture on the matrix look clearer.)
My matrix code looks like this when I get this error:


.... and this is line 83, the line that the error describes:



What's the problem here? Is there a set limit on how many divisions I can have in a matrix, or is there another reason for this problem? And why does it say that the matrix doesn't exist at line 83, even though all I've done is increase the number of divisions?

Thanks in advance. Bye for now, and happy coding!

Cheers,
Mr.C
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 22nd Mar 2004 19:13
My guess is that the error happens because the matrix failed to be created, so when you try to use it, it bombs. I don't play with matric creation that much, but why do you need a 10,000x10,000 matrix? Thats 100,000,000 cells.
--
TAZ

medwayman
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: uk
Posted: 22nd Mar 2004 20:31
I think 70 is the maximum size for a matrix in dbc. you can go larger in Pro.


Quigs - Coming soonish
Spintris - Working on gfx
MrC
20
Years of Service
User Offline
Joined: 6th Mar 2004
Location: Somewhere in Canada
Posted: 29th Mar 2004 00:11
Hello,

@ zircher: The reason I wanted a matrix that big was to have a big playing field. But is there something that might that can make a big playing field that's better than a matrix? Can a sky sphere do this well?

@ Custard: Ah, that makes sense.

Thanks for the help, guys.

Ta-ta!
Kentaree
21
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Clonmel, Ireland
Posted: 29th Mar 2004 00:22
A skysphere is just a large sphere which is turned inside out to face the texture inwards. It doesnt have to be too big, as long as you keep moving it along with the camera so you never actually reach the edges.

Its not a bug, its a feature!

Login to post a reply

Server time is: 2024-09-22 03:04:37
Your offset time is: 2024-09-22 03:04:37