Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

This question already has an answer here:

Senior programmer who has been coding in a functional style for years. I want to make an attempt on the indie games market, but I don't find any good, big platform that provides a good way to code using a functional style. And the fact Unity3D pretty much domains that market, I'm pretty much limited to C#. I wonder if there is another way?

share|improve this question
    
Is there no OpenGL setup in .NET that you could use F# with? –  Patrick Hughes Jul 5 '13 at 3:10
    
Also gamedev.stackexchange.com/questions/1774/… as further material. –  Sean Middleditch Jul 5 '13 at 4:01
1  
Also also, 1.7 seconds of Googling: haskell.org/haskellwiki/Game_Development. Probably linked in one or both of those GDSE articles I linked. –  Sean Middleditch Jul 5 '13 at 4:02
add comment

marked as duplicate by Sean Middleditch, bobobobo, Seth Battin, Byte56 Jul 5 '13 at 13:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

3 Answers

F# works as well as C# with libraries like OpenTK and XNA.

I have not used Unity, but it seems that you can import external dlls into Unity, so you could write your core logic in F# dlls and use those classes from within Unity as well.

share|improve this answer
add comment

What about OpenGL for Haskell?

share|improve this answer
1  
This is better suited as a comment. –  Vaughan Hilts Jul 5 '13 at 3:30
    
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. –  Vaughan Hilts Jul 5 '13 at 3:30
1  
@VaughanHilts It's not critique nor clarification request. It is an answer; it is an option for functional programmer who wants to create games. –  sm4 Jul 5 '13 at 4:08
1  
While it does provide an answer to the question, it only does so because it was a bad question that solicits these types of answers. And answering such questions promotes them as OK, since the OP still gets what they want, at the expense of the quality of the site. –  Byte56 Jul 11 '13 at 21:53
    
@Byte56 Good point. Thanks. –  sm4 Jul 12 '13 at 14:12
add comment

What about using JavaScript, there are quite a few JavaScript Game engines out there. And Javascript is functional.

share|improve this answer
    
JavaScript can be used in a functional-ish manner, but is no more functional than C# is at its core; the opposite, in fact. –  Sean Middleditch Jul 5 '13 at 3:56
    
@SeanMiddleditch I wouldn't be so quick to say so. Function objects pervade most JS api's. The fact that JS provides function objects is a pretty big step. See this SO discussion. –  bobobobo Jul 5 '13 at 4:40
    
@bobobobo Also Java 8 brings functional programming to procedural language, but it won't be an option for functional programmer. –  sm4 Jul 5 '13 at 4:46
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.