As part of the workshop I am preparing to run on a bunch of places in North America, I created a small clone of Breakout and just ported it to F#. I am going to be explaining a little about how the engine works and that will be intertwined with an (hopefully) fun intro to F#.
- A 2D game engine that comes with an extensible visual editor.
- OSS (MIT license).
- Written on C# and OpenTK.
- the architecture is built around a plugin system.
Follow the link for Adam’s getting started.
In the previous post I showed how to create components in Duality, so I started of with one the simplest component, ScoreComponent, that component looked like this
When converting to F# it looks pretty similar, at least initially
The method OnUpdate could be improved. A first iteration would look like:
This is nice but this pattern(?), do something if the component exist, is rather common and it would be nice to turn this into an option type.
We will continue in the next post :D
Fun and games FTW!!
OT: Best of luck to all the people involved in Minecraft and this transition to Microsoft. I can emphatize with where @notch is coming from.