Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: C++ scripting in SFML games  (Read 6232 times)

0 Members and 1 Guest are viewing this topic.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
C++ scripting in SFML games
« 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?

JAssange

  • Full Member
  • ***
  • Posts: 104
    • View Profile
C++ scripting in SFML games
« Reply #1 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.

Svenstaro

  • Full Member
  • ***
  • Posts: 222
    • View Profile
C++ scripting in SFML games
« Reply #2 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.

christian.kelvin10

  • Newbie
  • *
  • Posts: 3
    • View Profile
c++ scripting in SFML games
« Reply #3 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.

Klaim

  • Full Member
  • ***
  • Posts: 137
    • View Profile
C++ scripting in SFML games
« Reply #4 on: March 20, 2011, 11:31:35 pm »
There are other alternatives. I know ChaiScript is made to be specifically done for C++. Falcon too is interesting, but for a big project, not for quick scripting system setup I guess.

Gibgezr

  • Newbie
  • *
  • Posts: 33
    • View Profile
C++ scripting in SFML games
« Reply #5 on: April 01, 2011, 02:52:24 pm »
Lua is very popular in the game programming community:
http://www.lua.org/