Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Tuesday, April 18, 2017

Begone Microsoft! Quo Vadis, Canonical?

After a long time not writing here, because of various reasons, I want to resume my blogging experience with a very interesting topic, my personal vendetta against Microsoft and my struggles with Ubuntu Linux.

Most of my friends already know, and if you read some of my posts here you can probably guess that I am an avid Linux user, currently running Ubuntu 16.04 LTS with Unity 7. But for the last years I always was dual-booting with a Windows partition. The reasons were many, but it mostly comes down to some games not running on Linux, either because there is no native version or they do not run in Wine (I look at you Witcher 3 you bloody bastard). The last game that kept me dualbooting was the rebooted Doom, which is an awesome game.
It was quite ridiculous that they did not provide a native Linux version so far, like all the past ID games, although the game uses OpenGL (or Vulkan) and should be easy to port over. One thing that was a deal breaker here is the DRM system in use, Denuvo is known not to have a native Linux implementation. But ID had a lot of problems with Denuvo anyway and subsequently decided to drop Denuvo at the end of 2016. That was the time where the folks over at Wine released their long awaited version 2 with DX11, OpenGL 4.5 and Vulkan support (through Wine-Staging packages), and now Doom is running just fine in Wine with Vulkan API.

So I have not booted into my Windows 10 for the whole of 2017 so far as I did not need to, and the idea of deleting the Windows partition grows in me. I despise Microsoft and all of Windows 10, and don't want to use it anymore (Shady privacy stuff, forced updates, omni-present telemetry, and lack of features, just to name to important few).
But staying on Ubuntu also seems to be a bad idea, 'cause Canonical, the company behind Ubuntu is now best friends with Microsoft (their is now a Ubuntu shell subsystem in Windows 10) and more recently announced they want to drop their Desktop environment Unity, 'cause reasons. As Unity DE was the main reason for me to stay on Ubuntu, this not only made me question Microsoft, but also my Linux of choice: Ubuntu.

Still not totally convinced leaving my comfort zone, the last coffin nails for Windows and Ubuntu seem to just happened these days. Microsoft started deploying the new Creators Update, again with shady privacy options reverted back to "Microsoft defaults" and stuff.
The other was the release of the new Unigine Superposition Benchmark. The Unigine Benchmarks are the goto benchmarks for Linux gamers, as it is the only serious gaming benchmark for Linux. After downloading the 2GB package and running it in 1080p extreme settings I was shocked. My system got only a mere 1100-something score, whereas another guy (the amazing HexDSL) in the Linux Gamer Community with nearly exact same hardware and drivers got over 1500.



The main difference were the Kernel versions, me sitting on Kernel 4.4 from Ubuntu 16.04 LTS and him using Kernel 4.10 on Antergos. That got me thinking again. (Could it be that staying on an LTS seriously degrades my performance for gaming?)

Full of questions, I sought help from the guys and girls in the Linux gamers group over at Discord. After quite some entertaining and amusing conversations, I decided to test out two new distros to see if one of these can become my new safe haven away from Microsoft and Canonical. Three things were my major decision points here: first, it should be a rolling release system to get up-to-date software, Kernel and drivers, should run well with Steam, GOG-games and Wine (PlayOnLinux and Lutris), and third it should have some good desktop environments (not KDE, it is to Windows-ish).
My choices boiled down to Antergos, an Arch-based distro with good Installer and out-of-the-box experience, and Solus, a native Linux distro optimized for Desktop PCs. At least so I heard.
As I heard only good tales about the AUR system in Arch based distros (AUR = Arch User Repositories, something like Launchpad for Ubuntu but better) and how fast it has the newest packages, and the ability to build packages from Github sources, and Solus is still lacking a working nfs-utils package to mount my NAS shares, I decided to go with Antergos first. Let's see where these adventures will take me. #Decisions! :D


Stay tuned for more, Cheers!

Wednesday, May 28, 2014

How to setup SFML on Ubuntu 14.04 LTS


Edit: There is an updated version of this article available here
================================================


Hi Folks,

in one of my first posts about game development I said I would show you how to setup a SFML development environment on Linux. Now it's time to fulfill this promise ;)

At first I want to limit the Linux distro to Ubuntu, 14.04 LTS in particular. I've only tested it on Ubuntu because I don't use any other distro anymore. Ubuntu rocks them all ;) (personal taste). Because Ubuntu is based on Debian, this article should also apply to Debian, although I haven't tested it.
The problematic part about Ubuntu 14.04, the official SFML version in the repos is 1.6, and we don't want this old one. We want the actual 2.1 stable release. There are also some more version problems with SFML dependencies, especially with GLEW. But this means we need to build it from the official source code ourselves with all dependencies solved, so everything works fine. Ok, let's do it!

After a clean Ubuntu 14.04 installation, first thing we need is a compiler. I think GCC will be sufficient enough ;) We also need the meta build tool cmake in order to build SFML. Open a terminal (ctrl+alt+t) and enter the following commands

sudo apt-get install g++
sudo apt-get install cmake



After this we need all dependencies of SFML solved. Enter the following commands (order doesn't matter)

sudo apt-get install freeglut3-dev
sudo apt-get install libjpeg-dev
sudo apt-get install libfreetype6-dev
sudo apt-get install libxrandr-dev
sudo apt-get install libglew-dev
sudo apt-get install libsndfile1-dev
sudo apt-get install libopenal-dev


The important part is, that we always need the developer version of these libraries in order to build SFML. Now we only need the SFML source code which can be downloaded here: http://www.sfml-dev.org/download/sfml/2.1/SFML-2.1-sources.zip

Extract the zip-file to some directory, e.g. ~/dev/sfml-master. Now we need to configure the makefiles with cmake. Switch to the extraction directory of SFML and enter the following:

cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug -D BUILD_SHARED_LIBS=TRUE .
make
sudo make install

Don't forget the dot at the end of the cmake command. This tells cmake to use the actual working directory as source directory. Until now we only have the shared debug lib, but we also need the release libs. Therefore simply replace the CMAKE_BUILD_TYPE=Debug with Release:
cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=TRUE .
make
sudo make install

Finally if you want to link your SFML apps statically you need the static libs. Therefore repeat to two above steps for Debug and Release and change BUILD_SHARED_LIBS to FALSE:
cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug -D BUILD_SHARED_LIBS=FALSE .
make
sudo make install

cmake -G "Unix Makefiles" -D CMAKE_BUILD_TYPE=Release -D BUILD_SHARED_LIBS=FALSE .
make
sudo make install

Now you have covered all four possibilities of the libraries and you can now develop SFML projects the way you like.
You can now start a new project in e.g. Code::Blocks (do not use the SFML-Project Template shipped with Code::Blocks, it contains legacy SFML-Code). Create a new console project and goto Build Options -> Linker Settings and add the SFML libraries to the Linker Settings:



If you need networking or audio don't forget to add these here as well (sfml-audio-d, sfml-audio, sfml-network-d, sfml-network). That's all, you are now able to write, compile & run SFML 2.1 driven applications on Ubuntu 14.04.

Cheers until next time.