Functional Programming

Started by
5 comments, last by Sneftel 16 years, 2 months ago
Hey everyone. I need to do a project for a class using Microsoft F# which is a functional programming language. I'd like to build some kind of tool that could be used in game creation. Problem is, the only thing I can think of that relates to game creation is some type of compiler and the only thing I can think of close to functional programming is a calculator. Anyone have any ideas as to any other project ideas I could try? I would appreciate anything. (Btw, currently I'm thinking of doing some kind of script compiler in it (custom scripts))

=============================RhinoXNA - Easily start building 2D games in XNA!Projects

Advertisement
Functional programming is not limited in the types of programs it can create. Anything you can make in C#, you can make in F#.
Answered another way, all(most?) programming languages are "Turing Complete". This means that, logically, all languages are equivalent in terms of what you can compute with them. The difference is simply that certain things are easier to do in one language than another.

-me
There's all sorts of non-compiler game programming tools. Examples include: custom resource tools (resource packages, combining textures), custom editors (GUI front ends for XML data, conversation editors, syntax highlighting editor for a non-conventional scripting language), map editors, sprite editors, etc., etc. The number of steps between zero and a finished game is pretty big and coding is only a small fraction of them.
Something that functional languages are rather suited for is ray tracers. It might not be a game creation tool but it is game related.
After cruising some F# forums I realized F# could potentially do what C# can. I think I forgot to mention one of the focuses of the project is to build an application that shows the features of F# and why it is best suited for that type of program. Granted, you could build the same app in 100 languages and each have why it's best in that language and why it's bad in that language.

Spearhawk, I have seen some examples online of the raytracer but thanks for the comment about it. I've seen some examples using DirectX and such as well (again just proving what everyone else said that if it's code-able in C# it's probably doable in F#).

=============================RhinoXNA - Easily start building 2D games in XNA!Projects

I'm of the opinion that virtually any decently complicated application can demonstrate the advantages of functional programming. But some types will be much easier than others for the beginning functional programmer.

Might I suggest a radiosity-based lightmap generator? The generation of lightmaps is, at its core, a recursive operation; it's an actually useful tool in game development; and it's not particularly difficult, once you get geometry loading done. Also, it can be made as complex as you want with spatial culling structures and the like.

This topic is closed to new replies.

Advertisement