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.

DLL Talk / The Matrix1Utils plugins collection

Author
Message
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 29th Sep 2008 21:52
Would you consider including regular expressions functions in your plug in library as it can be quite useful for many features, especially for those developing text adventures or games that have an in-game console.

Just a thought, I know I would make use of it and its relatively general purpose

TheSturgeon(playing me at chess) : I will use my powers of the horse and pwnzor you.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Sep 2008 22:19
Strangely enough, I found a couple of RE libraries recently that weren't GPL/LGPL that I'm considering right now. I need to do some work first on each of them to get the smallest/fastest and then I need to decide how to wrap them.

Short answer: Yes.

Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 29th Sep 2008 23:19
Wheee! Fantastic

TheSturgeon(playing me at chess) : I will use my powers of the horse and pwnzor you.
GIDustin
15
Years of Service
User Offline
Joined: 30th May 2008
Location:
Posted: 3rd Oct 2008 07:21
IanM: Quick request if you could entertain me.

I have a game that could make great use of a .pak file or an encrypted zip/rar file. I have seen many that allow you to extract the files from an encrypted archive, and then use them, and I found one that allows you to load files from an encrypted rar file but does not allow you to update or add files to the archive. What I would like to see is a dll that opens one of these files and allows you to load data within them, and a way to update files within would be handy.

The main reason for my request is that my game has upwards of 2000 picture files used as sprites and an INI file for each explaining the rules behind the picture. With a single data file it would be MUCH easier to get a CRC and make sure the file hasn't been altered, as opposed to checking 2000 PNGs and 2000 INIs.

How feasible would something like this be?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Oct 2008 23:36
I've added it to my list - It'll be the third new plug-in in line at this point, so it's going to take a while for me to get to it.

In the meantime, all of the popular hashes are available in plug-in number 27 - It takes 3 commands to generate a hash from a file - MAP FILE TO BANK, HASH BANK MD5 (just picking one at random), DELETE BANK.

BlobVanDam
15
Years of Service
User Offline
Joined: 26th Jul 2008
Location: one of Cybertrons moons
Posted: 4th Oct 2008 12:05 Edited at: 4th Oct 2008 12:10
How have I managed to not see this plugin until now?
This has some awesome commands! Great work. All this time I thought that Matrix1Utils was only matrix stuff
So many things that could have saved me time and mess in the past

oops. What the heck is wrong now? Does the latest version of this plugin require the latest version of DBPro? I'm using 6.8, and now everything is completely f***ed up and won't compile at all. It's whining about variable names not being valid and case selects not working...........
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Oct 2008 12:18
Quote: "What the heck is wrong now?"

I had an intermittent problem myself with 6.8, which is why I went directly from 6.7 to 6.9 - all I can say is that these plug-ins only had a problem with 6.8 and that none of the files in the zip overwrite any existing files in a clean DBPro installation.

Apart from one plug-in (number 26 IIRC), everything should work fine on 6.7, but 6.9 is the release I'd suggest right now.

BlobVanDam
15
Years of Service
User Offline
Joined: 26th Jul 2008
Location: one of Cybertrons moons
Posted: 4th Oct 2008 12:24 Edited at: 4th Oct 2008 12:25
I didn't have it overwrite any of DB's files, so you're right there.
I just tried the latest beta of 7.0 and I get the same thing. Should I try 6.9 instead? I'm scared of 6.9, since it seems to be fairly unpopular.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Oct 2008 13:01 Edited at: 4th Oct 2008 13:21
The problems with 6.9 are mostly connected to using multiple cameras. If you don't use multiple cameras you shouldn't have any issues with it.

I think I'll try 7.0 out myself (been avoiding it so far) to see if it has problems. I don't want a major release out there that I can't support

[EDIT]Sorry, but 7.0 is working just fine here. I also see that Diggsey is using 7.0 from his bug reports, but he's not reporting bugs with these plug-ins.

I'd suggest repairing your DBPro installation and reinstalling the upgrade, because it sounds like the problem may be with the compiler.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Oct 2008 14:44
Um... No, I'm using 6.8 Where did you see that I was using 7?
It works fine with 6.8 though.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 4th Oct 2008 14:53
My mistake - I thought I remembered you raising a 7.0 bug report.

Anyway, I've run through the majority of my plug-in test snippets, and haven't had any problems show up, so it's looking more likely that it's BlobVanDam's install that's got the problem.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 4th Oct 2008 15:13
I suspect BlobVanDam was using some (newly) reserved words for his variable names

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
BlobVanDam
15
Years of Service
User Offline
Joined: 26th Jul 2008
Location: one of Cybertrons moons
Posted: 4th Oct 2008 21:09
Actually now you mention reserved words, I noticed it's highlighting the word "free" blue, so you're right! I use "free" a LOT in my program, but that's a memory command now. Looks like I'll have to change that tomorrow. Thanks for pointing me in the right direction, or I may have completely overlooked that. Staring me right in the face the whole time, it was!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2008 16:57
I have a 7.0 bug, but it's a tough one to isolate. I have tested again at 6.9, and it is OK there.

CAMERA FOV() returns zero on one of my machines, on the other it is fine.

The code to reproduce is simple -

Backdrop on : print camera FOV()

Backdrop on is only there to bring in the relevant DLL. Here are the details of the machine it fails on:



The OK machine is running XP SP2, but using an ATI X800 graphics card. Both are up to date with latest DirectX

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Oct 2008 17:22
My Bad. I had a slightly older version of your DLLs on one machine. It's now OK.

Pixel Paint
16
Years of Service
User Offline
Joined: 15th Sep 2007
Location:
Posted: 13th Oct 2008 02:20
How do you reverse hashes?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Oct 2008 14:57
You don't - they aren't compressed data or encrypted data - they are pretty much just hard-to-forge checksums.

Pixel Paint
16
Years of Service
User Offline
Joined: 15th Sep 2007
Location:
Posted: 14th Oct 2008 20:58
Okay. Thanks.
kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 25th Oct 2008 12:30
This doesnt work with DBPro 7.1 Beta 4 becuse lee has added 'Get Array type' and the compiler says that command is duplicated.

Games, Code, 3D Models and more! click here
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Oct 2008 12:41 Edited at: 25th Oct 2008 13:06
Aha! A volunteer tester!

It's broken because I asked Lee to break it ... not really. He's arranged things so that I can remove the need to get the coder to specify the array format - it does it (or should do it) automatically.

Try the attached DLL out and let me know if you have any problems with it.

[EDIT]
Forgot to include a list of the changes for this DLL:
- Field-offsets are now automatically generated at array creation time using the new DBPro core functionality.
- Removed commands SET ARRAY FORMAT, SET ARRAYPTR FORMAT and function GET ARRAY TYPE as they are no longer needed.
- GET ARRAYPTR TYPE, GET ARRAY FORMAT and GET ARRAYPTR FORMAT rewritten to use the DBPro core functionality.
- Updated sort routines that need to know whether the array is a single type or a UDT to look for array types that are 9 OR GREATER, not just equal to 9.

Attachments

Login to view attachments
Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 25th Oct 2008 14:22
What about a command to get a pointer to one of the elements in an array

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Oct 2008 14:43
What, like the function GET ARRAY ITEM PTR function?
That's been there since I wrote the original array plug-in.

You can also get the DLL to tell you the offset needed for each field within that array item, and the field type too - those have been there since I added fields in the April release.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 25th Oct 2008 14:50 Edited at: 25th Oct 2008 14:53
Didn't see the 'Pointers to arrays and array items' section

edit:
What about adding Paul's linear sort method

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
Pixel Paint
16
Years of Service
User Offline
Joined: 15th Sep 2007
Location:
Posted: 25th Oct 2008 16:03
I think I suggested this before... no one really said anything. Could you make a command to change a color in a bitmap to something else, like:

CHANGE BITMAP COLOR color1, color2, bitmapnumber

Thanks.
El Goorf
17
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 25th Oct 2008 16:32 Edited at: 25th Oct 2008 16:33
I have a new compile error since installing U7.1 beta 4. the code literally worked fine right before installing the patch.





http://notmybase.com
All my base are not belong to anyone.

Attachments

Login to view attachments
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Oct 2008 16:43
See my 10:41 post today - there's a 7.1b4-only version of the array plug-in attached there.

El Goorf
17
Years of Service
User Offline
Joined: 17th Sep 2006
Location: Uni: Manchester, Home: Dunstable
Posted: 25th Oct 2008 18:24
how did i not notice?

anyways, shouldnt you link to it in the first post?

http://notmybase.com
All my base are not belong to anyone.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Oct 2008 18:42
Nah, not until the 7.1 DBPro release is official and I've finished testing against that version. Until then, consider that plug-in as a beta patch.

Omen
17
Years of Service
User Offline
Joined: 7th Nov 2006
Location: Maple Grove, MN US
Posted: 25th Oct 2008 21:08
Ian,

Any chance we might see a regular expression match function in the matrixutils? Nothing fancy, just something like

REGEX MATCH("pattern","stringToMatch")

Thanks!

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 25th Oct 2008 21:28
It's already on the list - Mnemonix asked for it last month.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 26th Oct 2008 14:55
New DLL works Perfectly!

Games, Code, 3D Models and more! click here
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 26th Oct 2008 15:46
Good - let me know if you do hit any problems with it.

Quote: "What about adding Paul's linear sort method"

You mean the radix sort - I've thought about it, and I'll be looking into it. Remember though that if I implement it, it's got to work for all DBPro data types, and for multi-field arrays too:
- integer, dword, word, byte, double integer = easy
- strings = doable (variable length data)
- floats, double floats = harder but still doable

I'll have to write 4 different alternatives (the integer ones can be a single template) to do this.

All in all, a time consuming job for potentially no benefit - apparently, the constant costs for this means it can take longer to sort than quicksort and its derivatives over small amounts of data, and for the most part, we are talking about small amounts of data. I guess I'll have to write one of the versions as a trial.

Besides, does anyone actually use the alternative sorting methods already provided anyway?

Benjamin
21
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 27th Oct 2008 05:05 Edited at: 27th Oct 2008 05:06
[edit] Never mind.

KenW
15
Years of Service
User Offline
Joined: 27th Oct 2008
Location: UKNE
Posted: 27th Oct 2008 14:57
Hi IanM,
I have been using DBpro sporadically for some time, but have just come across your Matrix1 plugins. I have a need for a fast"fill",I have never tried a plugin previously so I expect I'm doing something wrong. I want to use the FILL in matrix Util30. wrote this snippet to test it with.:-
cls
ink rgb(255,0,0),0
circle 100,100,50
fill 105,105,rgb(0,0,255),0
suspend for key
end
I get no errors but it just draws the circle with no fill, I've tried different colours etc.
can you point me in the right direction please
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 27th Oct 2008 15:10
When I run that code, I get an all-blue screen, which is what I'd expect. It's checking for a border colour, which you've specified as a zero on the end of the fill command.

Either remove that parameter, which will use the background colour as a fill guide, or set the parameter to the same colour as your ink colour, which will use that colour as a stopping point.

Either:

or


KenW
15
Years of Service
User Offline
Joined: 27th Oct 2008
Location: UKNE
Posted: 27th Oct 2008 15:34

Thank you very much IanM, that's great,answered my simple query.Can I just say that I had to look long and hard through the threads to find out what to do with your plug-ins to get it working in DBpro, though I'm not getting the command appearing in the index, is it supposed to.?
Ken
Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 1st Nov 2008 07:16 Edited at: 1st Nov 2008 07:17
IanM,

You mentioned that you were interested in creating PureGDK framework libraries for your Matrix1Util plugins. Are you still interested in supporting this product?

Adding or updating new commands can be done easily in minutes and does not require knowledge of PureBasic programming.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 3rd Nov 2008 14:41
It's not very high on my priorities right now, mostly because I don't use PureBasic - I'm driven more by the stuff that I use myself. If there was a way to build this stuff automatically without installing a bunch of software I'm never going to use then I'd spend a little time on it and automate it.

In the meantime, apart from coping with the changes caused in the 7.1 beta release (self-inflicted I'm afraid), I'm looking into re-releasing the original C++ Interface library and supporting that (again automatically) - that's higher priority for me ATM because I use it almost every day.

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 3rd Nov 2008 18:01
PureGDK already offers tools to convert a string table into source code but you must manually compile from the IDE.

I can put together a program for you that will do everything in one click. The PureBasic compiler is portable so you could copy the one from the demo and use that in this library maker 'package'.

I'll get back to you on this.

RSJ
18
Years of Service
User Offline
Joined: 17th Dec 2005
Location: Japan
Posted: 7th Nov 2008 08:43
Hi.
I wish to rename trim$() in Matrix1Util_16.
Since it is in accord with the same name function of Styx, it cannot coexist with the partial function of Styx.
Thanks.
Coin
19
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Bexley, UK
Posted: 8th Nov 2008 00:04
IanM, is there any chance your APPEND$ function can be adapted to include concatenation of string variables as well as strings within quotes?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Nov 2008 00:21
No chance at all - primarily because that's not one of mine

@RSJ,
Sorry, but no - that function has been around 'forever', certainly longer than styx has. To change it now would break too much code.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 20th Nov 2008 00:27 Edited at: 20th Nov 2008 00:38
Hi IanM,

Just wanted to let you know I love Matrix1Utils!!!I use each and every one of the commands.

I was curious if a XML Parser Plugin may be in the works. I'm currently using the DBXML lib and I ran into a unfixable deletion bug for files > 15k that results in crashing. Unfortunately, the DBXML Dev has disappeared from the boards. The plug-in is limited to only loading external XML files, however, this does provides a bug workaround: load a gazillion XML files < 15k.

I was considering purchasing STYX just for the XML commands, but see too much conflict with the Matrix1Util String commands. I'm also weary on purchasing 3rd party libs from the TGC after Devs stop supporting BLUE GUI and no update on a TextureMax DDS File Bug I found on 5th Jun 2008.

I trust Matrix1Util and a XML Plugin would be a great addition.

Thanks for listening.

IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Nov 2008 14:29
I'll be very honest here - I'm not a fan of XML at all. I personally can't see much use for it beyond transferring information between different apps.

However, if you (or someone) can point out a lightweight XML library, I'll certainly have a go at wrapping it up for you.

TechLord
21
Years of Service
User Offline
Joined: 19th Dec 2002
Location: TheGameDevStore.com
Posted: 20th Nov 2008 16:06 Edited at: 21st Nov 2008 01:23
Quote: "I'll be very honest here - I'm not a fan of XML at all. I personally can't see much use for it beyond transferring information between different apps.

However, if you (or someone) can point out a lightweight XML library, I'll certainly have a go at wrapping it up for you."


Lightweight XML Lib --> http://xerces.apache.org/xerces-c/

In the beginning I wasn't a fan of XML either, however, I elected to use it based on my experience with HTML. I have found it to be versatile for handling any type of data stored in a hierarchical|Tree structure.

Diggsey
17
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Nov 2008 17:43
@IanM
I think it's very useful personally

For example, with visual studio, the solution and project files are in xml, so if you need to open a 2008 solution in 2005, it's very easy to manually convert it.

The same situation now applies to office 2007, so even if you are using an older version, you can still get any text out manually.

What I think would be good would be a special free compression tool for XML files, so you still get the ability to manually modify it, but you also get a very good storage ratio.

[b]Yuor signutare was aresed by a deslyxic mud...
BOX2D V2 HAS HELP FILES! AND A WIKI!
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Nov 2008 20:18
I find XML overly verbose, with overly complex rules, and that it is overly complex and slow to parse.

XML has it's place, but IMO it has far less places than most people think. If you need 'human readable' or if you need 'cross-application', and if you don't need speed, then XML is just fine, but I'd still rather work with simpler formats.

Anyhow, I'll take a look a xerces and see what's what.

kaedroho
16
Years of Service
User Offline
Joined: 21st Aug 2007
Location: Oxford,UK
Posted: 20th Nov 2008 21:07
XML is brilliant for storing mission data in. it is slow, but if you just use it in loading then speed wont matter.

Olby
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 21st Nov 2008 23:09
XML was done many times before, here is one specific version I found some time ago. Didn't use it too much but as far as I remember it worked just fine:

http://forum.thegamecreators.com/?m=forum_view&t=123023&b=18


ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, DirectX10, DBPro 7.1
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Nov 2008 00:16
That's the one that Techlord is using and having problems with.

Login to post a reply

Server time is: 2024-04-19 07:54:18
Your offset time is: 2024-04-19 07:54:18