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.

AppGameKit Studio Chat / DLL Question

Author
Message
MateiSoft
11
Years of Service
User Offline
Joined: 22nd Oct 2012
Location:
Posted: 20th Sep 2020 11:52
Hi guys,

Is it possible when creating DLLs for AppGameKit, to create stuff like CSG or even having a custom technology programmed in C++ and port it to AppGameKit through the DLL system?

Thank you!

PS: By exporting functions as commands, i think it is possible?
www.alexmatei.com
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 25th Sep 2020 16:29
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 26th Sep 2020 12:42
Plug-ins do have some limitations in regards to interacting with the AppGameKit Engine itself., as a lot of things aren't exposed.
Some things you can work around by using the Tier 2 SDK... but it is needlessly complicated and there are still some HARD limitations on what you can access.

For example a while back I tried to enable support for DDS, CubeMapping and Pre-Calculated MipMaps (aka Array Textures).
Unfortunately even with the cImage (which is custom to AppGameKit, and not the Windows cImage Structure for Bitmaps nor is it using the OpenGL glTex or VkImage Structures), it just ended up being not possible.
The issue was that while these things are supported by said Structure, they're handled entirely internally to the AppGameKit Engine; so even populating the correct data would result in it being overwritten., or in some cases was a protected element.

Now this doesn't mean that supporting DDS isn't possible., I do actually have a working Format Importer... but I somewhat don't see the point in supporting it, if essentially all of the key features (1D/2D/Cube/Volume/MipMapping/Compression) can't be supported.

The same is true in regards to say supporting Array Input / Output., while it's possible, it will ONLY work on Desktop OS (Windows / Linux / Mac) by creating Unsafe Memory., which is bad programming as it becomes very easy to cause memory leaks.
It's also as a note will not pass Application Authentication processes (for say the Windows Store, or such).



Something like CSG isn't too difficult to implement however., but you will need to utilise Mesh Memblocks... so performance might not be great.
I'm not sure why, but Memblocks were massive step backwards in performance over Dark BASIC Professional.

Not when they're "In-Flight", but when you're Creating / Destroying them... they have exceptionally high overhead.
As does converting that data into something the Engine can actually use (i.e. Back-and-Forth from a Mesh)

So, always keep that in mind and test regularly to avoid things that might cause undue performance hits.
But then also keep in mind that AppGameKit BASIC itself is quite slow as well (I created a thread a while back showcasing this)., so that's something else you tend to also need to factor into Plug-in Development.

I'd also HIGHLY recommend learning how to write threaded libraries. AppGameKit essentially doesn't take advantage of Modern Processors., and you can see some BIG performance gains by Asynchronously Threading; so whatever you're doing in your DLL can run concurrently.

Login to post a reply

Server time is: 2024-04-20 11:48:27
Your offset time is: 2024-04-20 11:48:27