Loni learns to SDL

hi! im loni, it’s been a hot minute since ive programmed outside a game engine, but i was getting tired of having to fit my ideas into their frameworks, so lets just start lower than that! and for that ive chosen SDL3, since ive already had a bit of experience with SDL2…although both a really long time ago, and also i didnt do much with it! lets hope that these attempts gets farther than that!

oh nice!! i feel like this site is becoming something of a small hub for custom-engine games lol. would be interested to hear about your history with SDL or even other tools before, etc.

If you want to go expert-mode challenge on this - Have you been looking into the new SDL3 GPU library? I can’t 100% remember if its been standardized into it yet, but all the SDL_GPU_XYZ funcs. I have a real interest in it just as this idea of ‘you can do gpu stuff straight from your base library now without worrying broadly about drivers and porting’ - which sounds like a huge load off the shoulders. given their GPU library is any fun to work with…

best of luck! SDL is a bunch of fun imo, the documentation is very good and where its lacking you can read the sources (they are very clean to follow compared to other big projets)

SDL3 is ABI stable since the 3.13 prerelease, if you want to try it out its safe to write code as of now. i messed with it for a bit a month ago, since your message revitalized my curiosity and i’ve the day off i’ll clean it up and try to have something on the screen (i’ll push progress real time here learningsdl3gpu - trying out the SDL3 GPU API)

oh yeah - thats the link i was looking for. i have yet to touch it because there are not any rust bindings yet ehehe :<

well, my story with gamedev began back in 2012, when i first learned about minecraft mods, i jumped at the bit to try it out, reading a bunch of very basic java tutorials on how to get a hang of it…i never figured out larger things like “compiling” or “debugging” tho, and my twee lenovo laptop, which already could only barely run minecraft, was not happy about it,
later, due to the suggestions of some ppl in a irc chat i frequented, i tried out C++, and thanks to their help, i actually got really far ahead (comparatively), i didnt know what a “struct” or a “class” was, and my code was a rat’s nest of if’s & elses, but i made a sokoban game that ran in the terminal! i was very happy with it!
afterwards i was looking of ways of actually putting graphics into this, and the options i saw were allegro, sdl, and sfml, i first tried SFML because of the recommendation by the Open Hexagon’s dev and…i dont know what but my coding practices made it have absolutely ATROCIOUS performance! and then in the process of fixing it i ran into oob pointers over and over, so i dropped it, skill issue
SDL2 was next in line, using Lazy foo’s tutorial, since most of the times i was programming i didnt have internet, i had downloaded the whole website at my grandpa’s place, and was working off my local copy, i kept running into the problem that i wanted to do something, but because i only had few of these tutorials at hand, i had no frame of reference of how to do it, got frustrated and dropped it
Around here, we got internet at home, and learned about handmade hero, uhm, i only really watched the first few episodes to get something working with win32 and…i was hooked! i could look up documentation in MSDN ONLINE! and it was accurate! and they gave you small code samples on how to use it! and! I managed to get a software renderer running entirely on win32, no dlls needed, barely using anything from the c/c++ standard library…but…tragedy would befall when i needed to display textures, no matter what i did, i never managed to get the order of the loops right, or i had off by one errors, etc…gave up, moved on
after all that debacle, i went into college for animation, because putting all this time into programming and art and music meant that my [local equivalent of gpa] was abysmal xD, i kept toying around with other, easier to use technologies, did some web stuff, did some toys with gamemaker…Last year, i was the programmer for a game we had to do in class for a whole semester (in unity!), and it was the most fun i had in ages!! it really reignited my flame for the whole “games developer” thing, this, together with my disatisfaction i had with my career, meant that now i dropped that, and im going to go to trade school for programming next year! I have plenty free time right now, so i wanted to pick up this old flame that i tried really hard to make work…and im having fun!

yeahhhh, i took a glance at it, im pretty wary of working directly with the GPU…my pasts experiments have only led me to sad things, and despite this API looking a lot simpler and nicer than say, working directly with dx9, i dont think im ready to tackle it just yet, did consider it though!

I managed to add word wrapping support to the textboxes!
but im having a pretty tricky bug with it…


in some occassions, it doesnt seem to respect my padding…i think i need to draw some test rectangles to see whats going on
EDIT: just added +1 to the line length check and it fixed it, i would like to know why

been hard at work at the animation system, delta time is hard!!