How did you *start* learning to write a scripting engine? I want to make one for an rpg and the tuts I have readed sofar are abit fuzzy.
Printable View
How did you *start* learning to write a scripting engine? I want to make one for an rpg and the tuts I have readed sofar are abit fuzzy.
There are some scripting engine tutorials at www.gamedev.net if you look through the articles. I think there is something in the "Game Programming Genesis" series of articles, part IV.
I learned by doing. I sat down, was bored, and said "Im gonna write a scripting language" and came out with this "thing" that does what i wanted. look around here for something on scripting (like, search this forum) and youll find what i used. download the zip, and if you think itll do what you want, ill give you the source... make sure you get the newest copy though (its got a manual, etc).
Z.
I just pushed the previously mentioned post to the top, so it should be an easy find =).
Z.
Although is doesnt work (get an error or something) I readed the manual and it seems like its almost exactly what I want/need :). Is there a way I can talk to you? I have AIM, MSN, ICQ :)
Just keep posting here, I check this at least once a day. Ive
forgotten my AIM names (most of them), and my ICQ number too =). If
you need to, just send me an email, too. thats
[email protected]. I check that a few times a day as well.
I have a feeling the reason you got an error was
because you didnt register the dll =). Anyway, if you have any questions, just ask away.
Z.
Actually you don't need to. You can use VBscript with microsoft scripting control.
MS Scripting control is a PAIN IN THE ***. Especially for debugging. Sure, its nice that it lets you act direcly on the object, but my god it gets annoying after the second or third time the control crashes your app because you added an object twice!
Sorry im ranting, but its so very true!
Z.
You just don't know how to use it, i've never crashed my programs with the scripting control, and that's exactly the feature that makes it useful. You can crash VB if you want to, does that make it a pain in the ass to use?
Ok, ok: I made my own scripting language and it works, so maybe I can help you. The game I've made it for is still under development, and I'm probably not gonna release the code - but anyway, I can give you some tips.
You should read the article about scripting at http://blackhole.thenexus.bc.ca/ . It's very good but only lacks one thing: you can't use nested blocks! I've solved that problem myself, all you have to do is something like: when you're running a line that is an IF, if the condition is true, continue running; if not, jump immediately to the corresponding END IF. With some modifications that applies to LOOPs and FORs and all ;)
The only tricky thing is which END IF corresponds to each IF... the simpliest way is to make of it a parameter of the IF (so you know where to jump when it's not true), but you could write an app to automatically format those parameters, a "compiler" :)
Hey Jotaf, thx for that link!
I downloaded the scripting engine from that site and it is sooo easy to use and add/remove functions :). Thanks.
Also thanks to the others for their usefull help ^_^
Jesus jotaf ; we should give you a medal or something :)
Hehe, no need to do that thank you :)
I won't release the source code of my game, but I'll probably release the Script Editor I made for it... does anyone here remember the Trigger Editor for Starcraft, with just Point-And-Click? ;)