[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
GameMonkey Script • View topic - Game Monkey Script Ex(Extended) & gmBind2

GameMonkey Script

GameMonkey Script Forums
It is currently Fri Dec 03, 2021 8:09 pm

All times are UTC




Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sat Jan 31, 2009 11:11 am 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439


Last edited by DrEvil-OB on Fri Jun 05, 2009 1:20 am, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Sat Jan 31, 2009 4:00 pm 
Offline

Joined: Thu Jan 01, 2004 4:31 pm
Posts: 307
Nice work :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Tue Mar 03, 2009 11:17 pm 
Offline

Joined: Sun Mar 01, 2009 12:25 am
Posts: 2
This looks great! I'm trying to learn scripting and I tried Lua, GM, and Squirrel, and of the three GM was my favorite because of its size and speed, but I really wanted a binding system like LuaBind or SqPlus. This looks like it hit the nail on the head!! Can't wait to try it out. =D

edit: Um...am I missing something? The sourceforge page doesn't contain anything to download. :?:

edit edit: never mind. I realized I had to use SVN to get it. :oops:


Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Sun Mar 22, 2009 4:29 am 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439


Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Tue May 19, 2009 7:05 pm 
Offline

Joined: Sun Jul 29, 2007 11:52 am
Posts: 33
Location: Canberra, Australia
Just had a look over this, damn GM has came along since I last used it :)

Quite like gmBind2, looks very simple to use, sneaky, never thought of doing binding that way (code wise). Shall be a pleasure to implement in my new engine!

Dare I ask, is there a way to say an object is owned by C++? I.e, passing a pointer of an object into GM, or do you not intend for it to work like that?

Another question, is it possible to implement inheritance from a C++ class? No worries if not, I don't plan to do it, just interested :)


Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Tue May 19, 2009 7:45 pm 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
There is a bool to the "gmBind2::Class<Foo>::WrapObject" function you can set to true to mark the object as natively owned, which means references to the object being GC'd wont actually delete the object.

The one thing I wish GM had a better solution for is strong/weak references, like squirrel. Currently for my C++ owned object, they hold a gmGCRoot<gmUserObject> that holds a reference to their script object, and I use that any time I call a function I need to pass a reference to the object into. Also in my c++ bound object, I call gmBind2::Class<Foo>::Nullify(i think), to zero out the gmUserobject user * when the object is destroyed, so that any remaining script references to that class will be nullified and no bad pointers are accessed. The gmBind2 functions I believe check for that and will throw a script exception if anything attempts to access anything on the (now nullified), reference to the deleted object.


Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Fri May 29, 2009 11:40 pm 
Offline

Joined: Tue Feb 10, 2009 5:54 pm
Posts: 1


Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Thu Jun 04, 2009 6:21 pm 
Offline

Joined: Tue Sep 02, 2008 3:58 pm
Posts: 2
So far using this is working great. Passing in bound types (when needing a pointer) as parameters seems to work automatically! I'm having a problem using a 'const char *' as a param. Any suggestions?

example

this function:
bool Load(const char* podBasename);

bound like this:
.func(&Scene::Load,"Load")

is causing this compile error
1>c:\documents and settings\bbelt\code\beat\sim4\gamemonkey\3rdparty\gmbinder2\gmbinder2_class.h(195) : error C2825: 'ClassT': must be a class or namespace when followed by '::'


Top
 Profile  
Reply with quote  
 Post subject: Re: Game Monkey Binding
PostPosted: Thu Jun 04, 2009 7:01 pm 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439


Top
 Profile  
Reply with quote  
PostPosted: Thu Jun 11, 2009 5:57 pm 
Offline

Joined: Tue Sep 02, 2008 3:58 pm
Posts: 2
Thanks, for me using std:string instead is no problem at all.

I did find a gotcha with bound member vars and inheritance. If you bind a var in the base class,
when you try to access it from a subclass it looks for it in that objects table. It works fine if the
var is bound by the subclass.


Top
 Profile  
Reply with quote  
PostPosted: Sat Jul 04, 2009 5:55 am 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 15, 2009 8:16 am 
Offline

Joined: Fri Jul 24, 2009 1:09 pm
Posts: 27


Top
 Profile  
Reply with quote  
PostPosted: Sun Nov 15, 2009 10:15 pm 
Offline

Joined: Sat Oct 10, 2009 5:30 pm
Posts: 4


Top
 Profile  
Reply with quote  
PostPosted: Tue Nov 17, 2009 3:25 pm 
Offline

Joined: Fri Jan 14, 2005 2:28 am
Posts: 439
gmBind2::Global can be used to bind global variables and functions

Thanks, I've committed the struct initialization fix also.

Mitch, I've committed compile fixes for when GM_USE_VECTOR3_STACK is set to 0. Thanks for letting me know about that one too.


Top
 Profile  
Reply with quote  
PostPosted: Wed Nov 25, 2009 9:33 pm 
Offline

Joined: Sat Oct 10, 2009 5:30 pm
Posts: 4
Is there any good way to bind constants? (Specifically enums) I tried using gmBind2::Global but it didn't work.

~DtD


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group