About game scripting language

Started by
17 comments, last by Bu6mAn 21 years, 2 months ago
Hi! I now have a simple language in mind and would like to implement it. I want to do this simply because I want to get experience. I have not done this before though I have learnt programming for a few years and have done a few little games. So I would like to know your opinion. The language has following features(for now) --functional style --prefix notation --token seperated by space --no assignment operator provided --recursion encouraged --run on small VM --array as main data structure --no garbage collection maybe more What do you think?
Q:"Why it doesn''t work?"A:"There is a mistake."Q:"Who made that silly mistake?"A:"The one who write it."
Advertisement
writing a scripting language is no menial task. There are thousands upon thousands of lines of code that go into it.

If you have "never" done it before, you are in for a HUGE surprise! Especially doing all the things you want to do.

I would start out by doing a scripting language in Python or something similar while learning about creating a scripting language using flex and bison (or lexx and yak).
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
I once tried to implement a super-limited scripting language for a simple little game in VB. I thought all I had to do was to parse for some words in the script text (=function names) and then do something with the numbers that come right after the word (=parameters). Sounded logical to me. I ended up having tons of Select Case''s (switch statements in C), and as the game became more and more complicated, I was about ready to OD on some weird drug and broadcast my withering away live on the internet (but eventually, I didn''t do it).

Then I decided to use the VBScript Control Object that some nice guy at Microsoft had programmed for (stupid) people like me, and all my problems were solved
So my point is, if there''s no clean way to do it in VB, then there''s no possibility to do it whatsoever.
OCX Kiddie
Read Jack Crenshaw''s "Let''s Build a Compiler" on http://compilers.iecc.com. Using his methods, simple compiler (or scripting language) construction is really easy. I was surprised when I started getting into compilers I thought it was so complicated. But for a simple language it really is easy!
--------------------Nicholas Skapuraskapura.2@wright.eduhttp://skap.8k.comAIM: skap35
quote: So my point is, if there''s no clean way to do it in VB, then there''s no possibility to do it whatsoever.


lol - Yeah like VB is the only way of doing anything!

Writing a scripting language is a HUGE undertaking. I would recommend using an existing one, such as Python or Lua. There are loads of scripting languages around so try a few out and see which suits your needs best.
---------------------http://www.stodge.net
I guess I forgot to mark my post as sarcasm
Perhaps the book "Game Scripting Mastery" would help you out. I got mine ordered of amazon but it takes 1 - 2 weeks to come in :-(

Don''t let these people put you off :-) I do everything for my game including writing the engine and the artwork, sound ... what a nightmare. One minute i''m sitting with a game engine book and then next day I have a 3ds max fundamentals book LOL.
Hey Peter,

I started off on my own scripting language by following
this about two years ago.

Its been hard work, late nights, and lots of debugging. It wasn't easy, but it was well worth it.

From knowing just about nothing about compilers and VM's, in two years i've created a pretty darn good scripting language: the compiler, VM and source lever debugger. My best work yet.

My advice to you: Go for it!
If you get stuck, you're welcome to contact me. I'd like to share what I've learnt.

Good luck

EDIT: Typo in the link....

[edited by - Jaco vd Westhuizen on January 30, 2003 5:41:38 AM]
<$1,000,000 signature goes here>

This topic is closed to new replies.

Advertisement