SFML community forums
General => General discussions => Topic started by: tntexplosivesltd on February 02, 2011, 09:37:56 am
-
Hi there. Is there any easy way to have C++ scripting in C++ SFML games? What is the easiest way to open up the SFML game to users to be able to write C++ plugins?
-
There's no effective way to do lightweight C++ scripting but plugins can be done. The complexity involved differs depending on if you wish to be compatible with Windows and *nix/Mac or just one as Unix compatibility uses dlopen and Windows uses LoadLibraryA.
-
Plugin systems are indeed rather hard to pull of correctly. You'd be better served by writing a data driven game that can take popular scripting languages as data sources or even callbacks.
-
Plug ins can be made, however, there is no effective way to do easy C++ scripting. The complexity is depending on if you're using Windows compatible and * nix / Mac or only one Windows and UNIX compatibility downslope used Load Library A.
-
There are other alternatives. I know ChaiScript (http://www.chaiscript.com/) is made to be specifically done for C++. Falcon (http://falconpl.org/) too is interesting, but for a big project, not for quick scripting system setup I guess.
-
Lua is very popular in the game programming community:
http://www.lua.org/