LLVM and game development

Started by
2 comments, last by xen2 16 years, 9 months ago
I was wondering if any of you use or is considering to use LLVM (http://llvm.org/) for game development ? I think it could be a great alternative to quickly build an adapted language for game development (close to C# with interface, reflection, but also auto-generated bindings, very advanced optimization, vectorization, custom allocation scheme that could be changed very easily, free scripting solution, or whatever you want from a language). And you still have the possibility to compile to native code and port it to console (which isn't possible with Mono). JIT has proven very powerful and really seems to be the future (lot of optimization could only be discovered at runtime), and using LLVM would remove the few problems C# had (portability on console, control over memory collection, etc...). And it would probably be possible to stay compatible with C# in order to ease the transition. By the way, OpenGL on Leopard 10.5 will use LLVM in order to optimize static branching at runtime, and for vertex shaders. Any thoughts on that ?
-----Entropia 3D Engine Project, a next-gen and flexible C# 3D Engine under GPL.
Advertisement
I think LLVM is very cool, especially with the clang front-end and the msil back-end. It's going to be a big part of Apple moving away from GNU, which is something I encourage so I can get much nicer code sense and refactoring tools in Xcode. [smile]
I've been looking at it quite a bit myself, for the exact same purpose. It's definitely very promising. I'm not sure porting script code to native machine code for a modern console would be as easy as setting it to output PowerPC code and letting it rip, but it's probably better than starting from scratch. Doing the compiling offline would save the overhead of having to have LLVM's JIT taking up memory, but then you lose some of the flexibility of being able to dynamically load bytecode (e.g. script attached to level downloads.)

It's still a lot of work to develop a scripting language, and I don't know how general you could make it before you start making decisions that the programmers would want control over depending on the individual game's requirements, but it's certainly something that could use exploring.

Another thing you can do with this is you can embed information so save/load, networking, and editing can be more automatic, like Unrealscript.
Well, right now I'm really considering starting an implementation, with a syntax close to C#. I will use LLVM and boost::spirit.

Would there be anybody interested in joining up the project ?
Any features you would like ?
Don't hesitate to share your mind on the project.

PS: Before it pops up, I would like to underline it's not about reinventing the wheel (I would not use LLVM if it was the case anyway ;p), it's more about having something that better fits our needs. But if you think the project is really useless, don't hesitate to explain why.
-----Entropia 3D Engine Project, a next-gen and flexible C# 3D Engine under GPL.

This topic is closed to new replies.

Advertisement