Savant

If you’ve paid attention to my past posts I showed off my setup twice which both times included a music player with music by “Savant”. He’s a fairly unknown artist from Norway. He produced music under a multitude of different aliases like Vinter in Hollywood, Vinter in Vegas, Megatron, Datakrash or Blanco just to name a few. His real name is Aleksander Vinter and currently he primarily releases music as Savant and occasionally as Datakrash. If you look up the meaning of savant (or maybe you already know it), you’ll find out that it was a term to describe people that have exceptional mental abilities like being able to calculate the weekday of a certain date within seconds (for the record the formula for that is pretty complex). Nowadays this is called Asperger’s syndrome, which Vinter was diagnosed with. But Savant is a way cooler word so I guess that’s why he went with that.

Since he doesn’t give out all that much information I can’t tell you how much is true or not but the fact is that the dude does not stop making music. The amount he has put out in the last few years is insane. I first heard his album Invasion and when I discovered his other stuff I was busy for weeks listening to all of it.

If you don’t want to read all of this you might be interested in a video from UKF in which Vinter was interviewed. It shows that the guy has a pretty interesting view on things:

The thing that got me into his music is the fact that he’s producing electronic music while still finding room to fit in unexpected things that sets it apart from the usual generic electronic stuff. If you want to know what I’m talking about give this one a listen:

To be fair the chances of you enjoying this piece aren’t that high. It’s pretty flashy and aggressive but the interesting part is the beginning. I’m no musician but I’d say that the melody at the beginning itself is more complex than what most top electronic producers can come up with. That kinda stuff got me into his music. He always has an interesting way of coming up with new things. On the one hand it’s electronic music on the other hand you’ll never know what you’ll get with his songs. Vinter also doesn’t solely produce electronic. Every alias does different stuff with Savant being the more EDM type stuff.

He also does (or rather did) ambient and mellow music with Vinter in Hollywood or metal with Megatron. So yeah his discography is rather diverse to say the least but he usually only works on one alias with Savant being the biggest one since that got the most attention.

So yeah if you’re feeling adventurous check out his bandcamp, twitter, youtube, subreddit or soundcloud and see if you like anything. I started when youtube suggested me his album Invasion and got hooked on it from there (Btw that one is free on bandcamp if you wanna cheap out :P)

 

Advertisements

OBS Studio

I assume just about everyone who searched for a screen casting software in the last three years has heard of OBS Studio (or formerly just OBS). At this point it is an industry standard for recording and streaming videos. Since the complete rewrite there’s no reason not to use it: it’s free, open-source and cross platform.

A while ago I tried to write a plugin for the original OBS at which I failed tremendously at, for one because of my incompetence but also because it was badly documented and pretty tedious. Recently I got back to that idea of writing a plugin for it but now since it switched to being crossplatform the process changed completely.

Sadly it’s still pretty obscure, which shows in the fact that there’s barely any plugins for OBS Studio. It seems like the setup process is what keeps a lot of people from making a plugin and those who get it to work stop after finding out that there’s no real documentation (Except code comments). After spending about two days on setting OBS Studio up, I got it to work and after some more time spent I finished my plugin.

It adds a new source type to OBS which shows keyboard and mouse input on stream. If you want to check it out you can get it here. But now I’ll talk a little about the setup process.

Working with OBS Studio’s source code

This post is rather long so if you don’t like reading you can watch my video tutorial:

 

The only real documentation is the guide up on github. But even with those instructions some things are a little unclear. For this guide I’ll assume you want to set up a development environment on windows.

So first of the requirements:

  • Visual Studio (2013 or 2015)
  • Qt5
  • cmake
  • Libraries
  • Git (Recommended)

Visual Studio 2017 was just released but I had no luck when trying to use it so I used VS 2013 Community. The following parts will show you how to set up all requirements, except Visual Studio, just google for the installer of the desired version and install it.

Dependencies

Now you should set up a dedicated folder for your development with obs (here refered to as “obs-dev/”) and download the dependencies first (Dependencies for Visual Studio 2013/2015). Unzip them and put them in a sub folder (here refered to as “obs-deps”).

Qt5

It’s not all that obvious as to how to get Qt5, since the guide only mentions folder names like D:\Qt\5.8\msvc2013 or D:\Qt\5.8\msvc2013_64. So first head to the Qt page and download the installer. Then skip the login part and select only these options when installing (These are the required ones, since everyting else just takes up disk space):

Unbenannt.png

Now obviously if you have Visual Studio 2013 you dont need msvc2015 and the other way around. Also if you only want to develop for 64 bit you don’t need 32 bit and vice versa. You can uncheck everything else, except the Qt creator since that ones required.

Note: You can only install Qt to a path that does not contain spaces, in my case

C:\Qt\

Cmake

Cmake is the software OBS uses to configure the environment for developing and it will take care of all the complicated stuff. So just install it, or download a portable version from the offical cmake page.

Git

This is only used to grab the source code and if you want to keep track of your changes. Get it here.

Putting it all together

Now let’s put all these new toys to use: First grab the source code from github via git. Open git bash (by default right click in your obs-dev folder and choose “open git bash here”) then enter this command

git clone --recursive https://github.com/jp9000/obs-studio.git

now you’ll have a sub folder called obs-studio, nice! Though this is the very latest and bleeding edge stuff. That’s cool if you’re planning to just build OBS or contribute to it’s development, but if you want to develop a plugin it’s better to use the latest stable release, so let’s turn back time to the latest stable release. Type:

git tag -l

This will list all past releases of obs studio. At the bottom there should be the latest version (eg. 20.0.1), now let’s load that version by running

git checkout 20.0.1

or if you plan on using git to track your changes

git checkout 20.0.1 -b plugin-dev

The second command will create a new branch with the name “plugin-dev”, this assures that all your future changes will be tracked on a separate branch without touching the original obs code (You obviously can’t acutally change the original code without having the right permissions, but it still helps to keep your local repository tidy).

That’s all we need from git, we now have stable releas of OBS we can base our plugin on.

Configuring Cmake

This step is only needed if you want to develop a plugin for OBS, if you just want to compile it or want to direcetly commit to the obs repository (in pull-requests), you can directly go to “Using Cmake”

Cmake by default only creates project files for OBS and it’s plugins. But our plugin isn’t included since it doesn’t exist yet. Let’s fix that by telling cmake to create an empty project for us. Head into “obs-dev/obs-studio/plugins” and create a new sub folder for your plugin (in this case “test-plugin”). Now inside that folder you need a file called “CmakeLists.txt” and a *.c or *.cpp file with the same name as your plugin. You can keep it empty, but we need something to fill your project for now. The last thing you need is a “data” folder with another folder called “locale”. Inside that you put your language files to translate your plugin (by default only “en_US.ini”.

So this is how your folder structure should look like by now:

  • test-plugin
    • data
      • locale
        • en_US.ini
    • CMakeLists.txt
    • test-plugin.c(pp)

Now we can leave all files empty except the CMakeLists.txt. This needs to contain information for Cmake so it can create the project. You can take a look at other plugins or copy what I have:

project(test-plugin)

if(MSVC)
 set(test-plugin_PLATFORM_DEPS
 w32-pthreads)
endif()

set(test-plugin_SOURCES
 test-plugin.cpp)

add_library(test-plugin MODULE
 ${test-plugin_SOURCES})
target_link_libraries(test-plugin
 libobs
 ${test-plugin_PLATFORM_DEPS})

install_obs_plugin_with_data(test-plugin data)

Just replace all instances of  “test-plugin” with your plugin name. The last thing we need to do is go back to the “plugins” folder and edit the CMakeLists.txt file which is inside that folder. At the bottom of that file you’ll see a bunch of “add_subdirectory(…)” lines. Just add another line with your plugin and save it.

add_subdirectory(test-plugin)

And that is all you need to do to tell CMake about your plugin, now we’ll let CMake take care of the rest.

Using Cmake

Open up the Cmake-gui and then set “Where is the source code:” to “obs-dev/obs-studio” and “Where to build the binaries” to a separate folder where you want to have all Visual Studio projects (it won’t actually put the binaries there), for me the folder is “obs-dev/obs-studio/vs”. Now click configure and select the Visual Studio version you use. You can choose between “Visual Studio <2013/2015>” and “Visual Studio <2013/2015> Win64”. Using 64 bit means your project will build 64 bit binaries and the same for 32 bit.

cmake1.PNG

After it’s done it’ll spit out some errors since it can’t smell where you put the dependencies. You’ll have to set two variables QTDIR and DepsPath. Both of these can be suffixed with “32” or “64” to tell Cmake what bit the dependencies are. So you either just set QTDIR, or if you want both 64 and 32 bit you’ll set QTDIR32 and QTDIR64. For me this is how I set them:

  • QTDIR32: C:/Qt/5.8/msvc2013
  • QTDIR64: C:/Qt/5.8/mscv2013_64
  • DepsPath32: ../obs-dev/obs-deps/win32
  • DepsPath64: ../obs-dev/obs-deps/win64

Note: Cmake uses forward slashes for paths since all Operating systems do that except Windoze.

cmake2.PNG

In this screenshot I only used the 64 bit dependencies, which means I can directly use “DepsPath” and “QTDIR”. If you want 32bit and/or 64bit you’ll need to click “Add entry” and add “DepsPath32” / “DepsPath64” and “QTDIR32” / “QTDIR64”, and set their values accordingly.

Keep in mind that the dependencies are different for VS 2013 and 2015! Now click configure again and after it finishes it’ll let you change some other settings which are unimportant for us so just click configure a third time and there should be no red items in the Cmake list left. After all that you can click Generate, which will create the Visual Studio Solution. When that is done you can click Open Project or directly open the solution.

cmake3.PNG

This is how Cmake should look like after the second configuring process (After you entered “DepsPath” & “QTDIR”).

And that’s it. Give VisualSudio some time since OBS is a huge project and it takes some time to index all the files. You should now be able to click the green play button and the latest version of OBS should run. If you configured CMake to create a project for your plugin you should also see a project with your plugin name in the project explorer.

vs.PNG

So this was all I had to go through to develop a small pugin that probably no one will use. If you compare this essay to the guide up on github you’ll see that it’s missing a couple of things. For experienced developers this process might be self explanatory but for a newbie like me it was quite the nerve wrecking adventure. Maybe this write up will prevent at least one persone from going throught that same process.

Lode Runner

Quite a few years ago I got my hands on the game “Lode Runner Online: The mad monk’s revenge”. It’s pretty old and actually an update to an even older game. There’re quite a few iterations of Lode Runner but I only played that one version and back then it was a pretty good game.

The game’s mechanics are simple: You have to complete levels by collecting all the gold. Levels don’t span over multiple screens and are allways the same size. You can collect items to help you get through the level and to fight off enemies (the monks, duh). Since it’s actually a puzzle game as the game progresses you’ll end up spending more time to find a suitable solution to levels.

Since this version was only an update because the original game only ran on DOS and windows 3.1 it doesn’t feature many new things, most noteably the online multiplayer. “online” and “multiplayer being very generous terms since you can only play through a local network or dial up modem and only with one extra player. Obviously a game like lode runner wouldn’t make much sense with 20 players.

Anyways the game is pretty cool and can keep you occupied for quite some time especially since there’s a level editor where you can create new and modify existing levels. That’s where I put the most time into since the game itself gets pretty difficult. Nowadays the game doesn’t run on anything beyond Windows XP anymore which is a little sad since you can get the game for free on the developer’s website. So since I was already working on making a small 2D engine with SDL2 I thought “Why not try and remake that game”. Pretty far fetched goal and someone actually already did exactly that. But When I found that out I already spent too much time on it so I’ll just continue to work on it.

So far I’ve gotten dynamic menu screens and scaling done which for me is pretty big achievement since I’m writing all of it in C++. I also got SDL2 to play nice on both Windows and Linux which is also a first for me. Currently I’m trying to figure out how the game saved it’s levels so the game can load the old file format into my engine.

The game running under Windows

You probably can’t tell much from that screenshot but the menu screen is loaded more or less dynamically with tooltips and button textures and it all scales nicely from 1x to 2x. Technically it should scale up to any round number but I can’t test anything beyond 1080p. Sadly other than the menu structure I don’t have much to show off but I hope that I can get this to a useable state. Also unlike quarkrobot’s remake mine is opensource, so if you want to take a look (even though there’s not that much there right now) feel free to do so.

Customizable Startpage

GitHub offers one free domain for each user and a domain for each repository. I never used them until recently when I had the urge to finally get myself a website and since I don’t want to pay for a server and a domain name I got myself a github.io site. It’s free, but you’ll have to write the entire site by yourself and the source code has to be public.

Since none of these conditions are an issue to me I went ahead and created univrsal.github.io. It’s nothing special currently but at least it’s something. But I also wanted a custom startpage that I see when I start my browser or when I open a new tab. So I made a sub link /search/, which gives you a start page which you can configure by clicking on “cfg”. All settings are saved via cookies and reapplied when reloading the page. You can configure these things:

  • background image
  • background color
  • the quick links at the bottom and their color
  • the accent color (secondary color)

It’s nothing much but maybe you’ll find it useful. I know that I’ll use it 😛

Sourcecode for the entire webpage.

Mirror’s Edge Catalyst

When the game came out last year I really looked forward to it, since the original Mirror’s Edge was a pretty good game and it had been about six years since that one came out. Unfortunately it was a AAA title which means it costs around 40+ Euro so there was no chance that I’d buy it at launch. But now that some time has passed I finally got my hands on it and man does it look gorgeous.

The first game was already known for its great art style and the amazing visuals. Now six years after the original release they managed to make it even more beautiful. The game comes with a multitude of new technologies which make it look even better than the last one. For example they added real time reflections, which reflect your surroundings and yourself.

But next to the insane graphical improvements it also has some new gamelay mechanics, like open world. You can now freely move around and choose whether or not you want to continue with the story, do a side quest or try to beat someone’s time at a parkour course. You can even make your own races across the city and share it with others. While there’s all these things that allow for online interaction you can still play it offline, which sadly in todays times is something you have to mention. Since you can now freely move around you also get a map and visual representation of how you get to waypoints like the next quest or locations you marked on the map. You can also configure how much visual aid you get. The game also tells you that the GPS will only show you a possible route and not the fastest one incouraging you to try out your own paths to find more efficient routes.

After I played the game for a while I wanted to capture some of the amazing architecure in the game with screenshots. Which eventually lead me to nvidia Ansel, which is a tool specifically for taking screenshots in games. It’s actually been out for quite a while but it seems like noone paid attention to it. It features a bunch of useful features to capture ingame footage like 360°, stereo and 360° stereo images (Stereo as two images next to each other for VR) at configurable resolution aswell as a freely movable camera, some integrated filters, and super resolution to capure images at higher resolution than your actual screen size. Sadly Ansel has to be supported by the game to be available. It also requires a recent nvidia gpu (starting at gtx 650 up to the latest 1080). The saddest thing for me was that Mirror’s Edge catalyst doesn’t support the super resolution feature, meaning that I can only capture the game in 1080p.

So I ended up just getting high res screenshots from other people and made some wallpapers out of them. But I might go back through the game when I finished it and capture some screenshots, but the game really tests your system even on medium settings.

From my current experience the game is decent in terms of it’s story. It is a little odd that you have to read a comic to understand the beginning but other than that it’s pretty good. It might not shine story wise but its visual immersion makes up for that. It features a couple of new mechanics like a leveling system with upgrades which is not something I’d consider an amazing addition but it’s there so you can slowly unlock all the new mechanics. The combat is something that I really dislike because you can’t use any guns like in the last game and you’re mostly restriced to melee and although they offer multiple ways to combine and alternate your attacks it just feels like random button mashing.

TL;DR:

Game is visually amazing (Graphics are top notch, map and architecture design is incredible), story is good (so far and I don’t expect it to change), gameplay is great (except for the combat).

After about a year the price has gone down quite a bit so I’d say you get a really good game for your money (~15€ from what I saw). If you think about getting it I’d recommend you take a look at the website, since it offers a lot of information like an interactive map tinteractive mapo look at the cityinteractive map and some other things.

Anyway here’s two 360° images of the game (Viewable in browser):

360° image of city overview
360° of city ground level

Overwatch on linux

Overwatch on linux
Overwatch 1.11 running on arch linux through wine-overwatch-2.8
Full image

Yeah you read that right. Overwatch uses a directx 11 based engine and therefore the chances of ever getting a native linux port are close to zero. So the only way to ever play that game on anything else than windows is wine. But even wine can’t help you with dx11 games. Or can it? A while back I searched around about whether or not the game was playable through wine and only found that since it was using directx 11 it won’t be possible anytime soon.

Wine is pretty good at running windows software and even games on linux and MacOS. It even is so good that supposedly the mac version of sims 3 is just the windows version running through wine. Older games using directx 9 run almost perfectly with it, but once again Overwatch uses one of the latest iterations of directx, which is a collection of APIs used for creating games.

A few days back I once again searched to find out whether or not Overwatch was playable through wine and to my surprise there actually was. I stumbled upon some videos by djazz which show him playing the game on linux. From there on out I found out about lutris, which is somehting like playonlinux but in my opinion better. I followed the rather simple installation process and there we go: Overwatch running on linux through a custom version of wine which contains patches for Overwatch.

Sadly it seems that with my current setup it performs very poorly but if you have a decent PC you might be able to play it without needing windows. So if you want to give it a try first get lutris from here. Then head over to this page and click install. This will open up lutris which will guide you through the installation. If you already have Overwatch on another hdd (Maybe because you play it on windows) you can save some time by either copying it or using a symlink.

If you encounter problems installing it you can also join the discord and ask your questions in the #lutris channel. Also if this works for you, then you should go ahead and thank strider, djazz and (I think) gamax92 on the discord because they’re the ones who made that possible. You can also give the lutris devs some money on patreon, because they did an awesome job creating an open source gaming platform.

Punycode

Phishing or domain squatting is something that has been around for a while but people never stop to find new ways to trick users into handing them confidential data.

I never really got hit by any of that except for a few fishy links that looked like steamcommunity.com but for example there was an extra letter in the domain name. Now this way is easy to spot and usually your browser will block them anyways since their reported. A new way of luring people onto fake websites is Punycode. Well if I’m correct it’s not really new it just got some attention recently.

Take a look at the two urls. They are from two different websites, but they both look exactly the same, in fact I don’t remember which one is from the actual apple website anymore. That’s the power of punycode. It works in both Chrome and Firefox and any recent other browser. You can try it you yourself here (Test site: apple.com, Original: apple.com).

Punycode is used to allow special characters in urls like ü,ä,ö etc. but it also allows other characters from other alphabets that look exactly like the roman alphabet. Now while this sometimes is a useful feature it’s rarely used and it’s making it hard to tell the difference. In this case the entire domain is written in cyrillic letters (You can only really see it on the l). This way most browsers won’t see it as a phishing domain.

Depending on your operating system it might be that the current font will give away the fact that the url is not actually apple.com but on windows you won’t be able to tell. Both sites use https and have a working certificate making them look completely identical at first glance. Firefox also shows what certificate is used which can tell you whether or not you’re looking at the original site since it’ll say “Apple Inc. (US)” in the URL bar. That doesn’t happend with all URLs though so it’s not a consistent way of identifying phishing sites.

A way to dodge punycode phishing

Firefox allows you to disable punycode which is the easiest way, but it’ll also make normal website look a little off. Here’s how to disable it:

  1. Type about:config into the address bar (Accept the message if it shows up)
  2. Search for “puny”
  3. Set the value “network.IDN_show_punycode” to true
  4. Done.

Now the previous website’s URL will look like this: https://www.xn--80ak6aa92e.com/ instead of apple.com.

I’m not sure about chrome but there’s probably a way for it too but you’ll have to look for it yourself.

For the initial article and further reading (which is also linked on the testing domain) go here.