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 / Why do DLLs made in PureBasic that work well in AppGameKit Classic not work in AppGameKit Studio?

Author
Message
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 10th Sep 2024 16:08
Hello everyone, how are you?
Currently, I’m creating DLLs to extend the functionality of AppGameKit using PureBasic, but they only work in AppGameKit Classic. Were there significant changes that made PureBasic DLLs incompatible with AppGameKit Studio?

SFSW
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 10th Sep 2024 16:12
One of the likely possibilities is the move to 64-bit. Can PureBasic compile DLL's in 64-bit? Any DLL's will need to be compiled in that bit format to work with the default configuration of Studio.
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 10th Sep 2024 18:39
SFSW wrote: "
One of the likely possibilities is the move to 64-bit. Can PureBasic compile DLL's in 64-bit? Any DLL's will need to be compiled in that bit format to work with the default configuration of Studio.
"


I just tested on both x86 and x64, and both give the same error... that it was not possible to load the plugin... I took the same plugin and placed it in the plugins folder of AppGameKit Classic, and it worked perfectly...
SFSW
22
Years of Service
User Offline
Joined: 9th Oct 2002
Location:
Posted: 10th Sep 2024 19:15
If the error relates to just loading, then it may just be a matter of placement and command content. Where are you placing all of the required files? In classic, it is:

\AGK2\Tier1\Compiler\Plugins\PluginName

For the 'commands.txt', 'windows.dll' (32-bit), and 'windows64.dll' (64-bit).

For Studio, it is:

\AppGameKit Studio\Plugins\PluginName

For those same files. So I'd suggest verifying all three files for every plugin is in the correctly named folder (foldername must match the plugin name exactly).

If the loading error relates to platform, make sure you have specified the correct Win64 string for every command in 'commands.txt' and that the 64-bit version of the DLL is exactly the same as the 32-bit (no mismatched decorations, AppGameKit pointer in place, etc). Otherwise, you could wind up with a situation where you're loading and running on 32-bit in classic and it works fine, but then trying to do the same in Studio in 64-bit doesn't.
Username Goes Here
User Deleted
Posted: 13th Sep 2024 11:41
If it is for a personal project, this is ok. If you plan to redistribute it to be used with other languages then I think Purebasic does not allow this. Please check its license again.
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 26th Sep 2024 03:48
no no, I will not share it for use with other languages, all dlls are for use in my own software.
PartTimeCoder
AGK Tool Maker
10
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 9th Nov 2024 10:56
Quote: "If you plan to redistribute it to be used with other languages then I think Purebasic does not allow this. Please check its license again."


I had a discussion with Fred about this some time ago, You can not just wrap native PB functions on a one for one basis but if you use external library's or the PB implementation of Win32 API then you are good to go for a public release, its just the proprietary stuff that you can not wrap, this is not to say you can not use PB functions in a DLL you most certainly can.

Its basically to prevent someone from taking PB and exporting all its functions and making their own application dev suite, much the same caveat as AppGameKit "you can not make an app that makes apps etc ....."

in my discussion with Fred he saw no issue with exporting "some" of PB's functionally to AppGameKit as the end result is not exactly a general purpose DLL and is a plugin only intended to work with AppGameKit, but ask to be respectful of his IP.
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 12th Nov 2024 18:50
I think the same thing PartTimeCoder
SkinK4ir3
9
Years of Service
User Offline
Joined: 25th Aug 2015
Location:
Posted: 12th Nov 2024 18:50
Do you know why purebasic DLLs don't work in AgkStudio?
Pfaber1
7
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 21st Nov 2024 21:37
Hmm I wanted to know can I write a game and turn it into a .DLL ?
PartTimeCoder
AGK Tool Maker
10
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 23rd Nov 2024 17:16
Quote: "Do you know why purebasic DLLs don't work in AgkStudio?"


I never has any issues with my DLL plugins in studio, I'v not got either studio or PB installed right now but I should find some time tomorrow to check.... will post back

Quote: "Hmm I wanted to know can I write a game and turn it into a .DLL ?"


A game is just code, a DLL is just code, so yes in theory you can, but not sure why you would want to, you would still need an exe to run the DLL.

Pros..
Code Segregation

Cons..
Debugging Nightmare

if parts of your code are modular like a UI system or data management then sure it makes sense to port it to a DLL/LIB/Plugin for use in other projects, but game specific code should be confined to the game exe.

But this is coding, you can do what ever the hell you want lol
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Pfaber1
7
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 27th Nov 2024 23:40
I really just wanted to know if it was possible, might be useful in the future you never know. I do own my PureBASIC software, yep I'm a paid up member.
I seem to get on with AppGameKit S as I know where I am with it. Anyway I have decided that I do not need to choose between them as I can use both. I have about a year+ experience with PB and about 4 years experience with AppGameKit Classic/Studio, and about 6 months with Python Lua and Blitz3D. I do like PureBASIC but had some issues that I could not sort out. AppGameKit is great I have used it to make a few games and I am confident that I can start a project and finish it. You can't make a dll in AppGameKit but you can with PB. I think Fred would like to get a new ogre or something else similar but not sure if that would be possible or be a massive undertaking.
Bonjour.

Login to post a reply

Server time is: 2025-05-08 22:16:26
Your offset time is: 2025-05-08 22:16:26