Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411428 Posts in 69363 Topics- by 58416 Members - Latest Member: JamesAGreen

April 19, 2024, 12:11:05 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)How difficult would it be to make a more GUI than 3D driven, F# game engine?
Pages: [1]
Print
Author Topic: How difficult would it be to make a more GUI than 3D driven, F# game engine?  (Read 893 times)
SouldomainTM
Level 0
***


"In Science We Trust"


View Profile
« on: February 08, 2017, 07:46:06 AM »

I was thinking about making my own custom game engine for a game that is more GUI driven than 3D. I have made once up on a time, a custom game engine for some fancy looking memory game. It was written in C. And this time I would like to use F#. The game I'm intending to make is an Intelligence and Hacking simulator.

It's been a very long time since that memory game. I didn't even measure the time it took me to make it. It may be a bad comparison, but I do know that StarCraft 1 was made by a single C++ programmer over the course of ~6 month.

I would be willing to invest ~2 month into custom engine and editor.
Logged

SouldomainTM
Level 0
***


"In Science We Trust"


View Profile
« Reply #1 on: February 08, 2017, 09:18:40 AM »

I think it should be doable within 2 month. For the 3D part I wouldn't need path finding, collision, particles. It's uncertain whether I would require networking, though.
Logged

SouldomainTM
Level 0
***


"In Science We Trust"


View Profile
« Reply #2 on: February 08, 2017, 09:38:39 AM »

By the way, who knows F# anyways?

C# is quite dominating over C++ these days, and that's what I always wanted. But only because I didn't think that there could be a programming language significantly better than C#. Judged by what I learned about F# so far. If I had to go back to C#. It would feel like a downgrade to me.

For those who don't know F#, just like C#, it runs on CLR so is part of the .Net Family. The communication between C# assemblies and F# assemblies is quite smooth. Especially since F# also supports OOP. I already had a look around for F# OpenGL. But apparently if I don't do my own interop, I will have to use OpenTK which was designed for C#. So there would be some OOP inside my source instead being fully functional programming.
Logged

_glitch
Guest
« Reply #3 on: February 08, 2017, 10:12:37 AM »

You could say that F# is a edit: more function orientated C#, where C# is edit: more object orientated
« Last Edit: February 08, 2017, 10:49:51 AM by Froschlaich » Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #4 on: February 09, 2017, 05:52:52 PM »

I love f#. It's been so fun learning it and finding out that certain things like parsers and data transformation can be done so much more cleanly in a functional fashion. It's actually really changed the way I write c# now. I never realized how often I was essentially rolling my own error prone versions of Where/Fold/Select/etc via loops etc. Anecdotally I feel like I'm using at least 50% less loops these days.

F# works with monogame which should help you get going a lot faster than OpenTK. You have to kind of break out of the functional style to get the ball rolling but that's one of the great things about F#. It's functional by default but if you need you can make objects, mutable data etc.

It sounds like your game is somewhat event based and not super reliant on constantly updating values every frame so it might work out well. I'd probably shy away from doing something like a platformer in F# since you'd have to break out of a functional style so often it might to begin to not be worth it.

Here's a template for a monogame fsharp project.

https://github.com/romanov/monogame-fsharp/blob/master/Game1/Game1.fs
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic