Using of F# in a game engine

1.5k Views Asked by At

I'm currently creating a roguelike game and have already started coding in C# but have not coded much (<1000 lines) so far...

Now again, I have had a look at F# and this language seems to be very cool...I'm considering now using F# for the game engine, which, I think, will be 90% of the codeline (A roguelike has a very 'lean' ASCII-UI).

Do you think, F# would be better suited than C# concerning writing coding for procedural content generation, complex AI and game logic? Do you see any traps (apart from that I have to master the language first, of course)?

I've some concerns if F# is not just a research project and will be abandoned by Microsoft or are there statements that it is now a major .NET language?

Thanks for your input.

3

There are 3 best solutions below

2
On BEST ANSWER

I don't see any traps.

F# fully supports .NET and even though it's mainly a functional languague you can implement the OO paradigma without a problem.

Also interop with C# is very well possible, so you could even go back to C# without giving up your F# code.

And as for it's future :

It's now part of VS as a stable language, so it's going very much in the direction of being one of the main .NET languages together with VB and C#.

0
On

F# is now a full MS product, and functional programming will be increasingly important in the future, so I wouldn't worry about MS losing interest in it any time soon.

1
On

F# should be a great choice here. I suspect you'll have some interesting state machines and I've found F# to be particularly good for that.