SFML community forums

General => General discussions => Topic started by: tntexplosivesltd on February 02, 2011, 09:37:56 am

Title: C++ scripting in SFML games
Post 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?
Title: C++ scripting in SFML games
Post by: JAssange on February 02, 2011, 02:25:56 pm
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.
Title: C++ scripting in SFML games
Post by: Svenstaro on February 02, 2011, 03:55:49 pm
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.
Title: c++ scripting in SFML games
Post by: christian.kelvin10 on March 12, 2011, 02:37:06 pm
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.
Title: C++ scripting in SFML games
Post by: Klaim on March 20, 2011, 11:31:35 pm
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.
Title: C++ scripting in SFML games
Post by: Gibgezr on April 01, 2011, 02:52:24 pm
Lua is very popular in the game programming community:
http://www.lua.org/