The Dink Network

Reply to Re: My own game pt. 2

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
May 8th 2006, 06:54 AM
fairy.gif
Making a C-like scripting language like DinkC is very hard, Dink Smallwood is really good in this aspect.

Because I can't make something like that, the scripting language will be something much simpler: a sort of assembly like script with a stack and RPN notation. Global variables won't have names, but numbers (a bit like those of StarCraft). For example, to set the value of global variable number 25 to 200, you'd type the code:

"200 25 set"

To add the values of global variable number 36 and 78 together and store the result in local variable number 3, you'd type

"36 get 78 get add 3 lset"

For things like giving the player an item, for example to give him item number 13, you'd type "13 giveitem".

An if structure would be stack based as well, if value 0 is on the stack, the "else" part is executed, otherwise the "if" part, for example:

"14 get if { do_this } else { do_that }"

will do this if the value of global variable 14 isn't 0, otherwise it'll do that.

Do you think that would be useable?