I know there are a few questions floating around here on the subject, but it was hard to find anything useful to what I'm after...
I also know it will probably end up being quite the task to complete, but I really want to make a simple scripting language for gaming engines... I want to use it in C++ and my Android Java game engines... but I don't know where to start... I've tried looking for tutorials online, but alot require converting things to byte code, virtual machines and such...
I really just want to create a simple scripting language which can be read from the engine, have some simple "if/else" logic... simple functions that can be called from other scripts and so on... Maybe even simpler for early versions... I really don't know where to start, but I do know this is something I need to start studying and understanding.
If anyone could point me in the right direction and point out some links to very simple "making a simple scripting language for games" kind of tutorial or even point out some key concepts that I should look into... I'd be really thankful.
I'd prefer a minimalist C based scripting language, but I guess the specifics will come into it once I've actually learnt more about it.
Thanks for any help anyone can give.
Covers concepts of scripting languages based on languages such as Python, Perl , JavaScript , VBScript and PowerShell. Students learn how to use scripting languages for rapid prototyping, web programming, data processing and application extension.
A scripting language is a programming language that employs a high-level construct to interpret and execute one command at a time. In general, scripting languages are easier to learn and faster to code in than more structured and compiled languages such as C and C++.
You have probably already heard of PHP, Python, JavaScript and jQuery. These are just a few examples of scripting languages that power the web and plenty of applications you and millions of other Internet users execute every day.
I've tried looking for tutorials online, but alot require converting things to byte code, virtual machines and such
Yes. This is really the approach, even for a dead simple language. Executing the source code directly will be way more complicated, the way this is done is first you parse the source code and digest it into byte code, then have a virtual machine interpret the byte code.
You may want to look at existing languages to learn about their design.
This tutorial from flipcode builds a simple language and includes all the code, so it might be useful.
You can also take a look at the Lua source code.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With