What about gaming on FreeBSD?

A. D. Sharpe Sr.

Member

Thanks: 9
Messages: 36

I thought I should attach an image of my current project.

It runs *exclusively* on FreeBSD 10 (basically I haven't bothered even trying to compile it on any other OS ;) (I probably will at some point as a way to catch bugs).

View attachment 5119

For all intents and purposes it is basically just an arcade "Light gun" game I am developing as part of a contract with The Tank Museum to allow guests to play with real weapons from WW2 and shoot virtual targets on a screen.

It works out where on the screen they are aiming via a small webcam in the front and OpenCV to process the LCD screen position. The 3D engine is custom (written in C++ using OpenGL) to run on low spec machines (Intel NUC) and because at the time UE4 wasn't available for FreeBSD (malavon is doing a great job though!).

(Through this project, I now have a great appreciation and respect for any device that uses a coin slot machine. Who the hell decided that the British pound should no longer be round! Calibrating and communicating with this thing is a nightmare.).

This gun is a Lee-Enfield Rifle (decommissioned obviously. Which also worked well so I can get my cables in there. I am crap at guns but pretty good with an RS-232 haha).
I am also working on a similar setup for a Bren Gun and PIAT (anti-tank.).

Oops.. and I almost forgot my original prototype gun. I still keep him around because he doesn't weigh a frigging tonne during testing:

View attachment 5121
Looking good! I'm glad that someone is working on a FreeBSD based game setup. If there's anyone else working on FreeBSD game development, please post it here!
 

dexter234

New Member


Messages: 6

I still feel windows is the best platform for gaming although Wine has been bridging the gap by adding more games into their database. There is also crossover the paid version of wine, I've not tried it thou and I can't say how effective it is compared to wine. Virtual Box is another way to go but most users complain they are RAM and CPU hungry application.
 

A. D. Sharpe Sr.

Member

Thanks: 9
Messages: 36

I still feel windows is the best platform for gaming although Wine has been bridging the gap by adding more games into their database. There is also crossover the paid version of wine, I've not tried it thou and I can't say how effective it is compared to wine. Virtual Box is another way to go but most users complain they are RAM and CPU hungry application.
Yes, we know that Windows is currently the best computer platform for gaming. That's never been the question. The question is how to make FreeBSD (or any *BSD for that matter) a better gaming platform? At the very least, we should at least be able to make it a better gaming platform that either Linux or MacOS X. That's what the goal should be, NOT praising other platforms, as if ours doesn't matter.
 

drhowarddrfine

Son of Beastie

Thanks: 976
Messages: 2,869

A. D. Sharpe Sr. Until "we" create a game as good and as popular as those Windows games and requires a high end graphics card, nVidia and the like will not provide drivers native to FreeBSD. And "we" won't create a game for BSD until nVidia and the like provide native drivers for FreeBSD that run as well as on Windows.
 

A. D. Sharpe Sr.

Member

Thanks: 9
Messages: 36

A. D. Sharpe Sr. Until "we" create a game as good and as popular as those Windows games and requires a high end graphics card, nVidia and the like will not provide drivers native to FreeBSD. And "we" won't create a game for BSD until nVidia and the like provide native drivers for FreeBSD that run as well as on Windows.
NVidia has been providing native FreeBSD drivers with full 3d acceleration for years, now. Where've you been?
 

Beastie7

Well-Known Member

Thanks: 138
Messages: 363

I wonder. What's stopping the developers from including X in base? The OpenBSD guys have been doing this for years now; so there's some example of viability here. As cynical as i can be sometimes; unless FreeBSD ships with at least a basic X/DE stack, there's no hope for attracting those types (gaming, creative media) of developers.

The FreeBSD graphics team comprises of, what, 6 developers? If that team were bigger, would this be even feasible?
 

kpa

Beastie's Twin

Thanks: 1,792
Messages: 6,305

Why do you think X11 was ousted out of the base system? It was strictly to draw a firm line between the base operating system and 3rd party applications.

FreeBSD also has something called "stable ABI" and maintaining those X11 libraries in base (yes, if you include any library ín base with a public API it automatically becomes part of the stable ABI promise) was a nightmare for everyone involved because any little change could invalidate the ABI compatibility. It's still hard enough for the developers to keep this promise with the lot smaller set of APIs currently offered by the base system.

OpenBSD happens to get away with X11 in base only because they make zero promises about ABI compatibility, every time you upgrade your OpenBSD system you're expected to recompile all your own custom made software. Binary only software doesn't exist on OpenBSD because of this.
 

drhowarddrfine

Son of Beastie

Thanks: 976
Messages: 2,869

NVidia has been providing native FreeBSD drivers with full 3d acceleration for years, now. Where've you been?
My memory does not serve me well but I am not sure their highest end cards make all the features available to FreeBSD. Those drivers might also be convoluted Linux drivers but I have not looked into this in years.
 

ILUXA

Aspiring Daemon

Thanks: 372
Messages: 603

A. D. Sharpe Sr. Until "we" create a game as good and as popular as those Windows games and requires a high end graphics card, nVidia and the like will not provide drivers native to FreeBSD. And "we" won't create a game for BSD until nVidia and the like provide native drivers for FreeBSD that run as well as on Windows.
Or "we" :) may also port free nvidia video driver — nouveau,
it is working pretty well on GNU/Linux, also it is available on NetBSD also,
it should be fully usable in NetBSD 8.0.
 

Sensucht94

Well-Known Member

Thanks: 357
Messages: 374

Or "we" :) may also port free nvidia video driver — nouveau,
it is working pretty well on GNU/Linux, also it is available on NetBSD also,
it should be fully usable in NetBSD 8.0.
Yeah, that page is a bit outdated; currently Nouveau on NetBSD 8.0 supports up to 9xx (tested on 7xx, worked well, even for gaming), with upcoming 8.1 having drivers from Linux3.8 (better performance), while on HEAD DRM/KMS drivers are from, Linux4.4, so 10xx should
supported (even though I have a doubt about support having been included on Linux starting with 4.10 and later only).
 
Last edited:

malavon

Member

Thanks: 21
Messages: 28

I still feel windows is the best platform for gaming although Wine has been bridging the gap by adding more games into their database. There is also crossover the paid version of wine, I've not tried it thou and I can't say how effective it is compared to wine. Virtual Box is another way to go but most users complain they are RAM and CPU hungry application.
Don't forget about what is arguably the most important gaming-related news in years: Valve is now supporting wine through Steam using their own port called Proton (GitHub).
If this is developed further, it will impact gaming on operating systems other than windows.

As far as the (binary or open source) NVidia driver goes, to my knowledge they support pretty much everything that current game engines use.
I've used the official driver to run tech demo's of the Unreal Engine (see this forum for more information) without any issues.
The only thing we, FreeBSD people, don't have (without workarounds) is vulkan. I hope this changes soon, since Proton uses it as the default backend to translate DirectX calls to.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,618
Messages: 28,160

My memory does not serve me well but I am not sure their highest end cards make all the features available to FreeBSD. Those drivers might also be convoluted Linux drivers but I have not looked into this in years.
The core of their driver is 100% the same for Windows, Linux, FreeBSD and Solaris. It's only the kernel interface that's different. Because these drivers are all the same they support the same cards and features for all supported operating systems.

The LINUX option you can enable on the FreeBSD driver is only for supporting Linux binaries, it is not required for the driver to work.
 

shkhln

Well-Known Member

Thanks: 94
Messages: 295

The core of their driver is 100% the same for Windows, Linux, FreeBSD and Solaris. It's only the kernel interface that's different.
Notably, the shared libs supplied with the driver are different for each supported OS. The Linux driver also has nvidia-drm and nvidia-uvm kernel modules which are not provided for FreeBSD or Solaris.

The only thing we, FreeBSD people, don't have (without workarounds) is vulkan. I hope this changes soon
The reason behind Vulkan absence might be as simple as, say, build environment lacking appropriate header files. We really have no idea because Nvidia's driver devs don't seem to be talking to anyone, including actual FreeBSD devs. Same goes for the infamous vt bug.
 

Beastie7

Well-Known Member

Thanks: 138
Messages: 363

What's the difference between 'mesa3d' and the whole drm thing? I'm having a hard time grasping the purpose of the two.
 
Top