🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

(?) about scripting language...

Started by
6 comments, last by snyp 20 years, 2 months ago
I am going to use scripting in my games... finally... and I was wondering if I should make my own scripting language... I have the resources and everything but should I take the time... will it be worth it? Actual Linux peguins were harmed in the making of this message.
Actual Linux penguins were harmed in the making of this message.
Advertisement
This question crops up a lot.

The basics of it is:

- Will only you or a small team be developing your project? Creating a ''new'' language may be off putting to developers.

- Is the journey more important than the goal? If not, you may want to use a pre-built language

- Are you willing to sacrifice certain functionality available to some languages that may be out of your scope? If yes, go ahead and make your language

- Do you need ''total'' control of your scripting language, right down to the most basic level? If yes, you will need to create your own

- Do you have a desire to create a ''new'' language or modify the source of existing languages to suit your goals - bear in mind that some languages like LUA can be modified totally with no fees/etc so you could use the LUA code as a base for example

It''s totally up to you.
hold on lua's oss?? jeez hook me up whats the site?
this would help me alot, and if not then it would atleast give me examples of more complex functionality... thx :-D

Actual Linux peguins were harmed in the making of this message.

[edited by - snyp on April 6, 2004 9:12:02 PM]
Actual Linux penguins were harmed in the making of this message.
Downgraded hit it on the head.

Learning about parsers, lexers and compilers - as well as how a stack machine works, etc. is a VERY interesting subject. In a perfect world, I''d recommend writing your own just for the very valuable learning experinece.

However, in the REAL world, I''d recommend something like Lua or Python.

I''ve been using Lua for a year and couldn''t be happier. It took less than a day to integrate and I keep leveraging it more and more. Essentially, my game engine is now just an OS for LUA.

Even high-end games (Far Cry) are using languages like LUA, so it''s not "uncool" to go that route :-)
quote: Original post by snyp
hold on lua''s oss?? jeez hook me up whats the site?


Lua.org

You may want to look into Wrappers. Do a google search for LUA tutorials.

Bear in mind that linking LUA to C++ can be a real pain in the ass.

There''s also SpiderMonkey - Mozilla''s Open Source implementation of Javascript which is more C++ like, having classes and such.
I did the design and implementation of the Far Cry scripting achitecture. Without that Far cry wouldn''t have all the dynamic assets it has, The game logic is 100% in lua(700~ scripts).
Also take a look what writing a mod means, it is matter of days after you got how the sytem works.
Try to archieve that without a scripting lang.
Obviusly requires some planning.

ciao
Alberto

-----------------------------
The programming language Squirrel
http://squirrel.sourceforge.net
-----------------------------The programming language Squirrelhttp://www.squirrel-lang.org
I forgot I strongly suggest to use a existing language, coding and testing a language is a huge task. Expecially testing it.

-----------------------------
The programming language Squirrel
http://squirrel.sourceforge.net
-----------------------------The programming language Squirrelhttp://www.squirrel-lang.org
I just posted a blog entry about interfacing Lua and QT. The same principle applies to any type of C++ class. Perhaps it will be useful to someone: Interfacing Lua and QT

This topic is closed to new replies.

Advertisement