scripting language with c++ like syntax?

Started by
35 comments, last by HansDampf 17 years, 11 months ago
I didn t expect that my thread causes such a discussion.


I favor a c++ like syntax because I am coding with C++ for ages now.
The reason I want to integrate a scripting language into my 2 latest projects( FPS engine , 3D Editor) is that I want to add some customizeability to it.

In my upcoming 3d editor I aim for user scripted entities that allow the automated creation of usually complex buildings or building parts

One example:
It takes a lot of time to create a decent looking indoor start with a brush based editing environment.
Writing a script that can be reused and that creates the stairs within a few seconds spares a lot of time.

In the end you shall be able to script entire buildings with just some parameters.
The user will even be able to create a customized popup dialog so you can alter the building parameters ....


In my fps engine I plan to use the scripts to handle gameplay and other things that should be part of the executeable like menu response ....

http://www.8ung.at/basiror/theironcross.html
Advertisement
Quote:Original post by Anonymous Poster
What I would really like to have is a 100% C++ compliant script parser that allows
The holy grail here would be a language with fast iteration during development, that can compile to native for speed, and is cross platform. Since most programmers in the games business know C++, and the native compilers are already there, a fully C++ compliant scripting language would be perfect.


Such a language exists today: C# (close enough to C++ for C++ programmers to quickly get up to speed). Near instant compile time, almost as fast as C++ (C++ can still be used via .dll), cross platform, can also be dynamically compiled and run as a scripting language.

Quote:Original post by Anonymous Poster
What I would really like to have is a 100% C++ compliant script parser that allows for fast iteration times on large projects, but can still be compiled to native for speed. In my experience, although scripting languages may be created for designers, they end up being complicated enough that programmers still do the work, yet they come with the speed penalty and inflexibility associated with a scripting language.

The reason they're used is because while you can compile scripts in 5 seconds, if you change a C++ header file you have to wait 20-40 minutes for the code to recompile on a large project. So, development continues in script despite the fact that it is many times slower than native C++. In effect half of the processing power available may be tossed to unnecessary script overhead just to make the game easier to run.

The holy grail here would be a language with fast iteration during development, that can compile to native for speed, and is cross platform. Since most programmers in the games business know C++, and the native compilers are already there, a fully C++ compliant scripting language would be perfect.


You may also want to look into the Ch interpreter.

Quote:Original post by John Schultz
Quote:Original post by Anonymous Poster
What I would really like to have is a 100% C++ compliant script parser that allows
The holy grail here would be a language with fast iteration during development, that can compile to native for speed, and is cross platform. Since most programmers in the games business know C++, and the native compilers are already there, a fully C++ compliant scripting language would be perfect.


Such a language exists today: C# (close enough to C++ for C++ programmers to quickly get up to speed). Near instant compile time, almost as fast as C++ (C++ can still be used via .dll), cross platform, can also be dynamically compiled and run as a scripting language.


If C# worked with non MS platforms (ie. PS3) it would probably be widely used.
Quote:Original post by John Schultz
Quote:Original post by Anonymous Poster
What I would really like to have is a 100% C++ compliant script parser that allows
The holy grail here would be a language with fast iteration during development, that can compile to native for speed, and is cross platform. Since most programmers in the games business know C++, and the native compilers are already there, a fully C++ compliant scripting language would be perfect.


Such a language exists today: C# (close enough to C++ for C++ programmers to quickly get up to speed). Near instant compile time, almost as fast as C++ (C++ can still be used via .dll), cross platform, can also be dynamically compiled and run as a scripting language.


If C# worked with non MS platforms (ie. PS3) it would probably be widely used.
Quote:Original post by Anonymous Poster
Quote:Original post by John Schultz
Quote:Original post by Anonymous Poster
What I would really like to have is a 100% C++ compliant script parser that allows
The holy grail here would be a language with fast iteration during development, that can compile to native for speed, and is cross platform. Since most programmers in the games business know C++, and the native compilers are already there, a fully C++ compliant scripting language would be perfect.


Such a language exists today: C# (close enough to C++ for C++ programmers to quickly get up to speed). Near instant compile time, almost as fast as C++ (C++ can still be used via .dll), cross platform, can also be dynamically compiled and run as a scripting language.


If C# worked with non MS platforms (ie. PS3) it would probably be widely used.


Compilers for PS3 should be able to compile Mono or dotGNU (gcc compatible): C# should run OK on PS3 (and Wii). Not clear about memory requirements; might also be able to run on PSP.
Quote:Original post by Anonymous Poster
What I would really like to have is a 100% C++ compliant script parser that allows for fast iteration times on large projects, but can still be compiled to native for speed. In my experience, although scripting languages may be created for designers, they end up being complicated enough that programmers still do the work, yet they come with the speed penalty and inflexibility associated with a scripting language.

The reason they're used is because while you can compile scripts in 5 seconds, if you change a C++ header file you have to wait 20-40 minutes for the code to recompile on a large project. So, development continues in script despite the fact that it is many times slower than native C++. In effect half of the processing power available may be tossed to unnecessary script overhead just to make the game easier to run.

The holy grail here would be a language with fast iteration during development, that can compile to native for speed, and is cross platform. Since most programmers in the games business know C++, and the native compilers are already there, a fully C++ compliant scripting language would be perfect.


root might be the thing you search for. Not 100% compatible, but written in C++ and easily compiled into C++ for that.

This topic is closed to new replies.

Advertisement