Skip to main content
gamedev.net
🔒 Locked

Scripting language usage

Started by Nairou Nov 22, 2003 at 3:41 PM 0 replies 450+ views
Original Post
Nairou
Nairou
I''m curious how extensively the people here use scripting languages within their game or engine. By this I mean languages that can be easily edited or modded, as opposed to the C++ or whatever that the actual engine is made of. My only real experience in this regard is with the Quake3 engine, which contains a core engine, but all gameplay is done by "script", easily replacable C programs that compile to byte-code. This allows for a lot of customization, and things like Total Conversions, but I''m sure there are risks involved as well, and speed issues. The same seems to be true for the Unreal engine, but on a more sophisticated level, using a very complex script language and allowing multiple mods to co-exist. For my game engine I''m still undecided how much I should code into the engine, and how much I should expose through a script language and just leave for the game to implement. What are the different levels of scripting that people use? I don''t like the idea of creating a minimal engine skeleton and leaving it to the script to do the entire game, but I also don''t want to make the engine hard-coded to a single gametype. I''m just looking for examples to get a bigger impression of the possibilities.
Sneftel
Sneftel
My game engine has been designed with scripting in mind from day one. The issue of performance versus flexibility through scripting is something I had to confront really early on.

The trick, I think, is to make it _possible_ to export functionality to the scripting system at as low a level as possible without sacrificing functionality. For my engine, the inflection point was individual vertices and polygons (never exposed in scripts) versus objects (always exposed by scripts). Then you turn around and extend the scripting language with higher levels of functionality that would be unacceptably slow in scripting languages. And don''t be afraid to code stuff in scripting _first_, and then reimplement it in C++ if it turns out to be too slow.

Topic Locked

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

Sign in to reply to this topic.