A New DSL for Games

Started by
10 comments, last by ApochPiQ 12 years, 8 months ago
Hello.

I've posted here a few weeks ago about an idea i was hammering. I've refined it and removed some unnecessary features as it wasn't really needed.

I'm a last year computer science student and this idea is for my graduation project.
It is about a new programming language for games. It will be written in C++.

This new language is a DSL. this means that it will contain features specific to games only. Screen, Texture, Sound, and Model will be data types just like int, float, and double in other languages.

The main focus will be on two things:
1- Easy to learn: I intend to have a learning curve of maximum one week. It will be very easy for starting programmers to develop good games with it.
2- Fast: this language will not be translated to executable files, but will be translated into C++ using OpenGL library for drawing, and then calling MingW compiler to build the executable.

I know many people were dreaming about this idea. But all the existing languages didn't really focus on easy to learn rather that fast. I want to create THE BEGINNERS LANGUAGE for games.

I've tested many aspects and an initial design and was ready to start this project. but an experienced friend of mine asked me this one question:
Him: Did you hear of a big Gaming Software company making a language just like yours?
Me: none that I heard of..
Him: Why?
Me: I don't know. how can I find out?
Him: post on online forums and ask more experienced programmers.[/QUOTE]

And here I'm. Really need your comments.
Advertisement
I thinking that making a new game-oriented language isn't a very useful exercise, but:
I want to create THE BEGINNERS LANGUAGE for games.
^^^ this makes it a much more useful idea wink.gif

The main competitor that comes to mind is DarkBASIC.
Really?
I don't get your point. To write a game you have to understand how a programm works and how to implement certain mechanics. There are already alot of languages out there and to be honest from a user point of view i don't really see a difference. Certain languages have some cool extra features but in the end its all about creating objects and run functions on data. What you want to create a game is an API that allows you to quickly create certain behaviours. But that is already there its called a game engine. This engine implements interfaces to quickly load/display graphics, play sounds, process user input, send data across the network, save/load data from memory. Now you can create such APIs in all avaible languages. I don't really think there is a need for another language just for games. It doesn't make any sense. If you really want to make it easy for a person to create a game then ask that person which language he/she is comfortable with and then create an API in that language.
Another way you could approach it which would really be easy for a beginner is a graphical way. basicly you have precoded stuff and you link it together.
just like with unreal engine 3 it graphical scripting interface is really simple to grasp and makes it easy for someone to implement behaviour.

Really?
I don't get your point. To write a game you have to understand how a programm works and how to implement certain mechanics. There are already alot of languages out there and to be honest from a user point of view i don't really see a difference. Certain languages have some cool extra features but in the end its all about creating objects and run functions on data. What you want to create a game is an API that allows you to quickly create certain behaviours. But that is already there its called a game engine. This engine implements interfaces to quickly load/display graphics, play sounds, process user input, send data across the network, save/load data from memory. Now you can create such APIs in all avaible languages. I don't really think there is a need for another language just for games. It doesn't make any sense. If you really want to make it easy for a person to create a game then ask that person which language he/she is comfortable with and then create an API in that language.
Another way you could approach it which would really be easy for a beginner is a graphical way. basicly you have precoded stuff and you link it together.
just like with unreal engine 3 it graphical scripting interface is really simple to grasp and makes it easy for someone to implement behaviour.


The difference between a library and a language is great.
  • if you had no experience what so ever to programming, and I gave you a language / IDE that you can learn in one week, to produce excellent 2D games (as an example), it handles all the complex stuff !
  • If I told you I will make a C++ library to handle these things, and you have to call it alone, you will spend months getting good in c++ before actually learning the features of my library.
This is not about creating stunning 3D scenes and shader effects. It is about providing the normal person a wan to make games without having experience in advanced languages. if we take DarkBasic for example (although this is not the best example), of coarse most game companies will prefer working with Direct X or Unreal Script to produce their games, but a team of two or three students will prefer DarkBasic ALOT to make a casual game during a summer vacation.

This new language is a DSL. this means that it will contain features specific to games only. Screen, Texture, Sound, and Model will be data types just like int, float, and double in other languages.

The main focus will be on two things:
1- Easy to learn: I intend to have a learning curve of maximum one week. It will be very easy for starting programmers to develop good games with it.
2- Fast: this language will not be translated to executable files, but will be translated into C++ using OpenGL library for drawing, and then calling MingW compiler to build the executable.


I'm working on the exact same thing, or at least it started out as the exact same thing and there are a few problems that I encountered with this design. First of, converting it to C++ (or C since that was my idea) forces you to program a standard library which is basically a C++ game engine (a huge task in itself), simplifying it into your language means simplifying it in C++ (or at least write the code that simplifies it) first so why not use C++? So I went of to create a scripting language, which turned out to be so low level (since the speedup that games need require you to a lot of stuff which C++ already does (pointer, classes (with inheritance) and the whole rendering library will just be extra). I then went on to write a assembler (which is more or less complete) and now I'm writing the intermediate compiler which will allow me to go [compiler written in c++] -> [intermediate compiler in my language in interpreter (in c++)] -> [assembler in my language (in interpreter in c++)], and then implement the compiler and end up with a language which is a lot slower then C++ and will never have any use in games. So I would ether go about writing a scripting language (or maybe a real programming language) if that is what you want to do (I think its fun), or write a library for C++. If you want to know more about creating a language I can really recommend the red dragon book, I'm a big fan of using free resources on the internet to learn things but when it comes to this kind of programming I have not been able to find something comparable on the internet for free (without resorting to the ancient profession of pirating, but that isn't quite the same without the boats and parrots).

chargh,

[quote name='Sudi' timestamp='1313334667' post='4848988']
Really?
I don't get your point. To write a game you have to understand how a programm works and how to implement certain mechanics. There are already alot of languages out there and to be honest from a user point of view i don't really see a difference. Certain languages have some cool extra features but in the end its all about creating objects and run functions on data. What you want to create a game is an API that allows you to quickly create certain behaviours. But that is already there its called a game engine. This engine implements interfaces to quickly load/display graphics, play sounds, process user input, send data across the network, save/load data from memory. Now you can create such APIs in all avaible languages. I don't really think there is a need for another language just for games. It doesn't make any sense. If you really want to make it easy for a person to create a game then ask that person which language he/she is comfortable with and then create an API in that language.
Another way you could approach it which would really be easy for a beginner is a graphical way. basicly you have precoded stuff and you link it together.
just like with unreal engine 3 it graphical scripting interface is really simple to grasp and makes it easy for someone to implement behaviour.


The difference between a library and a language is great.
  • if you had no experience what so ever to programming, and I gave you a language / IDE that you can learn in one week, to produce excellent 2D games (as an example), it handles all the complex stuff !
  • If I told you I will make a C++ library to handle these things, and you have to call it alone, you will spend months getting good in c++ before actually learning the features of my library.
This is not about creating stunning 3D scenes and shader effects. It is about providing the normal person a wan to make games without having experience in advanced languages. if we take DarkBasic for example (although this is not the best example), of coarse most game companies will prefer working with Direct X or Unreal Script to produce their games, but a team of two or three students will prefer DarkBasic ALOT to make a casual game during a summer vacation.
[/quote]

A language which will be easy to learn, ultra fast, and hide away all complex things. I don't see a use in a ultra fast simple language that gives you all the power you need but hides away all data structures in which you might want to use that power, I think implementing this game library in C++ and allowing it to be called from within a scripting language will give you all the power you need. GameMaker (if that's still around) is what you are looking for.

I'm working on the exact same thing, or at least it started out as the exact same thing and there are a few problems that I encountered with this design. First of, converting it to C++ (or C since that was my idea) forces you to program a standard library which is basically a C++ game engine (a huge task in itself), simplifying it into your language means simplifying it in C++ (or at least write the code that simplifies it) first so why not use C++? So I went of to create a scripting language, which turned out to be so low level (since the speedup that games need require you to a lot of stuff which C++ already does (pointer, classes (with inheritance) and the whole rendering library will just be extra). I then went on to write a assembler (which is more or less complete) and now I'm writing the intermediate compiler which will allow me to go [compiler written in c++] -> [intermediate compiler in my language in interpreter (in c++)] -> [assembler in my language (in interpreter in c++)], and then implement the compiler and end up with a language which is a lot slower then C++ and will never have any use in games. So I would ether go about writing a scripting language (or maybe a real programming language) if that is what you want to do (I think its fun), or write a library for C++. If you want to know more about creating a language I can really recommend the red dragon book, I'm a big fan of using free resources on the internet to learn things but when it comes to this kind of programming I have not been able to find something comparable on the internet for free (without resorting to the ancient profession of pirating, but that isn't quite the same without the boats and parrots).

chargh,


I'm currently reading it :D it is college course material. :D
Why are no big game companies making a language like yours?

Because:


It will be very easy for starting programmers to develop good games with it.
[/quote]

is an impossible requirement to fill.
As a research topic and final project, I don't see a problem with any combination of the ideas discussed here, aside from maintaining a scope that is doable -- you're talking about doing a game library, game engine, and programming language all together. Each is a rather large undertaking in their own right, unless you aims are simple. Consider focusing on one or two of these components.

There are several popular scripting languages that could serve as the language component of you game -- LUA, Python, Ruby, Javascript. In fact, the popular PyGame sounds similar to what you're talking about.

For engines/libraries you can look to RPG Maker, Flash and Unity for inspiration. All of these have tooling which is beginner friendly.

I think there are already tons of beginner-friendly scripting languages out there and I also think that creating an easy, game-centric language that is also fast is something of a false goal. "easy" almost always means that you hide a lot of decisions and take the general path -- this flies in the face of speed, where you make specific decisions that are not widely applicable. Also, a beginner needs ease of development and speed is a secondary decision, while a professional needs the opposite -- there is no overlap.

If it were my decision, I would concentrate on the engine/library, and use LUA for the scripting solution, or maybe JavaScript. Both are fast enough, widely-known, and would be a transferable skill for anyone that used your product. You can concentrate on making the scripting API extra friendly, and on providing some useful wysiwyg tools to further aid the beginner friendliness of the package.

throw table_exception("(? ???)? ? ???");

Why are no big game companies making a language like yours?
Because: "It will be very easy for starting programmers to develop good games with it." is an impossible requirement to fill.
Seeing as "good" is entierly subjective, then space invaders might be "good" for a beginner... Making a language library that specifically makes the development of space-invaders easier seems possible.


The reason that big game companies don't (often) produce this kind of thing is that the "beginner-programmer who is interested in making games" market isn't a great demographic to reap large profits from. They're all too busy actually making games, or making libraries that they can market to actual game developers.

This topic is closed to new replies.

Advertisement