lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


If I had the time, this is all predicated on time, which I have nill.  We
have like a short
time to do a game, we don't have much staff to work this game, we have most
of an engine
I have little to no gameplay, I wanted to use lua to help get gameplay fast,
then offload
the scripting to someone else who can read a sample script I provide, and be
good to
add other things, and basically bug me about exposing more functions, I
don't have the
time to read lua manual 45 times, and sit back and drink a beer, and read it
again, this isn't
rehab, what I want to do is so basic, it blows my mind.

what I want in simple form.

player 1 uses player1.lua
in the script there are 3 functions, init, proc, exit

player 2 uses player2.lua
in the script there are 3 functions, init, proc, exit

player3 uses player3.lua
in the script there are 3 functions, init, proc, exit

etc etc, get it?

init is called once in my game init.. it does whatever it needs to do, to
set up the player.

proc is called once per game frame, until game end, or player die etc.

exit is called once on exit

I would guess I would need co-routines, or muliple lua_states, how to I set
them up, THE BIG THING how do I interface them with my GAME to make them
work, you know how much time I have spent reading nothing but .lua files, I
don't care about how they work inside lua, I want to know how they work
together with my app, there is plenty of good documents on the scripting
langauge itself, I can figure that out, but there is little or no
documentation on interfacing it with your app.