Making a script language?
I was wondering if there is a site that is dedicated to making your own script language. You see, I started a little fun RPG Development System project and I want to develop a langauge for it.
I''ve read the articles at GDN about dev ur own script language.
Any tips?
Is there any reason you dont want to embed an existing scripting language in, lua and python spring to mind as good candidates.
quote: Original post by PantherBoy
Is there any reason you dont want to embed an existing scripting language in, lua and python spring to mind as good candidates.
It''s not that I don''t want to, its just that I want to experiment. ^_^
Well, then that''s great. Experimenting makes learning.
A few years ago I wanted to do my own scripting language (mainly because there weren''t any scripting languages ready to use). But I didn''t want to start from scratch.
I searched the net for various compilers/interpreters, and found something called Small-C, which still exists in a dozen flavours out there (hint; look for the cleanest adaption). After I made it compile, I started experimenting and analysing the output.
After a while, I designed my own "virtual CPU", with it''s own instruction set, which I made the compiler translate a C-like script into (aka compiling). I learned a lot, and it was fun to see things work out. Small-C IMO is an excellent place to start. The code is small and comprehensible.
For my ucoming project, I''ll use something like Lua or Small instead. Just because I don''t have that much time anymore.
But go for it, it''s highly interesting!
References:
Let''s Build A Compiler!
Small C
2DNow - Forums, IOTDs and Articles for, and by, 2D game developers!
A few years ago I wanted to do my own scripting language (mainly because there weren''t any scripting languages ready to use). But I didn''t want to start from scratch.
I searched the net for various compilers/interpreters, and found something called Small-C, which still exists in a dozen flavours out there (hint; look for the cleanest adaption). After I made it compile, I started experimenting and analysing the output.
After a while, I designed my own "virtual CPU", with it''s own instruction set, which I made the compiler translate a C-like script into (aka compiling). I learned a lot, and it was fun to see things work out. Small-C IMO is an excellent place to start. The code is small and comprehensible.
For my ucoming project, I''ll use something like Lua or Small instead. Just because I don''t have that much time anymore.
But go for it, it''s highly interesting!
References:
Let''s Build A Compiler!
Small C
2DNow - Forums, IOTDs and Articles for, and by, 2D game developers!
In AI Game Programming Wisdom, article 10.7 is "How Not to Implement a Basic Scripting Language" by Mark Brockington n Mark Darrah. You may want to take a quick look at that.
Please don't forget to do a build vs. buy cost/benefit analysis... Especially when the "buy" is essentially zero since Lua, Python, TcL can be had for free w/... There are also reasonably large communities to run crying to when "it don't work, wtf"... Learning how to integrate someone else's scripting language w/ your own code can be just as elucidating as writing your own...
Love & Peace ^_^v
Capt. Jean-Luc Pikachu
[edited by - jeanlucpikachu on July 14, 2003 1:21:36 PM]
Please don't forget to do a build vs. buy cost/benefit analysis... Especially when the "buy" is essentially zero since Lua, Python, TcL can be had for free w/... There are also reasonably large communities to run crying to when "it don't work, wtf"... Learning how to integrate someone else's scripting language w/ your own code can be just as elucidating as writing your own...
Love & Peace ^_^v
Capt. Jean-Luc Pikachu
[edited by - jeanlucpikachu on July 14, 2003 1:21:36 PM]
Love & Peace ^_^vCapt. Jean-Luc Pikachu
There''s also a Premier Press book called "Game Scripting Mastery" I own it and find it a good read. Its equal parts "this is what you can do" and "this is what I did" which is nice because you have an implementation to study as well as other ideas for your own implementation. It will show you pretty much everything you need to know to create a C-like scripting language, an intermediate assembler, and the virtual machine that will be embedded into the host application. Its probably the best money I''ve spent on a programming book that covers such a specific (but large) topic.
Ravyne, NYN Interactive Entertainment
[My Site][My School][My Group]
Ravyne, NYN Interactive Entertainment
[My Site][My School][My Group]
throw table_exception("(? ???)? ? ???");
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement