Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I want to give players the ability to create and share bullet patterns for a shoot'em up.

The pattern scripts should have all the common programming stuff like loops, if/else, variables, and so on.

But in the end, I just want them to call a "spawn bullet at X, Y with Z angle and A speed" in the C++ game.

To spawn a circle of bullets, the user should only have to write a script with a for loop that goes from 0 to 360 and calls the spawn bullet function on every iteration.

I tried integrating AngelScript, but I am getting nowhere - it looks way to complex for a simple task like this one.

Is there an easy to integrate library that can solve my problem? Thanks.

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Embedding scripting is never easy.

Squirrel or Lua might be simpler as long you don't plan to use classes. For example you probably won't need a class for the bullets, a function SpawnBullet(x, y, angle, speed) would probably be enough. (If you need classes AngelScript takes quite a bit of work from your shoulders because it was designed to interact with C++ classes in the first case.)

share|improve this answer
    
In the end, I decided to go with Lua, using LuaWrapper to make the syntax prettier. code.google.com/p/luawrapper –  Vittorio Romeo Jun 11 '13 at 14:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.