Event and Scripting Libraries

Whether you're a newbie or an experienced programmer, any questions, help, or just talk of any language will be welcomed here.

Moderator: Coders of Rage

Post Reply
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Event and Scripting Libraries

Post by avansc »

Hi,

I have been messing about with an event and scripting system for qpHalcy0n on one of his projects. The progress has been pretty slow, but I think its in a semi usable state now.

I am hoping that this project(s) takes off and that you guys, the community start sharing ideas and becoming involved.

Scripting : http://code.google.com/p/qscriptlib/
Event : http://code.google.com/p/qeventlib/

There is an example GLUT application in the Event repo that will show you the basics of using both libraries.
http://code.google.com/p/qeventlib/sour ... e/main.cpp

NOTE: You will need to build angelscript as it has that as a dependency.
also, this code has been glued together with spit, so it may not be very good, it may leak like rusty boat, but we'll fix those as we spot them.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Event and Scripting Libraries

Post by MrDeathNote »

I haven't looked at the lib source just the example you gave and it looks very interesting. The way it registers listener/handler pairs reminds me very much of the qt signal/slot system. This is a pretty sweet project, hope it takes off.
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Event and Scripting Libraries

Post by avansc »

Hey, been working on this but running into issues, mostly just not wanting to push a code base that I feel could be better, but thats just the nature of the beast, and I'll just have to get used to it.

I moved this to github, since it was more convenient for me.

There is a xcode project file in there that should work, I would appreciate it BIG time if someone built it to see if it works. You'll have to build angelscript and make sure its in /usr/local/{include/lib}

https://github.com/avansc/qLib

should be as simple as a,
git clone git://github.com/avansc/qLib.git
If you have xcode4, and anglescript built it should be as simple as opening the project and doing a cmd+b
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Event and Scripting Libraries

Post by avansc »

UPDATE : 2 more examples are done.

Did some more work on this,

The scripting section should be pretty usable.

There are 5 examples done.


example_1_load_scripts
https://github.com/avansc/qLib/blob/mas ... cripts.cpp

example_2_register_variables
https://github.com/avansc/qLib/blob/mas ... iables.cpp

example_3_register_classes
https://github.com/avansc/qLib/blob/mas ... lasses.cpp

example_4_events_native
https://github.com/avansc/qLib/blob/mas ... native.cpp

example_5_events_script
https://github.com/avansc/qLib/blob/mas ... script.cpp



On another note, I have included Angelscript in the repo.


Lemme know what ya think.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
User avatar
avansc
Respected Programmer
Respected Programmer
Posts: 1708
Joined: Sun Nov 02, 2008 6:29 pm

Re: Event and Scripting Libraries

Post by avansc »

*bump*

2 new examples added. feedback is appreciated.
Some person, "I have a black belt in karate"
Dad, "Yea well I have a fan belt in street fighting"
Post Reply