Hi everyone!

CharlesStain

03-03-2012 17:55:52

Hi everyone,

I'm Alfredo and I'm a 24 y.o. Computer Scientist, with passion for Graphic and Games. I just want to say a big thank you for all the effort put into Mogre. I think it's a wonderful tool to get inside the Ogre world, and the passion you put is pretty remarkable. I want also make you know that I'm working my way through Mogre tutorials, implementing them in F#, and they work great :)

It would be nice to put F# code inside Tutorials, but I suspect only "strong" community contributors can accomplish that.

In any case, see you in the forum :)

Bye,
Alfredo

zarfius

03-03-2012 20:57:37

I want also make you know that I'm working my way through Mogre tutorials, implementing them in F#, and they work great :)
Always good to know that Mogre works in other .NET languages. :) I don't think there are many people around that use anything other than C#

It would be nice to put F# code inside Tutorials, but I suspect only "strong" community contributors can accomplish that.
You would probably be the most qualified person to do that ;) Maybe you could explain some of the advantages of using F# over C#?

Anyway, welcome to the community :)

CharlesStain

04-03-2012 12:12:32


You would probably be the most qualified person to do that ;) Maybe you could explain some of the advantages of using F# over C#?

Anyway, welcome to the community :)


Well, I feel not to be the right person, since I'm an F# novice as well. I can say though that F# is the newest language of the .NET family, is derived from OCaml, a functional language used most in bank trading system. F# main draws are code elegance and succinctness, due to lack of curly brackets. This is a taste of what the first tutorial looks like in F#:


open Mogre
open Mogre.TutorialFramework
open System

type SimpleApp() =
inherit BaseApplication()

override this.CreateScene() =
this.mSceneMgr.AmbientLight <- new ColourValue(1.0f, 1.0f, 1.0f)
let ent = this.mSceneMgr.CreateEntity("Head", "ogrehead.mesh")
let node = this.mSceneMgr.RootSceneNode.CreateChildSceneNode("HeadNode")
node.AttachObject(ent)

let app = new SimpleApp()
app.Go()


Seems pretty compact, isn't it? There are a lot of other features, like immutability of most data structures, which make programs easier to debug.

But I think that it's wrong to talk about "advantages" over C#: They are pretty nifty languages both :)

Cheers,
Alfredo

zarfius

04-03-2012 23:30:43

That's pretty clever.

I think the hardest part for me is getting my head into a functional space. Whenever I need to solve a programming problem I automatically start thinking in procedural terms. Although, that's changing a little with the use of LINQ and of course SQL. I've read that functional programming is much safer for multithreaded problems and makes things like bubble sorting a much smaller problem. I'm not sure if it will ever be my preferred option, but having the ability to mix it in with existing .NET applications could be very powerful.

CharlesStain

06-03-2012 11:43:36

That's pretty clever.

I think the hardest part for me is getting my head into a functional space. Whenever I need to solve a programming problem I automatically start thinking in procedural terms. Although, that's changing a little with the use of LINQ and of course SQL. I've read that functional programming is much safer for multithreaded problems and makes things like bubble sorting a much smaller problem. I'm not sure if it will ever be my preferred option, but having the ability to mix it in with existing .NET applications could be very powerful.


Yes, you heard right. F# really shines in concatenating computations and/or function application. Immutability is pretty useful in multithreading an bring to code with less errors and bugs. A thing I really appreciate is the possibility to auto infer types or to strictly sign functions to speed things up. Mutability is supported, as well as class creation and other stuff. It's a neat tool, indeed.

Bye,
A.

Aralox

13-03-2012 23:05:40

Hey Alfredo, and welcome! Mogre is a bucketload of fun.
I'm also really excited to hear about how you have it working in F# - keep at it and please post up whatever you achieve!
I've been checking out IronPython this last week, and was thinking it would be great if Mogre could be used with that, so seeing something like this is really exciting :)

Good luck!

zarfius

13-03-2012 23:22:39

I'mI've been checking out IronPython this last week, and was thinking it would be great if Mogre could be used with that, so seeing something like this is really exciting :)
I've never used Python myself but it's really cool to see .NET expanding :) This could be a great way to include scripting in game engine I guess.
http://ironpython.net/

Zonder

14-03-2012 12:15:06

You can just use any language for scripting as long as the compiler is installed (then again you can just ship the compiled scripts as well). I always use c# my self I prefer a strongly typed environment :)

Beauty

17-04-2012 14:32:52

Hi Alfredo,

nice to see an other newcomer in our forum. :D

I don't think there are many people around that use anything other than C#
On yesterday I looked to the download statistic of the Mogre binary packages, which are proposed by the Mogre tutorials (and include the tutorial framework).
The statistic is from December 2010 until now.


Language VS version Download amount

C# VS 2010 1937
C# VS 2008 886

VB VS 2010 355
VB VS 2008 141



So most of the Mogre users prefer C#.
The relation of C# to VB users is 5.7.
Or in other words: Only 15 percent of the Mogre users use Visual Basic.

I suppose the F# users are much more lesser.

Mogre tutorials, implementing them in F#, and they work great
If you like, we would publish them.
Not embedding to the wiki tutorials. I would upload them to the download section of our repository and link to it from the wiki tutorial page.
(Alternatively I could "check in" the code. This would be more easy for further updates. The same could be done for all tutorials. Or are they still inside there?)

Well if your tutorial code works well, it also can be included to the tutorial wiki pages directly.
But this needs some extra work (wiki syntax) and I want to focus to more important things (e.g. the MogreBuilder).
So if you have motivation and free-time, you can look to the wiki tags of the tutorial pages. They show you how to switch between C# and VB. In this way you could extend it for F#.

You can log-in to the Ogre wiki with your Ogre username and password.
Notice: It's not enough to have an account in the add-ons forum (this one). You need to register to the Ogre main forum.


IronPython
I'm not shure, but if I'm right, somebody made a test with IronPython Mogre (or Python-Ogre??).
At least there was a discussion about that, maybe 2 or 3 years ago. (in the Mogre forum)
Or wait ... I think the discussion was about to use Python-Ogre by C# applications with the glue of IronPython. +
One reason of the discussion was, that in the past we had Mogre update problems for many many months.
The build process wasn't documentated anywhere and the previous maintainers became inactive.
I'm happy that this issue changed. Now some people made reverse engineering to the autowrapper code and wrote documentation. Based on that other ones developed the nice tool MogreBuilder.

If somebody wants to look for Python-Mogre interaction (to have experimental fun), it would be useful to ask in the Python-Ogre forum. (It's on a seperate website.)


This could be a great way to include scripting in game engine I guess.
There is a way to use Lua scripts with Ogre (Mogre?).
Here are some links:
http://www.ogre3d.org/tikiwiki/-Lua
Perhaps there is more information in the main forum.