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 / Matrix with a "hole" in the middle?

Author
Message
Zinc Avenger
22
Years of Service
User Offline
Joined: 29th Jan 2003
Location:
Posted: 20th Apr 2003 14:58
Anyone know if it is possible to add a "hole" into a Matrix object? So that at the point where the "hole" is supposed to be it is transparent and does not affect collision? And furthermore to be able to add and remove these "holes" on demand?

In my normal over-complicated fashion I have considered making up a Matrix-like object by "stitching together" loads of Plain objects but this sounds like it will be a monumental ass-pain and I would like to see if anyone else has a better idea before I go haring off down this particular route!
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 20th Apr 2003 15:32
Well you could make that particular area have a black hole in it's texture, and set the matrix transparency flag so it reads black as transparent.

Now when you do your walk on matrix checking, exclude the area around those tiles

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
John H
Retired Moderator
22
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 20th Apr 2003 16:00
Well you could make a HOLE function like

Function Hole(m#,x#,z#,y#)

Where m# is the matrix number, x and z are the coords on the matrix where you want the hole to be, and Y is the depth of the deepest point.

Then, you could write a formula so that however deep a point is it makes the slopes a certain slope so the hole isnt just one point lowered.

Then, you can write a formula to texture all those matrix tiles after GET IMAGE to make a simple black square, then you can set it to make it black.

Cheers!

RPGamer

Current Project: Eternal Destiny
Tech Demo - Colan Island: Currently 716 Lines
Dave J
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 20th Apr 2003 16:32
Dan, you took the words right out of my mouth lol, although it may be a little complicated to modify a texture to remove and add these black spots all the time hehe.

"Computers are useless they can only give you answers."
Danmatsuma
22
Years of Service
User Offline
Joined: 2nd Mar 2003
Location: Australia
Posted: 20th Apr 2003 17:00
Not really, just calculate the position on the matrix where you want the hole and use 'set matrix tile' to put a premade texture. It gets a little more complicated if you want the hole bigger than one tile but not much...

if the matrix is 100x100 tiles and 1000x1000 units then it's something like:
set matrix tile matrix,abs(xpos#/10),abs(ypos#/10),holetile
etc...

ZX Spectrum 48k Issue 3, Radio shack Tape drive, Rank arena 12" T.V. set.
Dave J
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 21st Apr 2003 04:08
Guess that would work lol.

"Computers are useless they can only give you answers."

Login to post a reply

Server time is: 2025-05-16 12:10:47
Your offset time is: 2025-05-16 12:10:47