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.

Program Announcements / Interrupt-driven Matrix Texturing now availiable.

Author
Message
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 24th Dec 2003 21:41
This'll be my last new plug-in for the year - want to start designing my new game soon... Anyway, this plug-is a lot more complicated than these previous versions as there can be more than 1 tile in a matrix.

The maximum number of matricies allowed is 8, and up to 65535 tiles in each of these.

In order to pass all the tile information, you need to allocate memory and fill this information with the following structure, which is 20 bytes in size :

+0 - Tile X Number
+4 - Tile Y Number
+8 - Tile Start Image Number
+12 - Tile End Image Number
+16-+19 - Timer

And then call the MatrixIRQSetup command with the address of this memory location, and the number of tiles, and the initial setup will be completed. Then its just a matter of starting the IRQ with the MatrixStartPause command.

There is one problem with this plug-in at the moment - the constant use of Update Matrix() has an adverse effect on your program, by slowing everything down. I think I can fix this in the future by making sure the update is only done when all tiles for a matrix have been updated. Therefore the maximum number tiles per matrix may be modified to a power of 2 later on (either increased or decreased).

Example code :




The place for all great plug-ins
D Man
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: Germany
Posted: 24th Dec 2003 21:44
I'm sure I can make use of this.
Thank you!

God is real, unless declared integer.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 24th Dec 2003 21:48
You will need my memory plug-in to compile the example, by the way.


The place for all great plug-ins
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 24th Dec 2003 23:04 Edited at: 24th Dec 2003 23:18
I've updated the plug-in so that the matrix is only updated when all tiles have been updated at least once. You may spot the occasional animation skip, unfortunately the only way to stop this is to have all tiles have the same animation time. It shouldn't be noticable, but if you dont like it, then I'll have to go with the aforementioned fix.

It would only really be noticable (if at all) at very high interrupt rates.

You lose around 7fps instead of half - again, a loss of half of this could be done by having the same interrupt time for all tiles.

The main advantage for having all tiles having the same interrupt time is (aside from gaining some extra FPS), is that it makes the actual interrupt routine much simplier.


The place for all great plug-ins
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Dec 2003 13:18
I get an error with this line:

if returnkey()=1 then matrixStopAll
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Dec 2003 13:24
i get an error "MatrixIRQSetup does not match matrix".

also, you didn't mention you need to d/l the irq dll too.
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 25th Dec 2003 14:10 Edited at: 25th Dec 2003 14:24
You dont need the IRQDLL one. You just need the Matrix plug-in. Try downloading it again. One other thing I did forget to mention is that you need P5.2

You do need to create the matrix before using this command too.


The place for all great plug-ins

Login to post a reply

Server time is: 2024-04-19 20:00:07
Your offset time is: 2024-04-19 20:00:07