Not logged inGosu Forums
Forum back to Help Search Register Login
Up Topic Gosu / Extending Gosu / gosu.NET
- - By Jwosty Date 2012-10-28 02:38
Heheh, here's a thought: how about a Gosu port for the .NET platform? That way it could run on all the Microsoft products (Windows, Xbox 360, Windows Phone) and anything that Mono supports (OS X, IOS, Linux, Android [I think]). Just food for thought.

EDIT: That would also mean it could be used from any other .NET Runtime language, like C#, J, and F#!
Parent - By oli.obk Date 2012-10-28 08:42
since you can use native c++ libs in mono, i suggest doing just that + some C# wrapping
Parent - - By Dahrkael Date 2012-10-31 14:38
that would mean to rewrite the whole library in .net, so not a good idea.
Parent - - By oli.obk Date 2012-11-02 22:11
not true, do you think ruby-gosu is a complete rewrite in ruby?
rewriting all of gosu would not only be riddiculous it would run very slowly
Parent - - By Jwosty Date 2012-11-03 14:45
What makes you say that it would run very slowly? (not that I necessarily disagree)
Parent - By oli.obk Date 2012-11-03 20:02
imagine the whole draw queue and drawops of gosu, which are currently written in c++ and compiled natively, implemented in c#.
Your goal is 60fps. that means 16ms per frame. On my current machine, a complex scene (like Tutorial with 500 stars) takes around 10-20 ms JUST for the everything happening in draw() and the subsequent opengl calls (I just tested it, this is no guesswork). As raw cpu performance of heavy load stuff in .net/mono is lower than in c++, this will mess up your framerate most definitely.
Parent - - By Dahrkael Date 2012-11-03 21:09
I think you missed part of the initial message
"That way it could run on all the Microsoft products (Windows, Xbox 360, Windows Phone)"
good luck using .net bindings from c++ in the xbox or wp
Parent - - By jlnr (dev) Date 2012-11-03 23:10
Is the Xbox really a pure managed-code console? That sounds a little shocking :)
Parent - - By oli.obk Date 2012-11-03 23:13
no ^^ they actually have native code there, too. But it's all included in the sdk, I don't know whether you can add your own. I don't believe so, otherwise all the "piracy & cheating" security measures would be obsolete.
Parent - - By Jwosty Date 2012-11-16 23:09
What this that's included in the sdk?
Parent - By oli.obk Date 2012-11-17 09:12
loads of stuff, everything from managing achievements over creating a network game to graphics/sound. It's quite extensive.
Parent - - By jlnr (dev) Date 2012-11-03 23:08
I think the situation is similar as with Java... Sometimes you could just use the C++ parts of Gosu as they are, and wrap them so that C# can use them (that would certainly work on Windows). But on Windows Phone (at least v7) there is no C++ compiler and you'd have to actually rewrite all of Gosu in C#.

I have no idea if Mono on iOS & Android supports using native libraries.
Parent - - By Jwosty Date 2012-11-16 23:08
Actually, what libraries does Gosu use mainly for drawing and sound anyway? Because if they're not too complex, then one might be able to implement ports of them for XNA, if they don't already exist. If that's practical, then it would run on all Mono platforms as well, using MonoGame.
Parent - - By jlnr (dev) Date 2012-11-17 08:19
OpenGL and OpenAL. Gosu used to use Direct3D for rendering on Windows, and before that, even DirectSound/DirectMusic, but I have replaced it all after switching to OS X as my primary operating system. Using OpenGL on all platforms also makes it a lot easier for brave programmers like Spooner and banister to build libraries that extend Gosu - they don't have to special-case their code for two rendering backends. And last but not least I found (classic) OpenGL a lot easier to program for :)

One could port the Gosu interface to other environments, but as soon as you cannot copy & paste 90% of a game anymore, you might just as well start a new library and improve upon Gosu's interface.
Parent - By Jwosty Date 2012-11-18 01:49
Hmm, oh well, nice to think about anyway. You can already write cross-platform .NET games anyway :P
Up Topic Gosu / Extending Gosu / gosu.NET

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill