   custom script
  I havn't ever tried to do something like this but I want to make my own custom scripting language for my next game engine. how would I go upon doing this and in your posts can you also put a features you would like to see in a scripting language.(Please use no profanity)Thank you.   
  I'd stay away from trying to make your own scripting engine unless its a simple command like language.Full featured procedural languages already exist in the hundreds and there's a few which have been used in games for a long time and in many commercial games.Have a look at Lua, Python or Squirrel.I've tried making my own scripting language a few times and theyre not so much difficult (well they are very difficult for someone who hasn't tried it before) as more a LOT of work, and a lot of research into how to go about it in the best way since performance is one of the big issues when using scripting languages.You'd be much better off not wasting 5 months developing your own half-OK scripting language when you could hook up Lua in an hour to your engine.   ;  However if you do persist, use something like Boost.Spirit to actually get some things done. But honestly Lua or Python are easier to integrate (see Luabind/Boost.Python) than to write your own language, even if it is entirely minimal.   ;  Objective of a niche scripting language, such as yours: to improve the speed with which you can write domain-specific behavior configuration and description.A few elementary rules:Every object in your domain should be a first class citizen. So if your scripting language serves for an engine, then engine-related concepts such as the list of files to be loaded should be dynamically manipulable at runtime.The script language should provide enough semantic analysis or rollback facilities to avoid breaking anything when it's incorrectly written. For instance, you don't want a script error to happen in the middle of a loading screen: what would you do next? This may include a syntax verification, some basic type inference, and so on.The elementary features of a scripting language, known to be productivity boosters in a scripting environment, should also be present: garbage collection, implicit types, function closures as first class citizens with the possibility for anonymous functions, sequences with a reasonably large set of primitives for manipulating them, namespacing or modules, and the ability to split into several files.As for how you would do it, you would generally write a lexer and parser (or generate them with the appropriate lexer generator and parser generator, for which you can google) to turn a stream of tokens into an abstract syntax tree, which you would then process to turn into an in-memory executable format (such as bytecode instructions for a virtual register or stack machine). The biggest difficulty would come from binding that language to your program, which must be able to notify the virtual machine that bindings exist. Even if you don't use them, look into Python and Lua, to see how they do it.   ;Quote:Original post by dkx187I havn't ever tried to do something like this but I want to make my own custom scripting language for my next game engine. how would I go upon doing this and in your posts can you also put a features you would like to see in a scripting language.(Please use no profanity)Thank you.What capabilities do you want your language to have.  A simple one could be programmed in an hour (highlevel function calls with constant parameters) or several hours (fixed if-then blocks and token objects as parameters, simple math equations with no precedence)  to much much longer (nested if-then-else blocks and variable parameters of multiple types, data structures/object attributes and a byte code compiler/interpretor with equation simplifications....)Ive done all of these -- each for different solutions.You can even do something like using C/C++ macros  to build native  C code scripts (so you dont have to build an interpretor or compiler)  to do the highlevel function  flavor)Consider how it is going to tie into your game engine and to what specific use. 