The ODROID-N2 is still fairly new, but has already been around for a couple of months. Many like it due to the fact it has a very fast processor and GPU, as well as more RAM than previous ODROID models. Still, because we do not have X11 drivers for the system, the capabilities of the ODROID-N2 are somewhat limited for now. I want to explore what is currently possible, and what we can do playing games on the ODROID-N2 from a desktop.
We’ve already seen there are gaming images out there, and using Retroarch with a frontend like EmulationStation is not a big deal and nothing new. It has been done before, and not what I will discuss in this article. PPSSPP also seems to work fine, but these are applications that run in a single application mode, meaning they are the only application running and can’t be used from a desktop (although they start from a desktop and therefore can be used here as well). However, many users want to use the N2 as a desktop replacement while hopefully having a fluent experience on both desktop and applications, but since the ODROID-N2 does not have X11 video drivers, there are fewer options.
The N2 is quite good at running as a desktop replacement, and the fast CPU allows for desktop composing which allows for transparent windows, giving the N2 a look and feel of a faster desktop computer. The lack of hardware acceleration is a noticeable downside, especially on the web browser.
While Chromium is very sluggish, especially when playing YouTube videos, Firefox works slightly better, but still both do not have hardware acceleration, so there is no WebGL support or hardware accelerated scrolling. Still, we found with the help of @ptitSeb’s gl4es (an OpenGL to OpenGL ES wrapper) that many programs can be run with OpenGL acceleration in a “Full-Screen” Mode. That allows you to run a number of games that I already built and configured for ODROIDs to run on the ODROID-N2 as well.
Setting up the environment
After I installed MATE desktop with GPU drivers, I needed to install gl4es from my repository, but also installed monolibs-odroid as it provides a libSDL2 version that supports OpenGL, which by default is disabled in my libSDL2 versions for ODROIDs, as it normally uses OpenGL ES. We still need it to get things running, so I installed both:
$ apt install -t stretch libgl-odroid monolibs-odroidMost of the applications won’t start directly form menu and have to be started from command line, otherwise they either use MESA Software OpenGL, or the wrong SDL2 version. Therefore, I setup my environment by defining the following variables:
export LIBGL_FB=1 export LIBGL_GL=21 export LD_LIBRARY_PATH=/usr/local/lib/monolibsSome of the games we try were already made to use OpenGL and gl4es in the first place, so the only difference for these applications is the option “LIBGL_FB=1”, so it can be worth putting this variable into /etc/environment instead as this will activate it globally for all applications (requires reboot). Not all programs will run with the other two options in the environment file so you should skip them. With this I could start most of the applications directly from the terminal. In rare cases, I had to do a few other things, but I will explain them when it comes to it.
One thing I noticed is that all games seem to run at around 45 FPS. I don’t think this is due to low performance, but probably a limitation of the X11 drivers. Now, with our setup being complete, let’s see what games we can get to work.
Cendric is an RPG in a slight retro style. Many of the graphics seem hand drawn or drawn at the computer, but the game is not bad at all. It uses X11 and OpenGL directly, so it could start nearly by itself. As long as the LIBGL_FB=1 variable is set, you can run the game from the command line, or even from the menu. The game has some graphical issues, like other ODROIDs, but I’ve encountered an issue that when the game switches from world map view to dungeon view, the screen is not updated, and you see the last picture you saw before the level. Exiting the game with ALT + F4, restarting the game and resuming it, and you’re in the new area you wanted to enter. Overall the game works well with the drivers, but the error with the switching of the world view is slightly annoying.
This is one of my all time favorite games. Dune 2, the grandfather of all modern RTS (real time strategy games), and Dune Legacy is an improved and optimized version of the game with a better interface and control options than the original had.
Dune Legacy relies on SDL2 as a graphics driver, which on my ARM64 image is normally using OpenGL ES as a default, but since we do not have OpenGL ES with X11 support, we need a version that supports OpenGL and use gl4es. This works as long as we run the game with “LD_LIBRARY_PATH=/usr/local/lib/monolibs”, which means it’s best to start it from command line.
That, together with the LIBGL_FB=1 options, is enough to run the game. Aside from some transparency issues, I have not seen any problems with the game. All the menus work, the game works fine and is fluent. It’s fully playable and can be enjoyed on the ODROID-N2.
EasyRPG Player is an interpreter for RPG Maker 2000 and 2003 games which requires SDL2 as well, so you need to start it from the command line. It doesn’t use any shader as far as I know, so hardware acceleration is not really needed, but you need it to start the interpreter.
There isn’t much to say about it except that it works fine. I haven’t seen any issues that wouldn’t be present with any other ODROID as well.
This game is a remake of the classic Flying Shark (aka Sky Shark) arcade game which was ported to many different platforms such as the Amiga, C64, or NES. This 3D remake uses OpenGL 2.0 and shaders, so it’s not as simple as other games and had quite some issues in the past with gl4es. Currently, it runs beautifully on the ODROID-N2 with gl4es and LIBGL_FB=1 alone. Since it only runs on OpenGL and doesn’t require SDL2, it can be started directly from the menu if you set the environment variable.
Frogatto (and friends)
This platformer turned out to be one of the more complicated games to get to work. I created a version that is able to run directly under OpenGL ES/EGL/X11, but this doesn’t work for the ODROID-N2 because of the lack of X11 OpenGL ES drivers.
This version can’t be used for gl4es because it’s rewritten to use OpenGL ES/EGL/X11, so I turned to the version provided by Debian itself. It only requires SDL 1.2 as well as OpenGL and needs to be started with both LIBGL_FB and LD_LIBRARY_PATH. Although this method is working, it reveals another issue that I fixed with my version of the game: it only starts in 800x600 resolution and this can’t be configured. Therefore the screen looks rather bad unless you change the resolution of your ODROID to 800x600 as well. Still the game works fine despite these graphical issues.
This remake of MegaLoMania, which is a strategy game that I loved on the Amiga, uses SDL2 to render its graphics, so it also needs LIBGL_FB and LD_LIBRARY_PATH. The game doesn’t do anything fancy with the graphics so it should work fine.
GZDoom is an engine that allows you to play games based on the Doom engine. There are tons of games that are even published today that push the Doom engine to its limits and beyond. This particular version uses OpenGL to optimize graphics and add more lighting effects, fog, etc. Everything should be compiled in, so as soon as you have LIBGL_FB setup, you can start it from the menu or terminal as you like.
Hedgewars was one of the first games I tried with this method, and it worked quite well. This Worms clone is very fun to play and should run perfectly fine on your ODROID-N2 with gl4es. But it requires both LIBGL_FB and LD_LIBRARY_PATH. Make sure to configure the game to use fullscreen mode. (Figure 10 - Hedgewars on the ODROID-N2 runs fine even with much going on on the screen like falling leafs and explosions)
This one was a little bit tricky, as the game starts without a config file and in window mode, but needs to be controlled via mouse and keyboard, which made it very hard to interact with at first.
“luckily” the window of the game was flashing in the background when I first started the game so I could move the frame of the window to the lower left corner where the picture of the game was shown. After that the menu was somewhat useable and I could configure the screen to use fullscreen mode in 1080p after which the game worked perfectly fine.
The game only uses SDL 1.2 and OpenGL which was already linked correctly by me, so it should run with LIBGL_FB only directly from the menu.
Neverball / Neverputt
Both games from the Debian repository are working fine, but require LIBGL_FB and LD_LIBRARY_PATH as it’s using SDL2 and OpenGL for rendering, so starting from command line is easiest. After that the game should run without issues.