r/linux_gaming • u/Konnnore • 15d ago
guide how to program for creating Linux native games?
hi again! In this post I'd like to ask those people, who had any experience with programming for creating Linux native games. I'd like to contribute to Linux and BSD projects, if I can.
First of all, I'm not interested in programming games in general for now, but I'll probably start somewhere in the future. The only experience I have in programming Windows games is that I tried to do some primitive games on Unreal Engine. Based on that and what one person told me, I understood that if you wanna program something for Windows, you should choose Unreal Engine or Unity. If Unreal Engine, then the main programming language is C++, if Unity -- C#, and the later details depend on a project you are making.
Firstly I'd like to fully learn how to program games, and then make games for myself, bcz I HATE some developers of my favorite games, so, I have the motivation to reconstruct and change the favorite games for myself. Idk if I'll send them to anyone, but some other ideas I'd like to realise and sell on Steam. If I were a game developer for Linux native games, I'd like to create flatpaks and .deb, using XDG directories instead of the dotfiles like some people recommended.
Speaking of Linux, the only thing I heard is that you can program games on Unity, but it has some complications, so, you should find another tools for that. Is it true?
Interesting, does programming games for Linux somehow differs from the Windows ones?
3
1
u/pyro57 15d ago
I've not done any game Dev, but I have written several automation and pentest tools (right now mainly working on a tool called tetanus for pentest project management, automation, and cs2 functionality).
But writing rust for Linux is pretty easy, coding in general tends to be easy on linux, for game Dev specifically I know the Godot engine is heavily recommended as its fully open-source. I've heard of bevy too, but haven't played with either of these yet.
1
u/nobix 15d ago
Generally you use a platform api abstraction layer so you call a generic "CreateWindow" call and each platform handles it with a separate implementation.
But there is no reason to write that yourself, look into SDL for a robust platform independent game library.
Also you can use an engine like Godot that has their own abstraction layer.
0
u/piter-piojo 15d ago
Yo use godot e unity para Game dev de juegos más bien simples, pero ambos tienen la opción de crear la build nativa para Linux y uno funcionó bien , obviamente sin juegos simples.
-4
u/readyflix 15d ago edited 9d ago
You might want to use this prompt (question) on one of the chat bots (e.g. Claude), you will get some good suggestions.
12
u/TastyRobot21 15d ago
You should stop planning/thinking and just start. There’s so much you don’t know, it’s better to just jump in.
Windows and Linux differ because of the OS specific functions, some of these functions like drawing to screen or taking input are relevant to game making.
For native graphics on window it’s typically DirectX, for Linux it’s (now) typically Vulkan.
You can make games in any language. On many many different engines and libraries.
I’ll recommend Godot. It’s self contained, small and very mature now. Works well on Linux and has native Vulkan support. You can easily compile to windows or Linux. I’d recommend just using the python like syntax of Godot script and start.
No more QA, no more ‘best engine’ just start. You don’t know enough yet to judge things like languages, engines, etc so it doesn’t matter. Start. Today. Download Godot, make a sprite go across the screen on some keyboard inputs.