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 / Wrapping or not wrapping?

Author
Message
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Sep 2021 15:23 Edited at: 4th Sep 2021 16:13
I'm interested in creating a game with AGK2. It will be a Facebook community project that will be released under MIT license, I for one will not be selling it. It is meant to be a community project based on another game.

My question is, I want to use Pure Basic for a good portion of the data manipulation, but not all. The commands for data manipulation in AppGameKit is minimal and nothing worth using in my opinion. If I make dlls for manipulating the data I want to use it for, is that considered wrapping commands?

I will actually be writing a program in Pure Basic to do the data manipulation, not just listing commands I want to use in the dlls.
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 4th Sep 2021 20:00
Don't worry about replying to my question. I have emailed Pure Basic support directly about this
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 5th Sep 2021 00:15 Edited at: 5th Sep 2021 00:19
Actually I could use more explanation about this wrapping thing. I'm still waiting on Pure Basic support to get back with me, but I would like a good more specific explanation to understand it better.

Quote: ""Does the PureBasics license allows wrapping its API inside DLLs?"


You are right, you can not just wrap up PB's commands and export them, but there is the caveat that PB wraps the WinAPI so you can export as much of that as you like as PB can not take ownership of it, so as long as you include as much API as possible, like I usually do then its well within the EULA.

at the end of the day you can not make a DLL without exporting some of PB' functionally, what Fred asks is simply don't wrap the API and call it your own, which is fair enough."


That is a quote from PartTimeCoder above.

So, is he saying that as long as I don't just use PB's command set to manipulate data in my game made in AppGameKit, but use PB's commands to mostly access windows resources to help with the manipulating....I'm allowed to do that?
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 8th Sep 2021 16:18
Never mind I figured it out
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 8th Sep 2021 20:33
There are two distinct concepts of Function Wrapping that exist...
Type 1 • Direct Wrapping., this is where you are taking a Function and essentially just declaring it in such a way that it is usable "As-Is" through your Interface.

So for example, it's actually quite easy to create an XInput Wrapper Library for DarkBASIC Professional, as it supports Pointers... and as all of the functionality is basically just a list of Stand-Alone Function., we can create a DBP (.dba) Header that contains the Types and Constants; and essentially just create the DLL that creates the Direct Calls to say XInput Functions.
Heck we can actually go a step further and simply call these from XInput1_4.dll ourselves from within DBP; but it's easier with a Plug-In Wrapper.

Of course that isn't exactly "User Friendly" for the programming skill level most in DBP have., hence why when I wrote one years ago... I made a much more bespoke interface that fit with the DBP Commands style.

Type 2 • Peer-to-Peer Wrapping., this is a little more difficult to explain... but what you're doing is taking an existing function call, and re-creating it in another interface to produce the same (or rather close approx.) results.
A good example of this would be Dark BASIC Pro 9Ex/11., which replaces all of the DBP Runtime Libraries; but retains the same commands.



Now beyond this... I'm not sure where the issue in AppGameKit Data Manipulation is for you., as personally my issue with AppGameKit has never been the ability to manipulate data but rather in the limited scope of Data Types.
That is to say that these are all Signed 32-bit (4 Bytes) Variables... and the data is always treated as such internally.
The thing is we can't change that, regardless of what Extension Plug-Ins we use.

It's just a limitation of the Scripting Engine and Runtime that AppGameKit is built upon., and frankly it's a very slow Scripting Engine at that.
Shifting Data Manipulation to a Plug-In could help with performance... but then in said case what would you actually be wrapping? I mean that's what somewhat confuses me here about your original question... what is it you THINK you're going to be wrapping in terms of Pure Basic API Functions? (which again are themselves almost direct wraps of commonly used interfaces like WinAPI, SDL, OpenAL, etc.)
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 11th Sep 2021 00:19 Edited at: 11th Sep 2021 01:41
Quote: "Shifting Data Manipulation to a Plug-In could help with performance... but then in said case what would you actually be wrapping? I mean that's what somewhat confuses me here about your original question... what is it you THINK you're going to be wrapping in terms of Pure Basic API Functions? (which again are themselves almost direct wraps of commonly used interfaces like WinAPI, SDL, OpenAL, etc.)"


I will be using PB to manipulate NPC character data and keep track of it and save to a file and update the data as needed. They told me that as long as you don't just wrap commands that don't do anything just to use the PB commands in another language and actually have the PB commands doing something meaningful you're fine. Example of violation of the agreement would be like as follows:



You can't do this either:

That is simply wrapping a PB function command that does nothing but offer PB commands and it's functionality. You can't make a dll and use PB commands and call them your own like this myBase64Decoder(), mySHA1Fingerprint(), myCreateImage() or myResizeImage() etc so you can use it in another language.
I will be using PB to track NPC character data. So I'm doing a lot with it and not just wrapping commands. Another good idea though is to use it to access like say... WinAPI and have WinAPI do things instead as added + to not violate the agreement
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 21st Sep 2021 15:06
Might be better just creating a Plug-In with (Visual Studio) C++
Then you don't have to worry about what is and isn't allowed... and you have access to a much wider array of approaches.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 21st Sep 2021 19:17
Because PureBasic is an absolute joy to code with, Unlike Visual Studio it just "works", You are right of course I don't disagree but VS can be a headache to use at first and it puts a lot of people off, I know it put me off for a decade!
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Unseen Ghost
22
Years of Service
User Offline
Joined: 2nd Sep 2002
Location: Ohio
Posted: 23rd Sep 2021 02:40
Quote: "Might be better just creating a Plug-In with (Visual Studio) C++
Then you don't have to worry about what is and isn't allowed... and you have access to a much wider array of approaches."


Quote: "Because PureBasic is an absolute joy to code with, Unlike Visual Studio it just "works", You are right of course I don't disagree but VS can be a headache to use at first and it puts a lot of people off, I know it put me off for a decade!"


Thank you Raven and PartTimeCoder for both your helps and inputs. I will eventually learn Visual Studio languages such as C++, C# etc etc. I will be staying with Pure Basic, I believe I have enough knowledge on what can and can't be done with Pure Basic so I will continue. The way someone explained it on PB forums helped me understand that it isn't really that complitcated on what can and can't be done with PB

Again, thank you both for your help
Gigabyte Board/ AMD 3.3 Ghtz Quad core/8GB Ram/Nvidia Geforce 1080 GTX 8GB/1TB Western Dig. SSD/Windows 10 Home/Dark Basic Pro 9Ex

No one cares how much you know until they know how much you care.

Login to post a reply

Server time is: 2024-11-21 17:59:42
Your offset time is: 2024-11-21 17:59:42