aeva,
@aeva@mastodon.gamedev.place avatar

I don't actually have time today to work on any side projects, but I thought I'd run through the basic setup steps for MonoGame aaaand

./bin/Debug/net6.0/MyGame
bash: ./bin/Debug/net6.0/MyGame: cannot execute: required file not found

... which required file ._. ???

I think this sort of thing means it tried to dynamically link something and failed. I run into this whenever I try to run loose builds of Linux games on , but idk what to do about it.

scherzog,
@scherzog@mastodon.gamedev.place avatar

@aeva It's amazing how bad the experience with runtime linker errors is on NixOS given that they happen with literally every prebuilt binary. In this case I would usually start by dropping myself into a basic dev shell: 'nix-shell -p stdenv'

docRekd,

@aeva have you tried steam-run? Is the sandbox uses to run

aeva,
@aeva@mastodon.gamedev.place avatar

@docRekd I just did it doesn't work (there's another reply thread about it)

aeva,
@aeva@mastodon.gamedev.place avatar

In this case I just tried doing this:

> nix-shell -p dotnet-sdk_8

> dotnet new --install MonoGame.Templates.CSharp

> dotnet new mgdesktopgl -o MyGame

> dotnet publish

> dotnet run (fails, similar error)

> ./bin/Debug/net6.0/MyGame (fails w/ error above)

aeva,
@aeva@mastodon.gamedev.place avatar

I think I fixed everything that was reported missing by ldd, but it still cannot grasp ye flask :/ https://gist.github.com/Aeva/7b59e0e874e1f7e77bf384d250d4f50b

scherzog,
@scherzog@mastodon.gamedev.place avatar

@aeva Does running with 'LD_DEBUG=libs' yield anything useful?

aeva,
@aeva@mastodon.gamedev.place avatar
aeva, (edited )
@aeva@mastodon.gamedev.place avatar

I think I figured it out, this seems to work: https://gist.github.com/Aeva/227e45b886500d315c0bd00af635d985

The problems I ran into that this seems to solve are:

  1. I was using the wrong .net sdk lol
  2. There's a bunch of libraries it needs but can't find at runtime

I also need to switch to using dotnet run to launch it for whatever reason. That also wasn't working before, but now it is.

scherzog,
@scherzog@mastodon.gamedev.place avatar

@aeva 1. Was that wrong dotnet perhaps referring to an old ld.so that had been garbage collected? (and your executable invoking that as its interpreter akin to an incorrect shebang in say, a python file) 2. is the one that should be easy to figure out with ldd and LD_DEBUG=libs

aeva,
@aeva@mastodon.gamedev.place avatar

ok new monogame-on-nixos mystery - I thought I got it working, but it turns out once a subclass of Microsoft.Xna.Framework.Game is constructed the process exits with no error printed to the console ._.

mcc,
@mcc@mastodon.social avatar

@aeva hm just checking do u have access to the discord

aeva,
@aeva@mastodon.gamedev.place avatar

@mcc which discord?

Private
Private
Private
Private
Private
Private
aeva,
@aeva@mastodon.gamedev.place avatar
curved_ruler,
@curved_ruler@mastodon.gamedev.place avatar

@aeva planetary orbit

Setzer22,
@Setzer22@mastodon.gamedev.place avatar

@aeva Nice! How does work? 👀 Is it a mesh? CPU texture? Shader?

aeva,
@aeva@mastodon.gamedev.place avatar
Setzer22,
@Setzer22@mastodon.gamedev.place avatar

@aeva Cool! I keep getting surprised at how many sprites monogame lets you fit on screen 😁

aeva,
@aeva@mastodon.gamedev.place avatar

@Setzer22 it seemed fine with 10,000+ but I wanted the trails to not be too long. It's probably instancing quads under the hood, so, it should be pretty efficient.

Snowshadow,
@Snowshadow@mastodon.social avatar

@aeva
Wow this looks cool.!😀

aeva,
@aeva@mastodon.gamedev.place avatar
aeva,
@aeva@mastodon.gamedev.place avatar

I've made some progress on getting running on the hell distro! The surprise exit-without-error was a segfault (thanks strace!), which apparently was because cleverly hid away udev, which is famously an optional component in all modern Linux distros. Now with that fixed, it simply cannot OpenGL:

"Unhandled exception. Microsoft.Xna.Framework.Graphics.NoSuitableGraphicsDeviceException: Failed to create graphics device!"

(fails somewhere in MonoGame.OpenGL.GL.LoadExtensions)

jpab,
@jpab@mastodon.gamedev.place avatar

@aeva good luck!

(I bounced off nixos quickly both times I tried it :-/)

aeva,
@aeva@mastodon.gamedev.place avatar

@jpab I can't imagine why lol. I might cave and use https://distrobox.it/ to run two distros at once, but the instructions want me to learn what a docker and a pod man are and I don't know if I'm ready to become that sort of person.

aeva,
@aeva@mastodon.gamedev.place avatar

@jpab tbh I'm also kinda tempted to say screw it, I'm switching back to Windows.

thomastc,
@thomastc@mastodon.gamedev.place avatar

@aeva @jpab Fwiw, I don't think running games inside Docker or Podman is trivial either.

aeva,
@aeva@mastodon.gamedev.place avatar

@thomastc @jpab it could be that distrobox is over selling how easy it is. I have no idea. They make it sound like I just need to setup that one thing, and then I can shell out to another distro that's nicely integrated with the host distro tho. It sounds too good to be true tbh.

esther_alter,
@esther_alter@mastodon.social avatar

@thomastc @aeva @jpab I've explored this topic pretty thoroughly and: If you want the game to use a GPU, no it's not simple and anything telling you otherwise is at best stretching the meaning of "easy"

ryanprior,
@ryanprior@mastodon.social avatar

@esther_alter @thomastc @aeva @jpab for another anecdote, I run games in containers all the time (with flatpak) - it worked out of the box, I never configured anything or followed a guide.

aeva,
@aeva@mastodon.gamedev.place avatar

@ryanprior @esther_alter @thomastc @jpab I don't know flatpak - would I be able to set up a generic container for development this way, or would it still require me writing a Package instead of my game?

ryanprior,
@ryanprior@mastodon.social avatar

@aeva @esther_alter @thomastc @jpab flatpak does require packaging work on your (game developer's) part. It should be seamless for the gamer. If there's a guide to .NET packaging for flatpak that might put you on the right track.

aeva,
@aeva@mastodon.gamedev.place avatar

@ryanprior @esther_alter @thomastc @jpab I see. So this doesn't solve my immediate problem, but I'll probably need it to solve a similar one later on

duckonaut,
@duckonaut@mastodon.gamedev.place avatar

@aeva nixos, It's Great For Development. I'm running it on my server but I can't imagine using it on a desktop, it's just so alien that I feel making software meant to be ran on other machines on NixOS is just asking for trouble

aeva,
@aeva@mastodon.gamedev.place avatar

@duckonaut what I genuinely like about running NixOS is I can do things like decide to try KDE on a whim and then go "HOLY SMOKES THAT WAS A MISTAKE" and then just roll back to what I was doing before without toasting a bunch of random stuff glares at Debian

aeva,
@aeva@mastodon.gamedev.place avatar

@duckonaut people told me I shouldn't use the package manager to install packages I'd use in userspace though, which makes no sense to me, but I don't mind having 100 shell.nix files everywhere.

aeva,
@aeva@mastodon.gamedev.place avatar

@duckonaut so far running games seems to be a trial of error of downloading the linux version, then remembering that NixOS can't run Linux applications, and then downloading the windows version and running it in wine lol

duckonaut,
@duckonaut@mastodon.gamedev.place avatar

@aeva beautiful. I mean to be completely fair Linux isn't even that good at running Linux games, Proton and Wine really are just saviors

muvlon,
@muvlon@hachyderm.io avatar

@aeva @duckonaut You can safely ignore them and yeet everything into environment.systemPackages. I've been doing that for years and the high court of NixOS hasn't been able to punish me yet.

anselmschueler,
@anselmschueler@ieji.de avatar

@muvlon @aeva @duckonaut maybe they were talking about nix-env?

aeva,
@aeva@mastodon.gamedev.place avatar

@anselmschueler @muvlon @duckonaut probably. I don't remember. Nix seems to have like 400 ways of installing packages so idk.

muvlon,
@muvlon@hachyderm.io avatar

@aeva @anselmschueler @duckonaut It may seem so but that is really not the case. You see a way to install packages is just a morphism from packages to system configurations of of which there is in fact an uncountable number!

aeva,
@aeva@mastodon.gamedev.place avatar

@muvlon @anselmschueler @duckonaut how blessed we are to have such a marvelous bounty

gkrnours,
@gkrnours@mastodon.gamedev.place avatar

@aeva this remind me the time I installed an openbsd machine, installed openarena, made a second user, started openarena and boom, crappy fps. Turns out, hardware acceleration require to be in the video or staff group.

BenBot,
@BenBot@mastodon.gamedev.place avatar

@aeva I have spent so much time trying to get nix environments set up.

For sanity’s sake I use a devShell flake nowadays.

Double check that you have the libGL and maybe libGLU packages installed. I always forget about them.

aeva,
@aeva@mastodon.gamedev.place avatar

I've noticed this thread showing up in search engines while trying to research the problem, so for the benefit of any poor souls who might be out there trying to figure this out present or future: I gave up.

As a work around, I'm now using a Fedora container thing via distrobox. Here's the nix-shell I'm using to make that work + some notes https://gist.github.com/Aeva/cd254dea1e68c63ea736aa64695085fd

aeva,
@aeva@mastodon.gamedev.place avatar

oh good, [wayland or gnome or whatever I don't care anymore] is forcing DPI scaling on the MonoGame window, and there's probably no way to prevent this because forcing it to use wayland instead of x11 just breaks it.

mcc,
@mcc@mastodon.social avatar

@aeva As a gnome user I very much regret to inform you that this is a Wayland problem but it's a Wayland problem exclusive to the Gnome Wayland server, the KDE Wayland server does not have this limitation.

aeva,
@aeva@mastodon.gamedev.place avatar

@mcc I'm so tired of all this

tess,
@tess@mastodon.social avatar

@mcc @aeva that's because every distribution of Wayland has a different set of extensions built in, providing subtly (or sometimes radically) different functionality! Isn't Wayland great?

aeva,
@aeva@mastodon.gamedev.place avatar

perhaps by the time everything has been forcibly rewritten to target wayland instead of x11, they'll decide that wayland just isn't hot and exciting anymore and we'll all just have to go convert everything all over again to use gofuckyourselfland instead

tess,
@tess@mastodon.social avatar

@aeva "Wayland" is a curse word when it comes out of my mouth, 100% of the time

aeva,
@aeva@mastodon.gamedev.place avatar

@tess you've seen some shit I take it?

tess,
@tess@mastodon.social avatar

@aeva I HAVE INDEED

(what an absolutely terrible environment, especially for testing)

tess,
@tess@mastodon.social avatar

@aeva Wayland is the gcc of windowing systems

oblomov,
@oblomov@sociale.network avatar

@tess @aeva feeling mighty generous in our comparisons today, eh?

tess,
@tess@mastodon.social avatar

@oblomov @aeva eh, that was probably unfair to gcc. It's gotten marginally better since the mid 2000s.

Then again a lot of that is probably improvement in the C++ spec and not the gnu project.

oblomov,
@oblomov@sociale.network avatar

@tess @aeva I mean, you can probably make it still work comparing gcc to GNOME's Wayland compositor (Mutter?), and Wayland to some imaginary language designed to replace the entire C99 standard with … an efficient printf ABI or something like that.

bitinn,
@bitinn@mastodon.gamedev.place avatar

@aeva not to hate on open source but you can’t say this isn’t a common open source experience for large ecosystem.

aeva,
@aeva@mastodon.gamedev.place avatar

@bitinn that's why it's so irritating. my hands shake at how shit it all is

dotstdy,
@dotstdy@mastodon.social avatar

@aeva look don't worry about it, the third committee meeting about wayland high dpi scaling is well into its 6th year, and all portents agree that a swift resolution is in sight.

aeva,
@aeva@mastodon.gamedev.place avatar

ok this may seem backwards given the video I posted last night of the psychedelic spirograph thing I made, but you'll just have to take my word for it that I'm now branching out to doing more complex things with MonoGame.

curved_ruler,
@curved_ruler@mastodon.gamedev.place avatar

@aeva THE HOLY TRIANGLE TO THE TRIANGLE GODS

aeva,
@aeva@mastodon.gamedev.place avatar

@curved_ruler VERTICES FOR THE VERTEX VORTEX

aud,

@aeva I swear to god if they do that I will create an army of spambots telling them all to go fuck themselves

I am not putting up with another ten years of UI garbage just for some decent trackpad gestures

aeva,
@aeva@mastodon.gamedev.place avatar

@aud Linux is so good they've had to burn it down and rewrite it all from scratch pretty much continuously since the very beginning.

aud,

@aeva inside of me are two programmers. One hates Microsoft, one hates everything else.

aeva,
@aeva@mastodon.gamedev.place avatar

@aud What I've come to appreciate over the years is that there's no unified entity called Microsoft. There's lots of things called Microsoft that are working cross purposes to one another, and some of these Microsofts are doing positive things and some of them very much are not. Same as anything else. The people who think otherwise (good or evil) are nursing a fantasy that anyone with any power has any plan at all.

aud,

@aeva Yeah, it's why I like to point out that while I dislike Microsoft as a business (and am personally still very angry at them), there are a lot of people I've met that are doing good work there.

Of course, if the eye of the C suite hits that area of the company, things can go poorly rather fast. And it's a fool that trusts a company beyond what a contract will stipulate, because there are so many shifting entities behind the enforcement (or lack thereof) of the contract that, well, what is there to trust? Who are you dealing with when it comes to brass tacks? etc etc etc.

aeva,
@aeva@mastodon.gamedev.place avatar

@aud I wouldn't call all of those people who got laid off in the recent blood lettings "fools".

aud,

@aeva sorry, just early and a bad use of words. I agree, and not just because I was laid off in an earlier blood letting.

aeva,
@aeva@mastodon.gamedev.place avatar

@aud ah, sorry I forgot that you were working with them before

AngryAnt,
@AngryAnt@mastodon.gamedev.place avatar

@aeva Don't worry - the way gnome has been approaching standards lately, you'd probably be looking at a gnome specific wayland-less stack at that point - with arbitrary behaviour based on "that's what looked more neat & took up less bullet points on my slide deck" ;)

aeva,
@aeva@mastodon.gamedev.place avatar
eljojo,
@eljojo@ruby.social avatar

@aeva I’m sorry this has been so painful :( My experience with nix has been similarly frustrating at times. The declarative nature has paid off dividends to me but game dev may be different.

aeva,
@aeva@mastodon.gamedev.place avatar

@eljojo I'll find a way though eventually. It might be "do the development in a vm and let someone else worry about packaging it", but eh.

This particular adventure aside, I do really like NixOS as a operating system for most things. There's a lot to like about it, but in this particular case I just want to work on my game today and nix just really really wants me to not be doing that :/

aa,

@aeva may need nix-ld

ldd will help you find which file though of course

aeva,
@aeva@mastodon.gamedev.place avatar

@aa magic, thanks :)

aeva,
@aeva@mastodon.gamedev.place avatar

@aa any idea what package provides libstdc++.so.6 ?

phaer,
@phaer@fosstodon.org avatar

@aeva @aa I found https://github.com/Lassulus/nix-autobahn very helpful to answer questions like these. :)

aeva,
@aeva@mastodon.gamedev.place avatar

@phaer @aa looks handy. I like that the readme doesn't say how to install it 💀

  • All
  • Subscribed
  • Moderated
  • Favorites
  • NixOS
  • DreamBathrooms
  • magazineikmin
  • khanakhh
  • InstantRegret
  • rosin
  • Youngstown
  • ngwrru68w68
  • mdbf
  • slotface
  • normalnudes
  • Durango
  • kavyap
  • everett
  • GTA5RPClips
  • JUstTest
  • tacticalgear
  • osvaldo12
  • thenastyranch
  • tester
  • Leos
  • modclub
  • ethstaker
  • cubers
  • cisconetworking
  • provamag3
  • anitta
  • megavids
  • lostlight
  • All magazines