Skip to main content
gamedev.net
🔒 Locked

General Scripting Practice

Started by Mr Gojca 7 replies 1.1k views
Original Post
Mr Gojca
Mr Gojca
Hi, I would like to hear some advice on which practice is better: - to use a scripting language and write most of the game itself in it, relying on the main game code and engine as "function providers" only, or - to use a scripting language as an external helper language only, for performing menial jobs and simplification of some tasks and future upgrades? TY!
orcfan32
orcfan32
Whichever one suits you best. Most people write their program and use a scripting language for flexibility. A scripting language is for letting the end-user modify the game to his needs/create mods/etc. Some people find it easier to write a whole game in a scripting language, others use it for small things like dynamic setups and stuff.
The best thing to do is just choose whatever you think you'd prefer, and go for it. -Promit
LorenzoGatti
LorenzoGatti
Quote:
Original post by Mr GojcaI would like to hear some advice on which practice is better:
- to use a scripting language and write most of the game itself in it, relying on the main game code and engine as "function providers" only, or
- to use a scripting language as an external helper language only, for performing menial jobs and simplification of some tasks and future upgrades?

This is a false alternative: you can both have an architecture with modules in different programming languages and offer a number of scriptable extension points.
How the program is written and support for scripted extension and customization are separate concerns; in fact you could use different languages in each case.
Omae Wa Mou Shindeiru
DvDmanDT
DvDmanDT
In response to the original poster:

If you want to create some general-purpose engine, the first alternative might be better, because you wouldn't be limited to what the engine was designed for (not nearly as much anyway). For my project, I'll use scripts to support plugins/mods (scriptable weapon behaviours for example), and there it seems better (imho) to write the engine (which will have to be quite optimized) in C++, and the plugins/mods in script.

Topic Locked

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

Sign in to reply to this topic.