dellis1972
Posts: 13
Joined: Mon Jul 23, 2012 12:07 pm

Re: MonoGame on Raspberry Pi...

Thu Aug 02, 2012 9:32 am

OK, forked and updated

https://github.com/dellis1972/opentk

I added a RaspberryPi test project in the Source/Examples/OpenGLES. It creates a gles 2.0 window. I have also commited a few of the changes I needed to make to get it working on windows on a gles 2.0 emulator.

I think the best thing to do is to get OpenTK working on the Pi , and once that is done it should be fairly simple to port monogame over.

BTW - Mono does not support hardfloat at the moment, but apparently some work is in progress so we should see better floating point performance in the near future.

Dean

emg
Posts: 88
Joined: Wed Jan 11, 2012 11:01 pm

Re: MonoGame on Raspberry Pi...

Thu Aug 02, 2012 10:08 am

dellis1972 wrote:... apparently some work is in progress so we should see better floating point performance in the near future.
Who is working on mono port for armhf?

dellis1972
Posts: 13
Joined: Mon Jul 23, 2012 12:07 pm

Re: MonoGame on Raspberry Pi...

Thu Aug 02, 2012 10:11 am

no idea, its a rumour :)

Dean

noxo
Posts: 16
Joined: Tue Jul 31, 2012 6:52 pm
Location: Vantaa, Finland
Contact: Website

Re: MonoGame on Raspberry Pi...

Thu Aug 02, 2012 3:16 pm

dellis1972 wrote:OK, forked and updated

https://github.com/dellis1972/opentk

I added a RaspberryPi test project in the Source/Examples/OpenGLES. It creates a gles 2.0 window. I have also commited a few of the changes I needed to make to get it working on windows on a gles 2.0 emulator.

Dean
Great, thanks for sharing. Found your repositories - and will try to play with it. Too bad that my wife has planned something for weekend, so I'm away from compiler :)

noxo
Posts: 16
Joined: Tue Jul 31, 2012 6:52 pm
Location: Vantaa, Finland
Contact: Website

Re: MonoGame on Raspberry Pi...

Thu Aug 16, 2012 7:08 am

Some progress .. I've got MonoGame working on Windows + OpenGL ES 2.0..

https://twitter.com/enoksokoivisto/stat ... to/1/large

In theory MonoGame should also now work on Linux (+Raspberry PI) + OpenGL ES 2.0.

I didn't yet manage to run OpenTK on RPI, but I guess it just about applying this
patch (http://releases.merproject.org/~carsten/x11-hack-libegl) to VideoCore
EGL libraries, because default VideoCore EGL libraries does not allow to hook in
X11 surface.

Will post more - if there's any success with this ;)

noxo
Posts: 16
Joined: Tue Jul 31, 2012 6:52 pm
Location: Vantaa, Finland
Contact: Website

Re: MonoGame on Raspberry Pi...

Fri Aug 17, 2012 10:18 am

Ok, MonoGame Tetris now running graphics accelerated on Raspberry PI also, it's actually quite fast :P
http://www.youtube.com/watch?v=EjbWlxxQZ6A

I've prebuild binary available and further instructions here:
http://www.vihrearobotti.com/other/monogamegles

I've also pushed special fork of MonoGame in GitHub:
https://github.com/noxo/MonoGame

Now it's a different story will there be further development :oops: There's a lot unfinished stuff in MonoGame, and it's for example based on MonoGame 2.0.0.

Feel free to fork your own version, or contact me if you want contribute on existing.

dellis1972
Posts: 13
Joined: Mon Jul 23, 2012 12:07 pm

Re: MonoGame on Raspberry Pi...

Fri Aug 17, 2012 1:29 pm

nice job.

Looking at the changes I'm guessing the main one was not using the default new OpenTK.GameWindow (); constructor ?

dellis1972
Posts: 13
Joined: Mon Jul 23, 2012 12:07 pm

Re: MonoGame on Raspberry Pi...

Fri Aug 17, 2012 2:31 pm

how did you get round it not loading the libgles.so files?

Did you install any particualr packages? also what os did you use (Raspbian/Debian)

noxo
Posts: 16
Joined: Tue Jul 31, 2012 6:52 pm
Location: Vantaa, Finland
Contact: Website

Re: MonoGame on Raspberry Pi...

Fri Aug 17, 2012 4:10 pm

dellis1972 wrote:how did you get round it not loading the libgles.so files?

Did you install any particualr packages? also what os did you use (Raspbian/Debian)
Updated the documentation to http://www.vihrearobotti.com/other/monogamegles

But what I did was:
- Debian 6 (debian6-19-04-2012.img)
- Modified how to construct OpenTK.Window in MonoGame.GameWindow class, it must have correct GLES version, and then the embedded flag => so it will try to look for GLES2 libraries and not to fall into OpenGL mode.
- Also I copied the VideoCore libraries (libEGL.so and libGLESv2.so) from /opt/vc/lib to execution directory
- Patched the libEGL.so (instructions on my blog)

That's basically it, no additional packages :) The mesa-common-dev is still there, I'm not sure wether it's needed still with OpenGL ES.

BTW; I just tried with OpenTK from OpenTK/SVN and it's not working, but one from Mono/OpenTK is working ok, so if you using first one, it might need some additional hacking.

dellis1972
Posts: 13
Joined: Mon Jul 23, 2012 12:07 pm

Re: MonoGame on Raspberry Pi...

Fri Aug 17, 2012 9:24 pm

Thanks for the info. I have been running Raspbian but I think I will switch to wheezy and test that tomorrow.

In the meantime here is a screen short of the new MonoGame "embedded" running on windows ontop of GLES 2.0.

https://twitter.com/infspacestudios/sta ... to/1/large

noxo
Posts: 16
Joined: Tue Jul 31, 2012 6:52 pm
Location: Vantaa, Finland
Contact: Website

Re: MonoGame on Raspberry Pi...

Sat Aug 18, 2012 5:42 am

Goodluck ;) I would recommended anyone using my fork to switch into "official" fork from Dean, because it's based on forthcoming new release of MonoGame which supports a lots of cool new features like 3d graphics.

I had a lot of problems (= mono crashing) with ARMHF based distros, including Wheezy for RPI, because of floating point issues that been discussed a lot in forums, even the basic OpenTK stuff were causing the Mono to crash.

I hope we can get the RPI EGL driver patched (x11-hack-libegl.txt on my site) so that it will obey the windowing instructions coming from OpenTK. It's bit of a hack currently, with fixed window size of 800x600 and everything.

dellis1972
Posts: 13
Joined: Mon Jul 23, 2012 12:07 pm

Re: MonoGame on Raspberry Pi...

Tue Aug 21, 2012 8:11 am

A small update. I have the develop3d version working fine on GLES emulation on my windows box, but it just doesnt want to work on the Pi. The app just exits without any errors. Its probably something to do with the gles stuff. The develop3d branch uses GLES 2 rather than GLES 1.1, do you think the libELGv2 library needs to be patched as well?

CartBlanche
Posts: 16
Joined: Fri Nov 04, 2011 10:04 pm
Contact: Website

Re: MonoGame on Raspberry Pi...

Thu Oct 25, 2012 9:34 pm

It has nearly been a year since I posted on this thread, but progress has been made, and I just wanted to point out that Dean ( too humble to post himself), from the MonoGame team, has successfully got MonoGame and 3D working on the Raspberry Pi. Please watch the video here - http://www.youtube.com/watch?v=jwbYe6eoZgE

I'd still love to see an ultra cheap hand held gaming device that almost anyone can write games for!!

JoeStrout
Posts: 43
Joined: Sun Oct 09, 2011 12:11 pm
Contact: Website

Re: MonoGame on Raspberry Pi...

Sun Mar 10, 2013 2:36 pm

I know this is an old thread, but I thought it deserved a kick. :)

I'm just recently starting to really play with my Raspberry Pi, and thinking of all the educational value it would have for my boys (ages 8 and 12). I'm thinking of helping them each build their own setup.

I'm also thinking that C# is a dramatically more sensible language for them to learn than Python. In fact the older one is already pretty deeply into C# on the command line (doing Project Euler challenges) and in Unity (making 3D games). (The younger one is still doing Scratch.)

So it'd be super-cool if they could write games on the RPi itself, in C#. One approach I'm considering is to simply wrap the OpenGLES APIs directly, along with OpenAL, in some 2D framework that's similar as possible to Scratch (and perhaps bears some resemblance to Unity where that makes sense).

But another approach that looks really promising is MonoGame. I haven't tried it myself, but I see from this thread and the videos that people have gotten it to work, and to perform well... but it appears to still require a lot of fairly deep hacking.

So, long story short, please let me encourage you all to continue working on MonoGame on the RPi. I think it's a tremendously valuable contribution, and I'd love to see all the rough edges ironed out, so that anyone can do a couple of apt-gets and start programming games in C# right away!

JoeStrout
Posts: 43
Joined: Sun Oct 09, 2011 12:11 pm
Contact: Website

Re: MonoGame on Raspberry Pi...

Mon Mar 25, 2013 4:33 am

Forgive me for kicking a dead thread, but more all other threads related to this topic seem to redirect to here...

So: has anyone made any more progress getting OpenTK to work properly with hardware-accelerated OpenGLES on the RPi?

I'm just starting to look into game frameworks, and love the idea of OpenTK, but have tripped over the unfortunate necrosis that project seems to be suffering. Not sure yet whether it's the right way to go, or whether there's some newer alternative I haven't found yet that would be better.

But since one of the things I'd love to do with whatever-it-is is write games for (and on) the RPi, any progress in getting OpenTK to work there would be really helpful.

CartBlanche
Posts: 16
Joined: Fri Nov 04, 2011 10:04 pm
Contact: Website

Re: MonoGame on Raspberry Pi...

Tue Feb 10, 2015 9:32 pm

I'm also kicking this old thread. Has anyone managed to get MonoGame working on the RPi2?
Also can someone from Raspberry confirm if the latest incarnation actually has floating point support this time?

Thanks.

chrisgwilliams
Posts: 2
Joined: Tue Feb 10, 2015 7:40 pm

Re: MonoGame on Raspberry Pi...

Wed Feb 11, 2015 7:58 pm

I'm very interested in this as well, both for the Pi and Pi2. I've managed to get part of the way there, but haven't managed to actually get the CornflowerBlue screen to appear. Any help (or binaries) would be greatly appreciated.

Link to StackOverflow question: http://t.co/sEsmvDmKYV

DrMistry
Posts: 11
Joined: Sun Aug 19, 2012 7:40 pm

Re: MonoGame on Raspberry Pi...

Tue Sep 08, 2015 3:33 am

I've got it working on my Pi 2. I'm using the mono package repository for the latest build of mono it's self (and monodevelop), and build monogame from source following the instructions on the monogame site. No problems at all, but using spritebatch is painfully slow, which is really disappointing. I wrote 5 games for XBox Live using XNA and would really love to have XNA running at a good speed, it's fantastic for more than just games. I'm going to investigate hacking the video libraries as outlined above, but there are now a few dead links in the trail. I'll report back if I get anywhere.

Mike

CartBlanche
Posts: 16
Joined: Fri Nov 04, 2011 10:04 pm
Contact: Website

Re: MonoGame on Raspberry Pi...

Tue Sep 08, 2015 7:35 pm

This is great news. So does the RPi2 have a floating point unit? That is the only thing that makes me wonder why it would run slowly.
Any ideas?

Return to “Other projects”