In game compilers

K.I.L.E.R

Retarded moron
Veteran
My in game compiler works right.

So I figure people enjoy modifying games without compiling code, the same goes with me.

Here is my text file with map data:

WORLD = 4, 5, 32, 32;
FISH = 0, 0;

Basically I set the width and height of tiles as well as the rows and columns and I create an entity called "FISH" which has x and y coords of 0, 0.

If I were to provide a readme file of the types of entities and stuff, would this be enough or should I actually make a map editor?

In my previous game which I've made in C#, it has a nice and functional editor, but I enjoy trying the Doom 3 Carmack approach.
 
Hmm, I would hardly call that a compiler. More a simple text parser.

If you are really wanting a proper flexible in game language. Either try writing one with lex and yacc (or flex and bison depending on what flavour you use). Or try an already existing scripting language that you can embed in your game engine.

I recently became aware of Lua. I had a quick look over it at the weekend. As a language it seems pretty easy and powerful, and i got it to compile under Visual Studio .Net quite easily.

I beleive quite a few game developers use it for scriptable AI etc.

CC
 
It does more, like adding and storing variables. I just haven't implemented that yet but I know how to do it.

You think an existing library is better for learning?


Captain Chickenpants said:
Hmm, I would hardly call that a compiler. More a simple text parser.

If you are really wanting a proper flexible in game language. Either try writing one with lex and yacc (or flex and bison depending on what flavour you use). Or try an already existing scripting language that you can embed in your game engine.

I recently became aware of Lua. I had a quick look over it at the weekend. As a language it seems pretty easy and powerful, and i got it to compile under Visual Studio .Net quite easily.

I beleive quite a few game developers use it for scriptable AI etc.

CC
 
K.I.L.E.R said:
It does more, like adding and storing variables. I just haven't implemented that yet but I know how to do it.

You think an existing library is better for learning?
Depends what you are wanting to learn. If you want to learn compilers then create your own. If you want a skill that is transferable to the games industry (which I have the impression you want to head towards) then look at using the tools that they use. There will be benefits to taking either route it simply depends on what you want to get out of them. If you decide to stick with rolling your own compiler it is definatley worth checking out lex and yacc.

CC
 
Back
Top