The Game Creators
The Game Creators Home Click to Login
  Hot: Official TGC CompetitionLee is tweeting!July NewsletterSmart PackerBox2DWeb Hosting SurveyDGS BonanzaFPS Creator Bonanza;
The Game Creators
Program Announcements / New Lua5.1 Plugin - Free Scripting Pack for DBPro!

Go to the first page of this board Return to the Forum Menu Post Message
279 Messages - Page   of 7   
Bookmark and Share Search the Forum Next 40

Author Message
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 13th Mar 2006 02:33     Edited: 21st Oct 2008 16:51     | link | toggle

new bugfix: 1.1.1 for dbp plugin and dgdk/c++ library! updated lua to 5.1.3 fixing some crashes! other fixes see changelog.
new: call dbpro user functions from lua! DBPro plugin version 1.1.0 release (affects only dbp, not the c++ library). See the changelog! and make sure to delete the old debug dll.
new2: released unmanaged c++ library of my plugin! download from my website.

check this out: coolgames released a very good lua plugin here: http://forum.thegamecreators.com/?m=forum_view&t=126843&b=5


Hello there!

I just finished a releasable version of my Lua Plugin! It is an interface to use the power of Lua within your DBPro applications.
It is free for non-commercial use, as my Winsock plugin. If you use it commercially please send me an e-mail (read the license text file included in the download pack).

note: I am NOT the author of Lua. For more information about lua visit the official website: http://www.lua.org

Now to my Lua Plugin!

Features
-load configuration files and access the variables
-execute script functions with arbitrary arguments (and access multiple return values)!
-use Lua tables directly and easily in DBPro! (array with named indexing)
-use Lua stack
-new: call your dbpro user functions from within your scripts!
-call every single DBPro/plugin command from within your scripts, directly!
-fast and small release version of the dll
-23 fully documented commands, and more to come...
-5 examples to get you started with the basics!
-1 Tutorial so far


Website
On my plugins website you can find all files and infos about this plugin:
http://homepage.swissonline.ch/barnski/main.htm

Download
read the license agreement please, in the download pack.
You can download it on my plugin website.

Online Help
You can also access each commands help. In the download there are examples included in the help directory.
http://homepage.swissonline.ch/barnski/help/lua.htm

Tutorials
Lua and configuration files http://homepage.swissonline.ch/barnski/Lua-Configuration_files.html

Examples
You find all examples in the download pack in the folder: help/examples/lua
lua_functions example shows how to call DBPro functions
register_functions example shows how to register and call dbpro user functions.

Lua Compiler
I compiled a Lua 5.1 Compiler. With it you can compile your lua scripts. You can load them as usual with LUA LOAD FILE.
Lua5.1Compiler.zip

Lua Editor
A small and fast editor is for example scintilla: http://gisdeveloper.tripod.com/scite.html
A more sophisticated editor is LuaEdit, check for it in google.
Alternatively, you can use John's Synergy IDE to edit lua files.


Why did I do another Scripting plugin?
Well, it has been already a year now since I heard of the capabilities of Lua, that was when I played World of Warcraft from Blizzard. Now I have seen that it is possible to bring the power of LUA to DBpro applications (with Unity by DavidT). Since I would like this power to have in my applications too, I decided to dive into the Lua world. It was actually quite easy to make this plugin, much easier than my Winsock plugin. I made it in a couple of days, and then I just tested it another couple. And it works!
Another reason to do this was to make this available for free!

Now I would like to add, that I did not copy any functionality of Unity (or DarkScript by Torrey, the other scripting pack). Actually, I haven't even looked at the possibilities of it, I did my plugin from scratch, with my own ideas!

This said, it may be that it lacks some functionality. But that does not mean that I won't might add it to my plugin!
One thing I probably won't add is the possibility to register DBPro user functions to the LUA scripting environment (edit: haha, I did it by now!). Since I will use DarkSDK I can do this easily by handing over the function pointers. But for the DBPro plugin it would require quite some assembly hack. Actually, Torrey told me that he did this for his DarkScript plugin, and he pointed me into the direction how to do it myself. For that I want to thank him and link his plugin here:
http://forum.thegamecreators.com/?m=forum_view&t=71740&b=5
note that it is not free.


Conclusion
This plugin should bring you the power of Lua scripting into your DBPro applications, for free!
A DarkSDK library will come too, stay tuned! (edit: its now available)


Thanks for your attention. Oh and, feedback is well appreciated! I will improve what I can.

Back to top
MyWinsockPlugin
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 13th Mar 2006 03:00     Edited: 13th Mar 2006 10:49     | link | toggle

Removed to prevent the planting of unfounded ideas into other people's heads

Back to top
The Biglaugh
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 13th Mar 2006 03:15     Edited: 13th Mar 2006 03:21     | link | toggle

I quote my self
Quote: "Now I would like to add, that I did not copy any functionality of Unity (or DarkScript by Torrey, the other scripting pack). Actually, I haven't even looked at the possibilities of it, I did my plugin from scratch, with my own ideas!"

I don't see a reason for flaming here. If you don't want to use my plugin, then just don't. I certainly will, and I think there are others who might appreciate it too, that I released it here for free! I just follow an other philosophy when it comes to software.

I think linking Torreys Script is perfectly appropriate, if you read this:
Quote: "One thing I probably won't add is the possibility to register DBPro user functions to the LUA scripting environment. Since I will use DarkSDK I can do this easily by handing over the function pointers. But for the DBPro plugin it would require quite some assembly hack. Actually, Torrey told me that he did this for his DarkScript plugin, and he pointed me into the direction how to do it myself. For that I want to thank him and link his plugin here:
"
it clearly states that his plugin provides more fucntionality.

People can also see my plugin as a start, to get insight in scripting. But maybe it provides just enough power for their needs, as it does for mine.

Batvink:
Quote: "Why oh why oh why!?!?!?!?!?"
why should I buy a plugin, if I can do it myself?
And its just in my nature to share the result of my work.

greets,
Barnski.
Back to top
MyWinsockPlugin
Report this message as abusive
Torrey

User


Joined: Fri Aug 20th 2004
Location: Ohio
Posted: 13th Mar 2006 03:21           | link | toggle

Hopefully he doesn't get caught in the cross fire of the scripting wars. Just for the record I had no knowledge of him creating this scripting plugin. A few days ago he asked in the DLL Talk forum about passing dbpro functions as pointers to a dll, where I answered some of his questions about this idea.

Thank you for the mention in your post. The plugin looks like it has a really nice start and your mind is filled with ideas. Good luck with your development process!

Back to top
Blackgate.us Send AIM user a message
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 13th Mar 2006 03:35     Edited: 13th Mar 2006 03:36     | link | toggle

Quote: "Just for the record I had no knowledge of him creating this scripting plugin. A few days ago he asked in the DLL Talk forum about passing dbpro functions as pointers to a dll, where I answered some of his questions about this idea.
"
Yea, that was two days ago. And I started this Plugin 5 days ago, to tell the truth. And when I was asking I could not possibly have known who would answer right but I mentioned I will link your plugin, and I can take it out of course if you want me to do so...

So actually, since I did this in a mere over-night-work, there was not much knowledge to have about my plugin at that time

Quote: "Thank you for the mention in your post. The plugin looks like it has a really nice start and your mind is filled with ideas. Good luck with your development process!
"
Thanks to you!

greets,
Barnski.
Back to top
MyWinsockPlugin
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 13th Mar 2006 04:40     Edited: 13th Mar 2006 10:49     | link | toggle

Removed to prevent the planting of unfounded ideas into other people's heads.

Back to top
The Biglaugh
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 13th Mar 2006 05:05           | link | toggle

Quote: "The reason for my comments is that DavidT put the extra effort in to make his product saleable through TGC. They don't just take any old product, they ensure that everything is of marketable quality. So it's a bit unfair on DavidT to give away, what is essentially an identical product.
"

Just because our script plugins use both lua, does not mean they are identical. Lua is widely used in the developing industry, as also in games. Lua has a C API, which somehow dictates how you have to design the interface, thats why the commands probably will look similar.
Altough I haven't bought Unity nor did I have a closer look to tell you the differences, I think that DavidT's plugin is better and provides more functionality to the DBPro user, at least at the moment. I don't know whether or how far I am going to continue developing the DBPro interface, it depends on how many like to use it.
But I will make a fully featured c++ library for those who use DarkSDK, as me, where you can register your own function, and where all DBPro functions are usable in the script (the latter is actually not yet possible in my plugin!)

So again, I did not copy unity! I just used LUA, which is free available source code from www.lua.org and I think I came close to its spirit by making a free plugin with it.

greets,
Barnski.
Back to top
MyWinsockPlugin
Report this message as abusive
John Y

Synergy Editor Developer


Joined: Wed Sep 4th 2002
Location: West Midlands, UK
Posted: 13th Mar 2006 05:12           | link | toggle

Barnski,

If you want to keep developing it then go for it, competition stops stagnation and drives innovation (I should know being in the IDE maket)

I would like to see how you implement the dbpro commands.

Back to top
Digital Zenith
Report this message as abusive
David R

User


Joined: Tue Sep 9th 2003
Location: 3.14
Posted: 13th Mar 2006 10:34     Edited: 13th Mar 2006 10:37     | link | toggle

Indeed, I agree.

I realise that David T's plugin was of a high quality (not to say that this one isn't), and had a lot of time invested in it, but we shouldn't allow it to become a 'monopoly' or one party state - just because it was there first doesn't mean that there isn't room for a free alternative.

Just the same with physics engines, however, in reverse; Newton does a perfect job, and TGC are also making a full blown commerical one for DBP. There's no problem with that, and there is no problem with this plugin either.

So good for Barnski, and a job well done too

Quote: "So it's a bit unfair on DavidT to give away, what is essentially an identical product.
"
So, your saying thaat no free alternatives should be availible for paid products? So the Linux community should just lay down its arms agive up, because MS put lots of time to get Windows as a salable product? I don't think so.

I understand what you mean, in general, but I think we should just let Barnski do his job, and get his plugin going. There's zero problem with it.

Quote: "Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all."
Back to top
OneManBand Software
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 13th Mar 2006 10:48           | link | toggle

In retrospect, maybe I was a bit harsh. I should have thought a bit more before opening my mouth

Sorry, Barnski, please accept my humble apologies.

Back to top
The Biglaugh
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 13th Mar 2006 11:42           | link | toggle

Quote: "If you want to keep developing it then go for it, competition stops stagnation and drives innovation (I should know being in the IDE maket)

I would like to see how you implement the dbpro commands."
Thanks John
As for the dbpro commands: I am now trying to read the string table of the dll's that are present in the exe at-runtime, and then automatically get the function address and name. I already managed to get the address by hand, but now I want to serialize it so that any DBP update, or any plugin that is being added (or that I dont have) can be used from within the scripting functions. More on that as I make progress...

Quote: "So good for Barnski, and a job well done too ...
... I think we should just let Barnski do his job, and get his plugin going."
Thanks for your opinion David; I am on it

@Batvink
I am happy that you changed your mind, and I gladly accept your apologies

Now lets keep the talking about the plugin

greets,
Barnski.
Back to top
MyWinsockPlugin
Report this message as abusive
Chris Franklin

User


Joined: Tue Aug 2nd 2005
Location: UK
Posted: 13th Mar 2006 11:54           | link | toggle

and i got unity less than 2 months ago

Back to top
DBCoder - All around coding forums (And ways to avoid scams) Send AIM user a message
Report this message as abusive
John Y

Synergy Editor Developer


Joined: Wed Sep 4th 2002
Location: West Midlands, UK
Posted: 13th Mar 2006 12:18           | link | toggle

Barnski,

No problem. You can get access to the dbpro commands from the globstruct.h file. Maybe a C++ programmer can give you more information.

Back to top
Digital Zenith
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 13th Mar 2006 15:40           | link | toggle

Is there a place where we can learn the basics of lua?

Back to top
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 13th Mar 2006 16:10     Edited: 13th Mar 2006 16:36     | link | toggle

Quote: "No problem. You can get access to the dbpro commands from the globstruct.h file. Maybe a C++ programmer can give you more information."
Fantastic! thanks alot John, you saved me some hours of trouble..
in the globstruct header are the instance handlers of the dll's, and whether they have been loaded or not. Now I just have to parse the string tables, look for the function addresses, and register them within lua. I will also check for the "spare" handlers, which might hold user-plugin dll's, I guess.

Quote: "Is there a place where we can learn the basics of lua?"
Yes, I started to learn it using an online book, although I haven't come past part I, hehe, I mainly read the last part, which is about the C API. You don't need to read that part, unless you want to make a c++ plugin yourself.
first, the official website is: http://www.lua.org
go to documentation, and there you will find a reference. But also the forementioned online book!


edit; in case you ever need to check with your own plugin for dbp dll's that have been loaded with the exe, this skeleton I just made with c++ might come handy:
+ Code Snippet

greets,
Barnski.
Back to top
MyWinsockPlugin
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 13th Mar 2006 18:08           | link | toggle

Can this execute Dark Basic commands?
Whenever I try to use commands that output to the screen, nothing happens.

Back to top
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 13th Mar 2006 18:13           | link | toggle

Quote: "Can this execute Dark Basic commands?"
I just implemented this now during the last hour. But I have not tested it yet and I am too sleepy to continue...

Tomorrow it should be working, check back then!

greets,
Barnski.
Back to top
MyWinsockPlugin
Report this message as abusive
BatVink

TGC Newsletter Editor


Joined: Fri Apr 4th 2003
Location: Chilling
Posted: 14th Mar 2006 07:21           | link | toggle

Executing DB commands is a nice feature, but I would encourage people to use this as a method when all else fails. You should design your game engine to do the hard work, and Lua to chnage the way the AI works.

For example, you could program the movement of your character in Lua via DB commands. But what you should be doing is getting Lua to decide whether a character needs to change direction, send an appropriate message, and let the engine turn him. The engine knows how to turn the character and react to obstacles and other influences. If physics in involved, moving the objects in Lua is a complete no-no.

Back to top
The Biglaugh
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 14th Mar 2006 07:57           | link | toggle

It still makes it a ton easier. What happens if you have to change multiple objects? Or It's not a fixed object id that you are changing? It makes it a ton easier if you can execute db commands externally.

Back to top
Report this message as abusive
Freddy 007

User


Joined: Tue Nov 30th 2004
Location: Denmark
Posted: 15th Mar 2006 12:33     Edited: 15th Mar 2006 12:47     | link | toggle

I thought about getting Unity, but I think I will go for this one instead(sorry DavidT )! Then I can have NGC too...

Barnski for the win!

EDIT:
Ok, it's not that I don't want Unity, but if I go for this free LUA-thing, then I can have both LUA and NGC.

Back to top
Freddy\'s place
Report this message as abusive
Google Ad
Back to top
 
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 17th Mar 2006 13:46     Edited: 17th Mar 2006 13:47     | link | toggle

May I have your attention please...

I proudly present you my new update !

You can now call ANY DBPro command from within your lua scripts!

I worked for the last 3 evenings on it and it took me even into the world of assembly to achieve my goal. lol I remember when I thought I had done it 3 days ago in my post above... but then I realized that it wasn't that easy. I had to make lua call ANY arbitrary dbpro function, with any amount of arguments.. and phew... all these overloaded commands! NO I did not manually code every single dbpro command and link it into the script
I made it automatically scan the EXE file when it is used (when you call LUA MAKE), and scans every dbpro dll that has been linked into the exe. It creates then a lua table with all the information it can get on the commands (arg types, overloaded functions, return types...), and waits for YOUR command to unleash its power! hehe..
Actually this loading isn't even noticeable! I haven't measured it since it is really nothing. It may depend on how many dlls you have in the exe, but it should really not bother (guess some milliseconds). Oh yea, of course you have to make sure that the dlls you want to use are linked within the exe. If you don't use object commands for example, then the Basic3D dll wont be linked, and you wont be able to call these commands from your scripts. To enable this, simply add a dll-specific command at the end of your dbpro code file, like: make object 1, 1, 1... its as easy than that.

Yes I know.... I know... you don't care about this feature? well then let me just be proud of it, because I think there is enough reason to be proud of
I feel like sharing my insight now, so if you want to know more about how I did it, feel free to ask.


OH and the most important thing I want to add: you have to test it! If you find a command that does not work (this is highly probable, since I may haven't thought of all exceptions), then report it please and I will make sure that these kindalikes work!


So how do you call the commands within your scripts?

like that:

DBPro.Call ("Print", "HEY THIS WORKS!!!")
DBPro.Call ("LoadObject", "my_super_object.x", 1)
DBPro.Call ("WaitKey")


Note: Lua is case-sensitive. DBPro and Call have to be correctly typed, and also the dbpro-command string argument! "Print" "LoadObject"
Syntax of dbpro commands: I automatically deleted the spaces in the dbpro commands and made first letters of words upper case. so "load object" becomes "LoadObject".
why? because I may add macros to the DBPro table, such that you can directly call: DBPro.LoadObject ("filename.x", 1).
and Lua does not allow spaces in function names.

I also might add security levels, such that you can allow and/or disallow dbpro dll's to be used from the script.


so, I hope you will play around with this feature.

Have fun!!

IMPORTANT NOTE: Since this plugin allows you to virtually resell DBPro (compile a dbpro.exe with all dll's in it, and that calls a main-script function, in where you can use all dbpro commands), I hereby DISALLOW you to SELL or distribute any product that simluates the usage of DBPro. You know, I mean a product, which sole purpose is to allow a user to use every DBPro commands. Even though they would be slower, I think it is fair to disallow it. And I don't want to get any license troubles with TGC.

greets,
Barnski.
Back to top
MyWinsockPlugin
Report this message as abusive
Hawkeye

User


Joined: Fri Sep 19th 2003
Location: SC, USA
Posted: 17th Mar 2006 13:54           | link | toggle

Uber!


I am but mad north north-west; when the wind is southerly I know a hawk from a handsaw - Hamlet, Hamlet
Back to top
provosmusic.com
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 19th Mar 2006 07:51     Edited: 19th Mar 2006 07:58     | link | toggle

Yep

I just found a nice editor to use for LUA script files: SciTE

you can get it from here: http://gisdeveloper.tripod.com/scite.html

Here is a screenshot of it in action, and it shows also the usage of DBPro.Call extensively, for a scripted object viewer.



edit; I made the object viewer reload the script when you press spacekey at runtime, such that you can change the behaviour of the program during runtime!
I will post the scripted object viewer as an example when I am done with it.
edit2; in case you wonder whether this runs too slow: No it doesn't! it runs at 1000fps if I don't lock it to 60!

Back to top
MyWinsockPlugin
Report this message as abusive
Torrey

User


Joined: Fri Aug 20th 2004
Location: Ohio
Posted: 19th Mar 2006 08:16           | link | toggle

Excellent work on the dbpro commands! Becareful though, during my development I got bitched at about having dbpro commands accessible with the possibly of creating a dbpro wrapper. TGC could get upset about this feature.

What's up with the scripting IDE's lately? People taking inspiration from my post?

Back to top
Blackgate.us Send AIM user a message
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 19th Mar 2006 13:51           | link | toggle

Thanks Torrey.

I now explicitly disallow in my license txt file to make a dbpro wrapper with my plugin.

I just started to script, and I needed an editor better than notepad, so I looked for one
here's a list for those who haven't one for lua already:
http://lua-users.org/wiki/LuaAddons
I tried LuaEDIT but I don't like it, it is too slow when it comes to saving. So I am using SciTE (Scintilla) now. the link is in my first post above!


Yes and finally there is a new version downloadable. Someone had problems with the lua IO library, so I excluded it from the default loading. it isn't used anyways, as we use dbpro to handle input and output. make sure to clear your web cache before downloading....

Back to top
MyWinsockPlugin
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 21st Mar 2006 04:57     Edited: 23rd Mar 2006 10:43     | link | toggle

I made a small bug fix; LUA STRING$() did not work properly on lua tables (e.g. "x.y"). Now it should!

If you find a bug, please make sure you have the latest version (check the date of the download in the first post). If yes, then send me an email/msn, or post here. Thanx!


edit; just another update(18:48)! I fixed another bug, now really every overloaded dbpro command should be recognized! the bug was it didn't recognize the last overloaded version of a command...
so for example, CLS has two versions:
1. CLS
2. CLS color
previously the 2. did not work. (note, it is "Cls" in my plugin)

another example: LOOP OBJECT ("LoopObject")
1. LOOP OBJECT id
2. LOOP OBJECT id, start
3. LOOP OBJECT id, start, end
previously, the 3. did not work, only 1. and 2. now all versions work!

just uploaded a new version. Added a DBPro.CallEx function, which allows to specify which argument types are being passed. This is needed for some functions that allow different numerical parameter types, e.g. Print.
Syntax: DBPro.CallEx ("Print", "O", 1.2345)
note: O means double float.

fixed a bug where DBPro.Call did not return floats properly.

Besides, I am on holidays now for a week

Back to top
MyWinsockPlugin
Report this message as abusive
Xarshi

User


Joined: Sun Dec 25th 2005
Location: Ohio
Posted: 23rd Mar 2006 17:49           | link | toggle

can you call your own functions from the lua script? and when making a function,do you go like " function bla(bla as string) or what? im talking in the lua script. because with the pic above you just have a function like this: function refresh().

all ben needs is his band,his guitar,and his computer
Back to top
Send AIM user a message
Report this message as abusive
Xarshi

User


Joined: Sun Dec 25th 2005
Location: Ohio
Posted: 23rd Mar 2006 18:21           | link | toggle

nevermind. this is a really great program though! its so awsome!

all ben needs is his band,his guitar,and his computer
Back to top
Send AIM user a message
Report this message as abusive
Peter H

User


Joined: Fri Feb 20th 2004
Location: Witness Protection Program
Posted: 23rd Mar 2006 19:59           | link | toggle

*Kisses Barnski full on the face*

you probably didn't want that, but people who release things like this for free make my day

"We make the worst games in the universe..."
Back to top
Report this message as abusive
Olby

User


Joined: Thu Aug 21st 2003
Location: Studio
Posted: 24th Mar 2006 04:08           | link | toggle

mine too, hehe

"Gangsters die, they don't go to heaven where angels fly!"
AMD Sempron 3.1+ Ghz, 512MB Ram, ATI R9550 256MB Ram, Sound Blaster Live!, WinXP SP2, DirectX 9.0c
Back to top
Olby Online
Report this message as abusive
qwerty823

User


Joined: Tue Jan 17th 2006
Location: Cyberspace
Posted: 28th Mar 2006 17:19           | link | toggle

For your next update, can you make calls to:

luaopen_package() and luaopen_table().

Not being able to use the table functions (ie, table.insert(), table.remove() ) and not being able to "require" other modules, make it difficult to make usable lua programs.

Thanks!
Back to top
Report this message as abusive
Segan

User


Joined: Sun Aug 28th 2005
Location: Canada
Posted: 29th Mar 2006 10:44           | link | toggle

This plugin looks good! I'll have to keep an eye on this thread...
Back to top
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 2nd Apr 2006 08:22     Edited: 2nd Apr 2006 08:25     | link | toggle

Hello all, I am back from holidays

Quote: "nevermind. this is a really great program though! its so awsome!"
Quote: "*Kisses Barnski full on the face*
you probably didn't want that, but people who release things like this for free make my day"
Quote: "mine too, hehe"
Quote: "This plugin looks good! I'll have to keep an eye on this thread..."
Thanks for all the comments guys! as for the kiss; I will survive it I guess hehe

Quote: "For your next update, can you make calls to:

luaopen_package() and luaopen_table().
"
Updated and uploaded. Grab the new version as usual from the first post. After download make sure the release version date is the same as in the post (or else just clear your browser cache before downloading).

Quote: "can you call your own functions from the lua script? and when making a function,do you go like " function bla(bla as string) or what? im talking in the lua script. because with the pic above you just have a function like this: function refresh()."
It is not possible to call your own user functions that you defined in DBPro from within your lua script. I might add this feature though if I happen to have a great day or feel the need for. it may look something like this:
in the function you want to be accessible from your script you will have to put at the beginning a code line like:
+ Code Snippet
to define lua functions within the script that take arguments you do not need (nor can you) to specify the argument type, since lua will handle this automatically. so, e.g.: function add(a,b) will take two args a and b, which may be numerical, or also strings... its like PHP.

Back to top
MyWinsockPlugin
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 4th Apr 2006 09:30           | link | toggle

New update.

Someone requested new features to load lua chunks...

two new commands:

LUA LOAD STRING lua_chunk as String, chunk_name as String
LUA LOAD BUFFER lua_chunk as Dword, chunk_size as Integer, chunk_name as String

important: I renamed a command (examples are updated)!

LUA LOAD filename as String
becomes
LUA LOAD FILE filename as String

I have added help for the new commands. Read it for more information.
Short: you can now call lua code from a string, or memory block (e.g. memblock). They can also be precompiled lua code. You can compile your lua code using "luac", a lua compiler. Google for it!

Back to top
MyWinsockPlugin
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 4th Apr 2006 15:52           | link | toggle

Once Again an update
I made a little mistake, now the commands work. I tested them with a small new example. It shows how to load lua chunks (script code) either in textual or binary (compiled) form.
I included it in the download pack: chunks.dba

I have also uploaded a Lua5.1Compiler that I compiled for you. You find it in my first post...

Tell me if you see a need for having the compile command within the plugin...

Next things I will do is:
- add the possibility to register custom dlls (other plugins)
- add a command that dumps all registered dbpro cmd names into a file so that you can look em up during development (also the custom dlls)
- allow thread handling from within DBPro
- <insert your feature request here>

Back to top
MyWinsockPlugin
Report this message as abusive
Segan

User


Joined: Sun Aug 28th 2005
Location: Canada
Posted: 4th Apr 2006 19:20           | link | toggle

I think you deserve some feedback after three strait messages giving updates:

Great job! As soon as I get some free time I will need to check out all of the new features (even if it means sacrificing some time spent on my own project... )
Back to top
Report this message as abusive
coolgames

User


Joined: Mon Sep 26th 2005
Location: Oregon, USA
Posted: 7th Apr 2006 08:28           | link | toggle

This is really great! Those tables saved my life.

Back to top
Report this message as abusive
Maleck

User


Joined: Wed May 12th 2004
Location: US
Posted: 21st Apr 2006 14:35           | link | toggle

You seems to have done some good work here. I hope to check it out soon. Been away from the programmign a while ot do some models for my projects and just starting to get up to speed on everything that has been going on recently.
Back to top
Report this message as abusive
Barnski

User


Joined: Thu Jan 26th 2006
Location: Switzerland, Zurich
Posted: 24th Apr 2006 16:58           | link | toggle

I hope you will find it useful, and thanks for the comments.

Unfortunately I am totally overloaded with studies at the moment, such that I cannot work on my plugins for awhile

However, dont hesitate to post anything that comes up..

Back to top
MyWinsockPlugin
Report this message as abusive
dab

User


Joined: Wed Sep 22nd 2004
Location: You Temp Folder!
Posted: 24th Apr 2006 23:25           | link | toggle

Can you create a command that makes a MMORPG for us??

Lol. Just Kidding. Great dll Barnski.

Back to top
dab-Media
Report this message as abusive

Go to the first page of this board Return to the Forum Menu Post Message
279 Messages - Page   of 7   
Search the Forum Next 40

This is a multi-page thread older than 30 days.
Go to the last page to check if you can reply to it.

Forum Search

Enter a word or phrase to search our Forum for:

Thread Subject Search
Search Phrase:
Search Scope: Entire forum
Just this board
 
Google Forum Search
Search Phrase:
 
Apollo v2.02


Game Creator Store
Privacy Policy AUP Top of Page