Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Peter19852001

About game scripting language

This topic is 5652 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!