In which I have fun with raycasters again but stop before the fun part:
https://kennethrapp.net/posts/fun-with-raycasters-part-1.html
I'll finish this eventually. I've got "weekend hacks" going on for years.
In which I have fun with raycasters again but stop before the fun part:
https://kennethrapp.net/posts/fun-with-raycasters-part-1.html
I'll finish this eventually. I've got "weekend hacks" going on for years.
Before jumping into more complex tasks (like stuff that I'd need to actually design, lol) I decided to implement a simple fog of war. Not too pretty, but works!
I think FoW is one of the things that is actually easier to implement when not working with an engine, since you don't have to figure out layers and depths and such, just draw a bunch of black rectangles and that's it.
So I ended up not doing traditional collision checking at all, but relying on flocking to keep the units from colliding and it's actually working pretty nicely!
(re: working on a simple RTS game with C and SDL3)
Found some time to work on the RTS again and got the unit selection working quite quickly and refactored the code a bit to support multiple units easier.
So, off to the next task and it's a "fun" one: collisions!
My first thought is, instead of checking collisions for every unit while moving (O(n^2)) I'll just loop through the units once and for each unit test it against the next ones in the list (as the previous ones have already been tested)
(re: working on a small RTS game with C and #SDL3)
Ok, now I have a rudimentary tilemap plus a simple animated character with A* pathfinding implemented.
I didn't really track the time, but I'd estimate it took around 5-6 hours to implement. So, especially with more experience, I'd say C & SDL3 are a valid combo for game jams too.
Everything, save for one utility header file from an earlier project, was written from scratch.
Next more & selectable units.
Alright, with a little change in SDL to also return device IDs in "absolute mode", I can now write multi-mouse applications in the LÖVE game engine! \o/
Here's a little physics playground! Already a lot of fun with two people! :D
So I tried it in pure #SDL3! I thought I'd never have to code something in C again, but here we are.
And indeed: The device IDs are always 0 there, as well – making it impossible to differentiate my two mice.
I haven't figured out why yet; might need some deep-dive into the SDL code to find out? Or maybe I'm not passing the events in properly from "above" (my hacked niri compositor). But given that the other approaches worked, it's maybe something in the SDL pipeline…
Will probably be a long way away from anything usable but start working again on a 2d game framework for Odin that sits atop SDL3GPU api. #odin #programming #gamedev #sdl3
I've just come across a very interesting series about making a GUI application with SDL. https://youtube.com/watch?v=6hIaEHzlmFc. Despite the fact that #SDL2 is used, the code can be easily ported to #SDL3. Thank you @icculus!
Juha ‘capehill’ Niemimäki has released version 3.4.0 of the SDL multimedia library for AmigaOS 4.
Ich bastel mal wieder an #GeorgeDecker rum. In den letzten 2 Wochen habe ich die Grafik-Engine von SDL2 auf #SDL3 portiert. Unter anderem ergibt sich dadurch die Möglichkeit Grafik-Shader zu verwenden. Ich habe daher mal einen Unschärfe-Effekt eingebaut. Nur Elemente, die auf dem Weg der Spielfigur liegen, werden scharf gezeichnet. Alles dahinter wird weich gezeichnet. Je weiter weg, desto unschärfer wird es. Auch Elemente vor dem Spieler sind jetzt unscharf. Ich glaube, das gibt der Grafik mehr Tiefe.
RE: https://mastodon.gamedev.place/@icculus/115821614068025963
Wanted to mention that the #vala vapi bindings to #sdl3 have also been updated for 3.4.0!
https://codeberg.org/edwood-grant/sdl3-vapi
Also wanted to say some things about the bindings:
* I added a preliminary SDL3 Mixer vapi. Mind you, there are no examples for it, and you'd need to use the current master version of SDL to make it work.
* I also made the SDL vapis POSIX compatible if you want to use the vala POSIX/LIBC profile.
* I have added some docstrings to the vapis. Lots of work left though.
Hi stranger on the internet
I'm learning #sdl, with C lang and I think it's pretty good, but I'm still new to #sdl3.
Do you have any suggestions for me as a master of SDL?
#code #suggestion #advice #programmer #programming #help #c #cpp #clang #gcc
Juha 'capehill' Niemimäki has released version 3.2.28 of the SDL multimedia library for AmigaOS 4.