Jump to content
  • Advertisement

Archived

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

Suryc

Scripting info needed

This topic is 6729 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

I would like to do some scripting in my games but Im lost as to how to implement one. Does anyone know any good sites that cover this or that can give some examples?

Share this post


Link to post
Share on other sites
Advertisement
look at unreal.epicgames.com for a conceptual overview of UnrealScript (i got lots of ideas from it).
also try www.gamasutra.com and search for "script" in editorials. there''s a lot of info there.

for compiling, look at
http://iecc.com/compilers/crenshaw/

this is a set of tutorials on writing compilers (good for expression parsing info). if you can read all the articles before writing any code, you won''t have to rewrite everything a hundred times.
good luck. i''ve worked on my script engine for a while and am not happy with it yet.

crazy166

some people think i'm crazy, some people know it

Share this post


Link to post
Share on other sites
I''m currently working on a scripting language of my own. In all likelyhood it is overkill for what you would want to do (I''m using it to learn compiler design). I''ve also pretty much just figured things out on my own as I''ve gone allong. For that reason the way that I do things may not be the best way. If you want to look at it you can get the source code from my web page, Useless Code. The .zip file contains the VC++ 6 project and work space also.

Share this post


Link to post
Share on other sites
quote:
Original post by Chris F

So what are the benefits of writing a scripter?


Change game mechanics without recompiling.

Allow game/level designers to program events, properties, and routines for your levels without the programmer having to code in yet another custom routine which may only be used once.

A generally more human-readable way of describing game events, useful to non-programming members of the team.

A quicker way of describing game events.

Separation of gameplay from the engine allows the engine to be re-used with fewer code changes.

Ability to only distribute as much of the game as is necessary without removing code. Useful for... shareware distribution or beta testing for instance.


I''m sure there are more. But the above are enough for me.

Share this post


Link to post
Share on other sites
There is a good article at Gamasutra by Robert Huebner called "Adding Language to Game Engines".
It talks about how the scripting language, "COG", in Jedi Knight: Dark Forces 2 was implemented.

It doesn't delve into the low-level details of compiling (scanning, parsing, optimizing, code gen.), but it is a good reference into how scripts can be incorporated into a game.

Edited by - Aeetes on 3/14/00 11:34:22 AM

Share this post


Link to post
Share on other sites
flipcode also has a tutorial on scripting languages.

If you want a formal introduction to interpreters, I recommend Mitchell, Friendman and Wand: "Essentials of Programming Languages" and Aho, Sethi and Ulman: "Compilers Principles, Techniques and Tools."

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!