Jump to content
  • Advertisement
Sign in to follow this  
xen2

LLVM and game development

This topic is 3989 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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 ?

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!