The Game Creators
The Game Creators Home Click to Login
  Hot: September NewsletterAGK V2 Alpha 7.1AGK V108.xx
The Game Creators
DLL Talk / The Matrix1Utils plugins collection

Go to the first page of this board Return to the Forum Menu Post Message
1,531 Messages - Page   of 39   
Bookmark and Share Search the Forum Next 40

Author Message
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 29th Jul 2006 22:30     Edited: 27th May 2012 12:41     | link | toggle

Newest release 27/05/2012


We're now up to 33 plug-ins in this pack - latest release info can be found HERE (Release 20120527).
Download links can be found at the bottom of this post.

In addition, I've uploaded the help files to my website, so you can browse through all of the commands, so you can see what you'll be getting without having to install the whole thing first. Just click here to see them.

01 - Memory Banks - memblocks, with a few new options added
02 - Basic Timing - Metronome type ticking, and hiresolution timing.
03 - Mutexes - system level synchronisation between processes (primarily for use with shared-memory banks)
04 - Raw Memory & String Allocation - low level stuff only of use to masochists
05 - Find Free ... - locate free images, objects ... everything really
06 - Error message control - Take a little control over DBPro error messages, or even trigger your own (with a line number!)
07 - General functions - min/max, plus a few numeric functions that are missing from DBPro
08 - Random numbers - Many different random number generators.
09 - Functions and commands that should have been in DBPro from the start.
10 - Logging - Output logging info from your app, in nicely formatted html or rtf if you want to.
11 - Console window, with colours
12 - Limb information and updates
13 - Desktop & window info + manipulation
14 - Adhoc 'doesn't fit anywhere else' commands
15 - Extra WAIT commands - including system-friendly versions that use no system time
16 - Strings - A comprehensive set of string functions.
17 - 64 bit bitset manipulation - DBPro binary functions don't work with double integers, these functions do
18 - Create custom objects from nothing and get information about the state of objects.
19 - List and group objects
20 - Function pointers
21 - Zone commands, transferred & updated from the original utility plug-in.
22 - File I/O
23 - Colour conversion
24 - System Folders
25 - Windows shortcut files
26 - Syncs and callbacks
27 - Hashing (and encryption in the future)
28 - Networking for IP and UDP (tutorial zip file)
29 - Arrays - Information from arrays, plus sorting, clearing etc.
30 - Basic 2D Commands
31 - String lookup tables (with load/save of ini files).
32 - Vector & Matrix maths - Some commands and functions to make using the 3d maths commands a little easier.
33 - Redirect drawing operations to images


The release is a zip file for easy installation - just let winzip extract it to your DBPro installation folder and it'll all go into the right place.

DBPro 7.1 download and later : http://forumfiles.thegamecreators.com/download/2355306
DBPro 7.0 download and prior : http://forumfiles.thegamecreators.com/download/1599357 (No longer updated)

If the DLLs fail to load, then you may need the files in the following download:
VC++ redistributables : http://forumfiles.thegamecreators.com/?i=959271

- For 32 bit systems, place the contents in c:\Windows\System32
- For 64 bit systems, place the contents in c:\Windows\SysWOW64
- Alternatively, if you are uncomfortable placing these files in those folders, or if you don't have the correct permissions to do so, place the files in the same directory as your executable.


If you have any of the original Matrix1Utility, Matrix1Array or Matrix1Extend1 plug-ins, then you'll need to delete the DLL's and the INI files for them before starting up DBPro.

Please also note: I have not ported any of this code to GDK, and these plug-ins will not work with GDK whatsoever

Warranty: None, for any purpose whatsoever.
Conditions of use: None.
Royalties required: None.

Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 29th Jul 2006 22:55           | link | toggle

Memory banks - expanded memblocks.

For any kind of manipulation of data, you'll soon start to wonder how you did without them. In addition to the standard ability to write different basic data types to the banks, you can also:

- write double integers, double floats and strings too
- copy blocks of data between banks or even memblocks
- share memory between different programs
- map a file into memory (effectively load a file into a bank, but any changes you make are reflected in the file).

A long while ago, I wrote a function that would allow you to write a DBPro bitmap to a bmp file using standard file functions. I've written a small program that uses that function, but also does the same thing using a mapped file - run it yourself to see the speed increase:

+ Code Snippet

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 29th Jul 2006 23:01           | link | toggle

Timing - simple tickers

There's not much in this plugin really. There's the standard hi-resolution timer that was a part of the original utility plugin, and that works in the same way, and now there is also a regular ticking timer that ticks as often as you tell it.

Here's a simple example with two tickers - one is used to drive the flashing cursor, and the other is driving the tenth-of-a-second timer

+ Code Snippet

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 29th Jul 2006 23:12           | link | toggle

Error messages

There's not much to say here really (despite this being a real ... hard nut to crack) - error messages, with line numbers. You can trigger your own messages, change the title on DBPro error messages, even trigger messages under certain conditions. Here are a few examples.

As basic as it gets:
+ Code Snippet

How about this:
+ Code Snippet
Error 502 is 'image does not exist' - the numbers can be found in C:\Program Files\Dark Basic Software\Dark Basic Professional\Compiler\lang\english\Errors.txt in the RUNTIME section

Setting a 'reasonable' title for a DBPro error:
+ Code Snippet
Ok, so we may differ in our opinion of 'reasonable'

Finally, error under certain circumstances - in the C world this is called an assertion, in which the error does not occur if the condition is true.
+ Code Snippet

I'll post a few more things tomorrow

For free Plug-ins and source code http://www.matrix1.demon.co.uk
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 30th Jul 2006 15:01           | link | toggle

Here's a full program that I wrote to automatically generate the help and keyword files for all of these plugins, and to demonstrate their use. It mostly uses the banks and string plugins and features:

- Correctly splitting up the command line arguments when dropping files onto the exe
- Reading/writing whole files in a single set of operations
- Reading resource strings from a DLL (used to get all of the commands for the keyword files)
- Complex and fast string manipulation

There are also some little 'bonus' routines in there for dealing with filenames and directories.

Back to top
Download: helpgen.zip Size: 119854 bytesReport this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 30th Jul 2006 15:08           | link | toggle

Here's another one for banks ... they really are my favourite!

In last months newsletter, Rich included a section on the Winch's site that includes details of the makeup of a DBPro executable or .PCK file. I decided that would be a good test of banks, so I wrote the following program that will decipher the exe/pck, list all of the files included within it, and will then explode it out into the separate files.

There's no reverse process ATM, but that may come in the future.

Back to top
Download: explodeexe.zip Size: 2860 bytesReport this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 30th Jul 2006 15:57           | link | toggle

The logging plugin might look a little inpenetrable at first sight, so here's a small example program that writes out a html format log file.

You can also see the parameter substitution it provides when it's writing log file types 3 and 4.

+ Code Snippet

Back to top
Report this message as abusive
Bmad6

User


Joined: Thu Aug 25th 2005
Location: Virginia, United States
Posted: 2nd Aug 2006 07:24           | link | toggle

Only one suggestion - in part 13, the get display width() command (and others, I assume) interfere with the same command from the DBPro Enhancements Pack. Maybe add a prefix or something?

Other than that, though, this looks awesome!

Programming is the art that fights back.
Back to top
Send AIM user a message
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 2nd Aug 2006 09:06           | link | toggle

Thanks for pointing that out - I'll change the command and repost it later today

Back to top
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Gods own County, UK
Posted: 2nd Aug 2006 10:39           | link | toggle

Nice little package I'll be replacing my own debug function with your logging, much neater.

The GET DISPLAY WIDTH() is a throwback to the last version. I ventured into the world of string tables for the first tme to edit this last time.



Back to top
Report this message as abusive
spooky

User


Joined: Fri Aug 30th 2002
Location: United Kingdom
Posted: 2nd Aug 2006 11:31           | link | toggle

Am I right in saying your new ABS command completely takes precedence over existing ABS command. Surprised not to see some sort of duplicate command error that I've seen in the past.

Anyway your ABS command is SO much faster than built in ABS command which is renowned for being so slow so I'm happy.

Too busy to try rest of commands, must get back to work.

Boo!
Back to top
Report this message as abusive
Lost in Thought

User


Joined: Wed Feb 4th 2004
Location: U.S.A. : Douglas, Georgia
Posted: 2nd Aug 2006 12:46           | link | toggle

His string commands are wicked fast on slower machines. Been waiting for this for a bit

Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 2nd Aug 2006 14:07           | link | toggle

@Spooky,
Lee provided a ABS command for floating point values - that's why it's slow with integers as it has to convert integer to float, then float back to integer for the result. I've just provided an integer-specific version. It's OK to provide overloaded versions of existing commands and functions in plugins as long as their signatures are different.

@Bmad6 & Batvink,
I'll probably just drop the 'GET' at the start of the name to remove the clash.

Back to top
Report this message as abusive
sneaky smith12

User


Joined: Sun Apr 30th 2006
Location: Like id tell you, oh wait i just did
Posted: 2nd Aug 2006 17:37           | link | toggle

hmmm... when i run the program i always get a
+ Code Snippet
Then it lists several locations one including autodesk which doesnt make sense, because I don't have any autodesk products.

If at first you dont succeed, LOWER YOUR STANDARDS.
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 2nd Aug 2006 18:11           | link | toggle

Ah, the old 'runtime library' problem huh?

Here they are for use with the plugins - Just drop them into \Windows\System32 - If you already have these files installed in your machine, do not allow them to overwrite existing ones.

@Everyone else,
I've replaced the zip in the first post with the modified '13' DLL - I've simply removed 'GET' from the start of all of the functions. Just follow the install instructions again and allow the new files to overwrite existing files.

Back to top
Download: redist71.zip Size: 312668 bytesReport this message as abusive
John Y

Synergy Editor Developer


Joined: Wed Sep 4th 2002
Location: West Midlands, UK
Posted: 2nd Aug 2006 20:33           | link | toggle

This is a really cool collection of commands. Thanks!

Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 2nd Aug 2006 22:32           | link | toggle

Thank you.

Here's a simple example of using the bitset commands.

The code that a lot of people use to detect a mouseclick is usually a little ... clunky (using bit manipulation) ... or even plain wrong (using straight comparison).

Instead, you can just treat the value of MOUSECLICK as a bitset, and interrogate the values by key number:
+ Code Snippet

There are other uses too. For instance, in a piece of code that I'm performance testing right now, I can enable and disable various bits of code depending on which bits are set, and I can do it even when the code is running.

Here's a little taster of how that works:
+ Code Snippet

Yes, it could also be done using indivually named global variables, or using an appropriately sized array too.

This way uses less storage which can be useful when writing to a file, or storing in a memblock or memory bank. A single bitset is also easier to pass around your program, seeing as it is basically just a standard variable.

Back to top
Report this message as abusive
Bmad6

User


Joined: Thu Aug 25th 2005
Location: Virginia, United States
Posted: 2nd Aug 2006 22:51           | link | toggle

or:

+ Code Snippet

Programming is the art that fights back.
Back to top
Send AIM user a message
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 2nd Aug 2006 23:11     Edited: 3rd Aug 2006 00:31     | link | toggle

I know - I posted that code only a week or so ago, and a lot of the less learned coders on the forums wouldn't even know why it works.
Besides, it's quicker this way

+ Code Snippet

[edit]Quick update to the plugin 17 - It wasn't handling the full 64 bit range correctly - now it is.

Back to top
Report this message as abusive
Grismald

User


Joined: Tue Mar 4th 2003
Location: France
Posted: 26th Aug 2006 12:40           | link | toggle

Just wanted to say thanks for these great dlls.
I am making a snippet to write text files using memory banks mainly to see if i can get some speed improvements over using standard file functions; it's not fully working yet, but here's a link anyway:
http://forum.thegamecreators.com/?m=forum_view&t=86495&b=6
(see 2nd post)

Back to top
Report this message as abusive
Google Ad
Back to top
 
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 26th Aug 2006 21:02           | link | toggle

Thanks. I've made a post in your thread that may help you get the speed increase you are after.

Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 7th Oct 2006 01:45           | link | toggle

Here is a new update, including one semi-experimental new plugin that allows DBO objects to be loaded from a memory bank.

Matrix1Util_01 1.0.0.2
Added 3 SEARCH BANK functions to allow string searches within banks.
Added 2 ZERO BANK commands to clear banks or areas of banks.

Matrix1Util_07 1.0.0.2
Added GCD functions (greatest common denominator)
Added integer and double version of the clamp and wrap functions

Matrix1Util_12 1.0.0.1
Initial public release (GET LIMB BY NAME, GET LIMB COUNT, GET LIMB FVF)
Added SET LIMB NAME command
Added GET LIMB PARENT/CHILD/SIBLING functions

Matrix1Util_13 1.0.0.2
Added HAS FOCUS function and GRAB FOCUS command.

Matrix1Util_16 1.0.0.2
Faster string-length function for a general speedup throughout.
Fix bug for positional checking in the GET SPLIT WORD function.

Matrix1Util_17 1.0.0.2
Faster bit count routine.

Matrix1Util_18 1.0.0.1
New plugin that allows objects to be created from memory banks.
They need to be .dbo format.

Back to top
Download: matrix1util 20061007.zip Size: 208928 bytesReport this message as abusive
Olby

User


Joined: Thu Aug 21st 2003
Location: Cyberspace
Posted: 10th Oct 2006 23:55     Edited: 10th Oct 2006 23:58     | link | toggle

Ian you rock this place mate!

"Error at line 0 - Your game sucks. Try again loser..." (Cash Curtis II)
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 14th Oct 2006 12:40           | link | toggle

Thanks.
Have a 'fix' release.


Matrix1Util_13 1.0.0.2
Corrected help files - added 'GET' to all infomation functions

Matrix1Util_18 1.0.0.2
Corrected 'offset' version of the MAKE OBJECT FROM BANK command
Removed need for the fourth argument too as DBO knows how far it can go

Plugin 18 is no longer experimental - it works just fine every time.

Back to top
Download: matrix1util 20061014.zip Size: 209144 bytesReport this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 14th Oct 2006 12:45           | link | toggle

Here's an example of multiple DBO objects being loaded from a bank. It uses the new bank functions to search for DBO objects and loads them.

It's a little involved, but bear with it.

+ Code Snippet

Back to top
Report this message as abusive
cjb2006

User


Joined: Sat May 20th 2006
Location: Cyberspace
Posted: 14th Oct 2006 16:30           | link | toggle

IanM, I am in awe. Great work. In my current project I'm working with x-files. I understand they are slower but it's easier for this human to parse a .x text file. Is it possible for you to add a "make object from bank" command for a text .x file to the collection? A kind of "Load mesh"=>"Make object" command from a virtual file (bank). I know I sure could use it but if I'm the only one, then it's no biggy. Thanks for all you've done already.
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 20th Oct 2006 21:56           | link | toggle

I've been looking into it since you posted, and there doesn't seem to be an easy way ATM. I won't give up on it though - I'm sure that it can be done.

In the meantime, you can use DBPro to load your x models and save them back out as a dbo file if you want to take advantage of the new command.

When I do figure out the loading of x files from a bank, the same code will be able to load the data without you needing to give it any clues beyond the start position.

Back to top
Report this message as abusive
cjb2006

User


Joined: Sat May 20th 2006
Location: Cyberspace
Posted: 21st Oct 2006 16:13           | link | toggle

Hey, thanks for looking into it. I'm basically working on a custom model editor - adding / deleting verts, flipping edges etc. on the fly. I can keep track of that stuff fairly easily in a .x text file. I can use a bank to write the file but it would be nice to not have to re-read it for each model update (since it's already in a bank). Keep up the good work, and thanks again.
Back to top
Report this message as abusive
ThomasFN

User


Joined: Thu Aug 26th 2004
Location: Cyberspace
Posted: 27th Oct 2006 20:45           | link | toggle

any advanced matrix functions about? (ie colour individual verticies on a mtx, apply a texture to the whole matrix rather than just a tile, detail texture blending, tile border blending)

Back to top
Report this message as abusive
Olby

User


Joined: Thu Aug 21st 2003
Location: Cyberspace
Posted: 29th Oct 2006 02:34     Edited: 29th Oct 2006 02:36     | link | toggle

@IanM - I have probably found an error (what else I can do?), when I call find free memblock() some times I get the memblock id is out of range. So I guess your limits are incorrect. It only happens occasionally because I use random free memblock finding. I tried to lower the value to find free memblock(1,100) then everything worked fine. I dont know but maybe the maximum memblock count is 128?

[Edit]
Did I already told you that these are very good and fast plugins! And Im currently building my FPS engine around these.

AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2
http://www.myspace.com/producerolby
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 29th Oct 2006 13:17           | link | toggle

@ThomasFN,

I don't think that kind of functionality is available for matrix's - you might need to use standard objects & limbs for all of that. You can search in the Code Snippets forum, or in the code base for example code.

I may add something like this in the future.

@Olby,

I can't find any error with the FIND FREE MEMBLOCK code. Are you remembering to check for a returned value of 0? If you do get 0, then you've already used up all of your memblocks.

If you have any example code that exhibits this problem, then just post it here or email it, and I'll take a look.

Back to top
Report this message as abusive
ThomasFN

User


Joined: Thu Aug 26th 2004
Location: Cyberspace
Posted: 29th Oct 2006 14:24           | link | toggle

Thanks for your help, IanM. I may use an advanced terrain and used vertex data and limb stuff to do what i want.

Back to top
Report this message as abusive
Diggsey

Valued Member


Joined: Mon Apr 24th 2006
Location: On this web page.
Posted: 1st Nov 2006 10:51           | link | toggle

Cool, I needed that parent limb function

Back to top
Report this message as abusive
Scraggle

User


Joined: Thu Jul 10th 2003
Location: Leeds UK
Posted: 2nd Nov 2006 13:28     Edited: 2nd Nov 2006 13:31     | link | toggle

Some very handy commands here Ian

I have been trying a few but have come across one that doesn't work 'as advertised'.

+ Code Snippet

That code brings up this error:
Cannot perform 'integer' cast on type 'TEMP2' at line 10.

Is there any chance you could have a look at this? It would be very handy.

Thanks

[edit] Same problem with REMOVE ALL$

Back to top
Report this message as abusive
Bmad6

User


Joined: Thu Aug 25th 2005
Location: Virginia, United States
Posted: 2nd Nov 2006 14:01           | link | toggle

Scraggle, I'm surprised you didn't catch this error!

That error message means that it's trying to store String data in an Integer variable. either replace tS w/ t$ or put tS as integer above this code. (I assume you meant to do the former from the start.)

Corrected code:

+ Code Snippet

And I ran it, to check.

Windows XP Home Edition SP2, Intel Celeron 1.4 GHz Processor, 768 MB of RAM, 1024x768 Srceen Resolution, NVidia 256MB FX5200 GPU
Back to top
Send AIM user a message
Report this message as abusive
Scraggle

User


Joined: Thu Jul 10th 2003
Location: Leeds UK
Posted: 2nd Nov 2006 14:16     Edited: 2nd Nov 2006 14:17     | link | toggle

Now I feel stupid!

Sorry Ian for assuming it was a problem with your plugin-in and thanks to Bmad for pointing out my stupidity

... and yes, I did mean to do the former from the start.

Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 2nd Nov 2006 14:39           | link | toggle

No problem - I generally spend quite a bit of time on testing these before I release to avoid being embarrassed later, so I was surprised to see your post. So far, only 2 bugs found in these plug-ins, and one of those I found myself

Thanks to Bmad6 for finding the problem.

Back to top
Report this message as abusive
Olby

User


Joined: Thu Aug 21st 2003
Location: Cyberspace
Posted: 19th Nov 2006 16:00           | link | toggle

I found another bug with split string$.

Check this...
+ Code Snippet

It splits string not using all delimeter string " -" but uses just first which is just a space.

Even if this is not a bug adding this functionality for more than one char in delimeter string would be awesome.

AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c, DBP 6.2
http://www.myspace.com/producerolby
Back to top
Report this message as abusive
IanM

Moderator


Joined: Wed Sep 11th 2002
Location: In my moon base
Posted: 19th Nov 2006 17:52           | link | toggle

Sorry, but that's not a bug - the second string is used as a list of single character delimiters. If you want to search for string delimiters, then a simple way to do that would be to REPLACE ALL of your delimiters with a single character, then SPLIT STRING using that character.

Also, if you check out the HelpGen code in one of my earlier posts, you'll find that it contains a source file 'CommandLine.dba' which takes the command line and splits it correctly.

Back to top
Report this message as abusive
FERSIS

User


Joined: Wed May 17th 2006
Location: Cyberspace
Posted: 20th Nov 2006 14:22           | link | toggle

just wanna say that im using your plugin for the timer functions . its fast , thanks man
Back to top
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
1,531 Messages - Page   of 39   
Search the Forum Next 40

This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Privacy Policy AUP Top of Page