[edit]
See here for the full release: http://www.purebasic.fr/english/viewtopic.php?t=20312
[/edit]
Hey you don't need to report errors you get with this. Its just a test build to give you guys a little taste of what will soon be public domain for all to enjoy!
Read the readme.txt!
Let me know what you think! Obviously speed improvements are on the way. But its pretty quick so far.
Currently it runs in pb 3.94, and should be real easy to use in pb 4.0 once I've released the code.
DracScript Preview! (Now released, check announcements)
-
- Addict
- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
DracScript Preview! (Now released, check announcements)
Last edited by dracflamloc on Fri Mar 10, 2006 7:39 pm, edited 1 time in total.
sweeeeet
This is niiice ...
In future releases, is it possible to cal PB functions directly? Are they exposed to the engine? How about Structures? Those are a few things missing in other PB based scripting languages that I have seen on these forums so far ... what about the ability to read/write to pb linklists or arrays? Im curious as to how far this has one ..
If it made it that far, then it is definately a contender to VBScript
In future releases, is it possible to cal PB functions directly? Are they exposed to the engine? How about Structures? Those are a few things missing in other PB based scripting languages that I have seen on these forums so far ... what about the ability to read/write to pb linklists or arrays? Im curious as to how far this has one ..
If it made it that far, then it is definately a contender to VBScript

-
- Addict
- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
PB has no reflection so its not possible to call pb functions directly but it would be very simple to make those functions available to the scripting engine. There is a command:
DS_RegisterCommand(@Proc(),commandname.s,numParams.l)
This will allow any pb procedures to be commands in the scripting language that you like. The default functions like Mod, Mid, etc, are actually optional and can be stripped out to make the engine even more lightweight if needed.
No structures yet. Not sure if ever, but since its open source maybe someone will add it. The key is for this language to be light and quick and easy to implement into a project. Its possible though for a command to be created using the above DS_ procedure that passes addresses to pointers and such.
So in the script you could do:
SetPlayerX(playerStruct,10)
playerStruct could be set as a constant or set as a variable during the script.
In PB the Procedure could look like:
DS_RegisterCommand(@Proc(),commandname.s,numParams.l)
This will allow any pb procedures to be commands in the scripting language that you like. The default functions like Mod, Mid, etc, are actually optional and can be stripped out to make the engine even more lightweight if needed.
No structures yet. Not sure if ever, but since its open source maybe someone will add it. The key is for this language to be light and quick and easy to implement into a project. Its possible though for a command to be created using the above DS_ procedure that passes addresses to pointers and such.
So in the script you could do:
SetPlayerX(playerStruct,10)
playerStruct could be set as a constant or set as a variable during the script.
In PB the Procedure could look like:
Code: Select all
Procedure SetPlayerX(*playerAddr.PLAYER_STRUCT,newx.l)
DS_RegisterCommand(@SetPlayerX(),"SetPlayerX",2)
Last edited by dracflamloc on Tue Mar 07, 2006 8:08 pm, edited 1 time in total.
-
- Enthusiast
- Posts: 731
- Joined: Wed Apr 21, 2004 7:12 pm
-
- Addict
- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact:
Actually ... I was trying to compare this against the WSH for VBScript.. and with what you told me, basically neither have reflection, but both allows you to register functions in the script, which is awesome
The only difference I can see now is that WSH allows classes/structures to be registered and passed back and forth the registered functions.
But that's ok if this doesnt provide that, because its fairly easy to wrap a structure or a linklist/array object around a registered function
This is great news!
Another one is .. can you load multiple scripts at once? With the ability to reload individual scripts as warrented?
Sorry, one more question, I have to prod after having a taste
Can the engine load script files from memory, given a memory pointer and length? This would be helpful loading script files from packed files

But that's ok if this doesnt provide that, because its fairly easy to wrap a structure or a linklist/array object around a registered function

Another one is .. can you load multiple scripts at once? With the ability to reload individual scripts as warrented?
Sorry, one more question, I have to prod after having a taste

Can the engine load script files from memory, given a memory pointer and length? This would be helpful loading script files from packed files

-
- Addict
- Posts: 1648
- Joined: Mon Sep 20, 2004 3:52 pm
- Contact: