Sign in to follow this  
DrewGreen

Design: What would you include in a game's scripting facilities?

Recommended Posts

First off, yeah the title might be a bit misleading, I just couldn't think of a better phrase. I'm not designing yet another scripting language or anything, I'm using AngelScript although the scripting language used is of no importance. Second, a bit about the game - it's a 2d tile-based scrolly platformer, with the usual assortment of traps and puzzles and so on. Again I'm not sure how much relevance this has except that it's not 3d. I want to hand off a lot of control over game logic to the scripts to keep it as moddable(?) as possible. I am stumped as to what features I *need* to make available, compared to those that would be nice. My question to you is: given complete creative control (assume the engine is or will be capable of handling anything thrown at it), what would you deem necessary or nice to have? I know there are parts that will be specific to the capabilities of the game - for instance, I plan on using scripted cutscenes, so things like getting characters to move to new locations, specifying animations to play, getting them to speak and so on. However I'm talking in terms of basic functionality - for example what would you provide/need to know in order to allow puzzles to be created with scripts, from simple has-the-player-pulled-this-lever or collected-this-item to the complex (minigames?)? Or dealing with simplistic AI? I don't have much experience here so any advice would be appreciated. I'm not asking for a detailed design, just your thoughts on essential functionality (common to most games, no matter what genre or graphics engine being used) & how you would approach the overall task? I've skimmed through the manual of an old graphic adventure game creator I used to play around with on the amiga (called GRAC 2 if anyone's interested, though I can't find an online manual) & it's given me a few ideas of the kinds of things to include, I'd just like some more opinions to shed light on the subject. Hope that made sense & wasn't too vague. If it is, I'll try and expand some more on it, although it's still in the early stages of design so it's a little difficult to describe everything in massive detail. My design document has not yet reached the stage where I have a description of every feature I want to include, but the design of the game "engine", for want of a better word, is now sufficiently far along where I can start thinking about these things. [Edited by - DrewGreen on March 4, 2006 10:00:06 PM]

Share this post


Link to post
Share on other sites
I was going through something similar recently so I have a few ideas.

You've figured out character movement, animation, speech etc. These are useful both for cutscenes and for player control. For interaction/puzzles you should think about using something like states or events. A door can check if a lever is in a "pulled" state or when the lever is pulled, an event triggers and the door can "see" it. Designing this in an abstract and reusable way can be tricky, but it provides a lot of flexibility for the scripts.

You may also need to "detect" player actions - touching a collectible item, interacting with a lever, jumping on a something, etc. Combine this with states/events and you can have some really neat puzzles/minigames.

As for AI, unless the enemies just walk around mindlessly, you need a way to get info about the current state of the world from within a script. This can be as simple as getting the player's position so the AI can try to move towards him or as complex as checking what the rest of the enemies are doing so they can act as a team.

Hope this helps :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this