4

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.

Wouter Lievens
  • 4,019
  • 5
  • 41
  • 66
Marco
  • 2,189
  • 5
  • 25
  • 44

3 Answers3

5

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#.

Peter
  • 47,963
  • 46
  • 132
  • 181
  • I'm currently trying some F# coming from a C++/C# background. Confusion++ – Nick Bedford Apr 28 '11 at 03:30
  • F's for functional. It's a different paradigma. Learn recursion, tail recursion, list comprehension (is used a lot, dont iterate, just act on all elements of a list/set) and functions (without side effects), chaining and you're on your way :-). – Peter Apr 28 '11 at 08:59
3

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.

Robin Green
  • 32,079
  • 16
  • 104
  • 187
2

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.

J D
  • 48,105
  • 13
  • 171
  • 274
  • yeah, it needs some complex algorithms...not only AI but also for procedural content generation...I've started learning F# and until now, I really like the language :) – Marco Apr 24 '11 at 18:04