Lets talk about script...kiddies

Started by
5 comments, last by Xipe66 19 years, 5 months ago
hiya people Ok, i have the bare bones of my engine almost sorted. We are talking the essentials in place and thats about it. Now, i'm about to go into designing the implementation of a scripting language. I want to write it basically from the ground up and take influence from many different languages. But this is not my question. When looking at a game engine and a game you don't really (unless you look at the source) see how much of it is actual script and how much of it is raw metal-against-metal engine work. Ok, this is not my aspiration since i don't have several million or a team, but just for example: the god-like Unreal Engine. When looking at the Unreal engine; how much of the actual game is script and how much is the engine. What i'm trying to get at is how flexibile, even how basic, does the engine have to be. Does the unreal engine, for instance, at the raw level, just parse the scripts and render the levels/models/animation etc. but the glossy finish (ie. with unreal tournament's game modes) built using the scripting language from scratch. If so, how powerful does the scripting language have to be in your opinion. With the unreal engine, i have gathered (looking at UScript) its almost a high level object orientated languages based on C++. Does this mean the engine is at a basic level with a hugely complex script interpretor. Thanks for any help [EDIT: I do hope I have the right forum for this. I decided against the actual script language forum since it also involved the engine in the subject matter]
Advertisement
Hi,

I don't know about the Unreal engine - but I know that for example the FarCry engine uses an /insane/ amount of scripting. So much that you you can forget about C++ when modding. If you would like some idea at how that engine uses scripting search this forum for threads about it. It contains some threads where one of the guys behind FarCry scripting explains how it works etc. Some extremely valuable information.
"We confess our little faults to persuade people that we have no large ones." -Francois de La Rochefoucauld (1613 - 1680). | My blog
If you've played with the warcraft 3 scripting any, I think you'd quickly develop a feel for how powerful the scripting should be. The reason wc3 is a good example is because the scripting isn't quite powerful enough. For example, the game is an RTS, but in a normal script you can't modify some very simple things like the unit cost or even read in the unit cost without some EXTREME hacking around.

You should be able to do all the logic you want in the scripting engine, which means you need to be able to get all the input you'd need to make a decision and then have the proper constructs to make that decisions and carry out the results like opening a door, moving a person, or triggering a raid on a town depending on the kind of game
"Walk not the trodden path, for it has borne it's burden." -John, Flying Monk
A fantastic scripting engine would rock, however, you have to balance between power and complexity. I dont mean complexity to use, but to make.

War3's scripting engine was pretty good. the deeper i got, i found some limitation, but i usually found a way around them.

But to make a scripting engine that has triggers for EVERYTHING is pretty unrealistic. Who would want to set up the triggers for 12,000 items, from doors to windows, chests, trees, wind, vehicles, vehicle subparts, etc. What if i want to be able to take a tire off a car and throw it through the window of a shop? Id need triggers for the wheel (so the car would react by tiltin, or etc), for the car (so now it cant drive), for the shop window (so the show owner could be triggered to respond), for the shop owner, etc etc.

It depends on how much depth you want the GAME to be.

Maybe you could make a scripting engine that is upgradable? For example, if someone wants to mod the game, and they need a trigger event and response event for item XXX, then they can write it in.
Im losing the popularity contest. $rating --;
Isn't he talking about more basic level than that?

Like take Quake for instance, it had it's own dialect of C in which most of the game was written. Quake was basically a graphics engine with a built-in script parser.

Those scripts that made up the game were far removed from the basic scripting that players could do in their cfg-files.

I'm guessing the Unreal-engine works the same way.

Smart ass answer to your question though: If you need to ask, then you probably don't know what to do or what the benefit would be if you did. I.e. you haven't thought this through, you've researched way too little and you probably have too little knowledge to pull this off anyways.
Actually I have written quite a few scripting languages based on a C++ structure for applications I have written for universities. I'm sorry that you feel that inquiring on other engines before entering design time is a sign that I am out of my depth.
Thanks for all the comments (bar the last part of the last one ;) ).
I didn't mean to put you down (really!). But if you understood the merits and drawbacks and already knew what you wanted your engine to do then you wouldn't have to ask such a general question.

Try asking more specific questions in context of the engine you're visualizing and more specific help might become available to you.

There are very specific circumstances where doing this sort of engine is of any use/merit, and people replying not even knowing what kind of engine you're writing kind of makes it hard for them to answer with anything else than: if you don't know why or how, then don't.

Once you have the why and the how, we can get into detailed discussions on certain aspects on the why's and the how's.

This topic is closed to new replies.

Advertisement