Skip to main content
GameDev.net gamedev.net
🔒 Locked

tiny c for scripting

Started by supagu Jul 29, 2006 at 7:47 PM 1 replies 900+ views
Original Post
supagu
supagu
i've been working on a game engine of sorts, and have been trying to keep game specific code out of it. But it seems to be a problem and keeps driving me towards implmenting some sort of script system. I've looked at a few script systems and find them rather ugly to expose functions etc. I've also found Tiny C, and was thinking if i could get it to compile my scritps as a dll at load time, would be quite niftey. Any idea if this is possible? Has any one done this?
umbrae
umbrae
I think you shouldn't have any trouble with tiny c, but my 2 cents is that a more dynamic language would be better for scripting. C is an old language.

Have you had a look at the different libraries for binding things like lua or python? I've heard they are quite nice, or at least okay.
Extrarius
Extrarius
You can do it, but you need to be very carefull if you allow users to create scripts, because it would be easy to turn that into basically an arbitrary execution exploit (if you allow maps to have scripts and autodownload maps, for example).
A better solution would be to just use normal dlls compiled as one step in building the game.
Or, if you want a scripting langauge with something like C syntax, you might want to look into Pawn. I also suggest something more dynamic, though, such as Lua.
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.