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.
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.
This is one of my all-time favorite games. A turned based tactical game with strategy and resource management. It has tons of options for modding, and supports both the original UFO Enemy Unknown and Terror from the Deep games. The game uses SDL 1.2 and OpenGL, which is already linked correctly so it should be fine to just start the game from menu once you set up LIBGL_FB.
This game is a little bit confusing: even though as it’s the only one running in 60 FPS, it uses software rendering in this case. Also, if I activate OpenGL for rendering, the game crashes, so using shaders doesn’t work, even though it does work to a certain degree on other platforms. Still, the game is fully playable with just software rendering and has a nostalgic but modern experience.
This one was a little bit harder getting to work. It has different backends which allow the switching between OpenGL or OpenGL ES, as well as defining if you want to use shaders or not. You can define this in a config file, but the config file is only created if you change something, which means you have to be able to start the game to create the config file, but you can’t start the game unless you have the correct config, which makes this one more tricky to run. I copied the config from my ODROID XU3 and changed /home/odroid/.rvgl/profiles/rvgl.ini:
GLProfile = 1 Shaders = 0 ScreenWidth = 1920 ScreenHight = 1080This game also requires us to use, in addition to the LIBGL_FB and LD_LIBRARY_PATH, the LIBGL_GL=21 option, which set gl4es into OpenGL 2.1 compatibility mode, otherwise the game will crash at after the first logo. After all of these changes though, the game runs fine.
This Linux version of Mario, when installed from my repository as described at https://forum.odroid.com/viewtopic.php?t=5908, should already be linked against the correct libraries, so only LIBGL_FB is required to start the game. You might want to edit /home/odroid/.local/share/supertux2/config though and activate fullscreen #t and set the correct screen dimensions.
This Linux Mario Kart clone was not easy to get to work, and has some issues here and there. First of all, the version from my repository was made for OpenGL ES and won’t work with the ODROID-N2, but the version from Debian Stretch does work, and was made for OpenGL. It requires LIBGL_FB and LD_LIBRARY_PATH to work, but normally would require OpenGL 3.1 or higher, which is not supported by gl4es. Therefore, it goes into a fallback Legacy mode, which runs on OpenGL 1.x without shaders. It has very reduced graphics and no transparency or reflections, and I think some elements are not shown at all. Still, the game works and is rather fast.
VICE is the Versatile Commodore Emulator. Since it uses SDL2, it requires both LIBGL_FB and LD_LIBRARY_PATH. Afterwards, when you start the emulator, you can activate the option screen with F12 and turn Fullscreen mode on, after which the picture should look normal and you can run your favorite Commodore games.
I could run even more games such as Witchblast or Yquake 2 (Quake 2 OpenGL remake), which run well but had minor issues (Yquake ran rather nicely but was slower than expected), and there are a few games I haven’t had time to try yet.
Of course, not every game I tried did actually work, and there were a few I couldn’t get to start. CGMadness, for example, crashed when I entered the game, even though the main menu worked. CorsixTH (Theme Hospital) did not update the screen properly and you could read any items on the screen. OpenClaw did not start at all, and I couldn’t figure out why. Some games worked but had graphical issues, such as Witchblast, but overall I was very surprised how many games actually did work. Some of these games could even be put in the background by simply pressing alt + tab to get back on the desktop, which worked well on a few games that supported this. This is all thanks to @ptitSeb’s impressive gl4es driver, which allows us to run these applications from a desktop. It may not be able to run everything we want from a desktop, but with some workarounds, a good deal of applications seem to be capable to run on the N2, many of which are not available under fbdev and require a working X11 environment.