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 Classic Chat / AGK plugins

Author
Message
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 20th Sep 2019 21:39 Edited at: 20th Sep 2019 22:05
I understand that AppGameKit supports c++ dlls as plugins
but what if these plugin utilize some of the abilities
of agk, ie a agk tier2 program bundled up as a DLL
so as its functions could be used in tier 1.

I see this should work but has anybody tried this ?

It should work for string handling but what if you have a
DLL function call that returns an objectID or one that you pass
an objectID to your DLL it seems there would be various
issues
fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 20th Sep 2019 23:40 Edited at: 21st Sep 2019 00:04
Writing plugins is fairly easy and you can use all of the teir 1 functions in the C++ dll code if you want to do so. So you can manipulate images, sprites and objects.

https://www.appgamekit.com/documentation/guides/14_plugins.htm

If you have a large amount of processor intensive calculations to do quickly then you can get a large speed increase by moving a function into C++ code. You can also do other things like get serial port access, add extra functionality or load image file formats not currently supported into AppGameKit teir. Loading DDS is then possible, as is loading from proprietary formats allowing for file ofuscation. I've added loads of functions over a few different projects...like controlling DMX lights, making windows shutdown from agk teir 1 code or loading directly from zip files. It means you can add some really useful functions but you have to cross compile if you want to use your additional functions in anything other than windows and you cant add these functions to teir 1 android. (linux,windows,mac only)

There are no major issues that I have had. Object ID's are just integer values. You can get image pointers and pointers to sprites so you can very quickly edit image data or sprites etc... With some additional work you can edit objects too if you use the teir 2 cObject files to get access to them. the question is really, what do you want to do?

I have used MS Visual studio and Codeblocks to write plugins and they both work well and create useable dll's in AGK
fubarpk
Retired Moderator
19
Years of Service
User Offline
Joined: 11th Jan 2005
Playing: AGK is my friend
Posted: 21st Sep 2019 02:52
Thanks Bengismo you confirmed what I expected but last time I tried setting up tier2 in vis studio
I found it wouldn't create a new agk project and I had to keep modifying the original template
to get it to compile. But I have used C++ before and I do like some of the speed benefits you can get
over any basic hybrid language which I refer AppGameKit as. I just am contemplating if I want to go down the path
of trying to set up vis studio again with AppGameKit tier 2. Any frame increases are always welcomed and
any processing times cut down would be gratefully received

I just need to find a document that explains the setup for tier 2 again the last one seemed missing bits

In the past I know I got quite good speed improvements going from DBPRO to DARKGDK so a dll library for
AGK could be very handy for tier 1, with the added benefits of speed, could also help with program readability
for simple programs that just want to use perhaps some of the added commands added to the library.

fubarpk
fubarpk on Itch...………...https://fubarpk.itch.io/
fubarpk on googleplay..https://play.google.com/store/apps/developer?id=fubarpk
Bengismo
6
Years of Service
User Offline
Joined: 20th Nov 2017
Location: Yorkshire, England
Posted: 21st Sep 2019 09:05
Just to be clear... teir 1 c++ plugins are very different from a full Teir 2 app.

A teir1 plugin requires only a little setup and is still very powerful but allows you to use c++ functions from teir 1 code. Its an easy way of adding bits of c++ code than can be called from teir 1 projects. I just wish there was an easy way to add c++ android code in teir 1 as there isnt currently.

Witing a full teir 2 app requires a lot more setup and is fairly complex. All debugging is done in visual studio but with that solution you do get the most speed. Both have their merits.
Xaby
FPSC Reloaded TGC Backer
17
Years of Service
User Offline
Joined: 17th Apr 2007
Location: Berlin
Posted: 24th Sep 2019 06:37
@fubarpk

in the underground, we try to get some Tier 2 code to understand some of the newest texture compression. A lot of C++ to understand. I hope, it will make its way later in the Tier 1 Basic.
The PlugIn idea for me has the problem with cross-platform.

My targets are Windows, OUYA (Android) and Raspberry Pi. If I would only limit it to Windows, I didn't need AppGameKit in the first place, I guess.

Login to post a reply

Server time is: 2024-04-26 14:47:12
Your offset time is: 2024-04-26 14:47:12