Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Search - "sdl"
Well, guess I'm eating my shoe it seems .-.
(Trying to get font rendering working in SDL2 and for whatever reason, loading a direct TTF file works but as soon as I load it into RWops and pass to SDL, it suits the bed)9
Well I gave myself a challenge. That I will do programming at least 1h everyday for 100 days.
Because my SDL programming sucks.
I hope this will help.
P.S: SDL is hell with not proper tools. Cannot even rotate rectangle without another library and a lot more bad stuff. I hope they will add it.6
I dont remember exactly as it was long time ago but i think it was GUI app using SDL. It was calculator.
Protip: always account for endianness when using a library that does hardware access, like SDL or OpenGL :/
I spent an hour trying to figure out why the fucking renderer was rendering everything in shades of pink instead of white -_-
(It actually looked kinda pretty, though...)
I'd used the pixel format corresponding to the wrong endianness, so the GPU was getting data in the wrong order.
(For those interested: use SDL_PIXELFORMAT_RGBA32 as the pixel type, not the more "obvious" SDL_PIXELFORMAT_RGBA8888 when making a custom streaming SDL_Texture)7
So... C++... Yeah.
> Manage to get a MinGw compiler working in VSCode, and all is "well and good".
> Have difficulties installing SDL, follow tutorial verbatim.
> Compile error.
> 7 hours later no progress.
> 10 hours later no progress.
> 16 hours later no progress.
*Throws laptop at wall*5
There are few things that I regret like I didn't start with SDL or openGL sooner but there is few things that I fucking do not regret.
One of them is that I become part of this community.
I regret that I didn't know that when you reach10K your motifs will be 99 all day
Why the fuck everyone in indian game dev industry is obsessed with unity fuckkkkkk !
Don't you know you only need some lite runtime like OGL or SDL for those shitty "hyper casual" games
Also why the fuck is an experience in building hyper casual games is a requirement isn't this side scroller hack and slash knockoff good enough for you to know I'm competent enough
Fuck you dumb shit for brains people who are heating up phones by using unity just for a shoot the hoops game.9
I was 8 and I was at grandpa house and he had computer lying at ground while it was opened.
It looked cool to me so I asked him to learn me and he did learn me the total basics then when I got home I downloaded C compiler (damn I don't know which one it was) and well learnt total basics of C and made few simple programs.
And I continued to learn even when I was 10 made couple of basic apps (calculator and that kind of stuff) and I continued learning and well after 10 years here I am.
Almost18 years boy that knows C pretty good (10 years experience)
While that 10 years I started to learn C++ too and Java too but I still learnt C the most probably cause I never stoped learning it.
4 years back I found out about SDL and learnt it damn it was cool now I want to learn OpenGL(Yea I'm learning it kinda late but oh well)2
OK so after working with SDL for a bit, we have a circle rendering!
Next step is to start working on keyboard input and then onto importing sprites, first time building a game engine from the ground up and working with Vala in this capacity...
EDIT: Gif in comments because it doesn't want to work .-.8
I made a game out of boredom and I think it looks cute.
Full size: https://dl.dropboxusercontent.com/s...4
I've been working on my term paper and writing an SDL-OpenGL program for it. I wanted to implement GLSL shaders. Took me only 6 hours and three cocktails.
And after the ordeal I ended up with this unholy flickering mess which just hurts to look at.
It's frustrating, doing all this shit for something that doesn't even work properly.
Me: "I wanna mod Ikemen so it can have tag presets, a replay recording manager, a player card for online games, a gallery,..."
Windows: takes a whole day to update
Me: "I wanna mod Ikemen so it runs on Ubuntu"
Windows piece of shit mother fucker useless trash.
Why can't I just compile without the dumb ass "Antimalware Service Executable" having to check every single fucking file and eating fucking 4GB ram. God damn it. fiadsfleaf oaiehjf afpo jafj
I start compiling binutils and then the whole thing fucking crashes ad;adsfjhc odshfaj;sdl hfja;odsfh;osa dhif;aosdhfi a;osdihf;skdjnvba; dsjch;soduf;dsao fu;nodjf ;anaod11
Okay, going to delve into the world of C game programming. I come from a JS/React background and wondering where to start. I did a C project back in uni so I know some foundations.
Idea is a 4x space game with simple 2d shapes representing ships, inspired by an old game I can't remember the name of (anybody?)
Firstly, I am thinking Allegro as the lib, it seems to be more maintained than SDL. Does that seem good? Though not sure where to start, or any tutorials for someone who is scratchy with C.
Any advice on how to structure my code?
I like the idea of entity component system, is that sensible?
Cheers for any help10
so recently i have been through memory management hell. maybe i should rethink about pointers and stuff.
long story short: i have done a calendar app using SDL2 and the program is written in C++. when rendering textures using fonts i referenced null pointers to the font.
i will implement events in the future and if you have any suggestions or some advice leave it in the comments, the feedback helps me a lot!
anyways you might give it a try (i am sorry about the makefile not working, i built the app on windows and needed to link against the folder where sdl is located): https://github.com/zetef/calviewer3
So currently working on a basic game engine written in Vala using SDL, fuck me it is such a rabbit hole!
Have a basic renderer and and was using the default SDL frame rate manager and decided to write my own so I could knock out using the SDL gfx package.
So now I have to create a window manager and renderer manager just to handle a basic framerate manager that isn't completely negated by VSYNC....
Okay I've commented on multiple people's post already but I've decided to write a rant on it.
GOD I hate C++. For our software architecture minor we have to develop a game with only C++ and SDL and it's been one big freaking nightmare.Where almost every freaking language I've worked with has a proper way to add third party libraries most of them in C++ don't even fucking work after spending half a day. I know a lot of you guys love programming in C++, but it's been the language I've been struggling the most with in four years of university. Unbelievable. Fuck it's freaking pointers and all it's bullshit.3
I want to install linux besides windows on my new computer (i7-8700k, gtx 1080). I use debian with i3 on my laptop for work and want to have a similar development environment at home. Does anyone have an adive to choose between ElementaryOS and Arch, or just stick with Debian. i3-gaps will be the wm, I just can't use another one ;)
Does one distro has better support for Nvidia cards in fact I would like to try CUDA.
I do not have other requirements; mostly webdev with python in the backend, and a little c++ game with SDL. This should not be a problem in a new distro.
Thanks for some advices and pro/cons11
> looking for a ZX81 emulator
> the most accurate one is SDL for Mac
> snap for Linux
> alright fine i'll use stupid fucking gay-ass snap
> after fixing snap's fuckups twice it's finally running
> all my ROMs and BIOSes are on my 4TB HDD mounted at /big and symlinked at ~/big
> SDL CAN'T FUCKING SEE EITHER
> "well it supports drag and drop we'll use that" segfault
> "fine i'll put the bios or w/e it wants in ~" not valid, apparently
Just spent a full fucking day working on a C binding for Vala to use GLFW as the main OpenGL entry point... Only to now discover that SDL has an already impimented OpenGL window class and allows for basic 2D operations...
Well that was time well fucking spent1
Just coded a simple SDL program after a two weeks break without a compiler error(more than 100 lines) from memory . Something must be missing . I don't trust this program 🤔2
I'm creating a bitmap font right now and wanted to automatically generate a image with some text so I can track my progress how it looks. gnome-font-viewer displays it fine, but it'd nothing compared to some real text. Well, how hard can it be?
First attempt: Use ImageMagick to create an image and draw some text. I found a forum post in the ImageMagick forums from 2017 claiming incorrect rendering of BDF fonts, which was promised to be fixed. Yet convert does exactly nothing besides saying “couldn't read font”.
Looking around, there is exactly one tool for the job I'm looking to get done: pbmtext. It works, but doesn't support Unicode. Egh.
Maybe I could write a short script to do it, then? Python's Pillow can import Bitmap fonts (cairo can't). Halfway done I notice it can't deal with anything outside of the character range 0..256.
Using FreeFont directly is out of the question as that seems to be equally much work as creating the font in the first place. I briefly tried SDL, but the font formats it understands are limited.
So how about converting the font then, you ask? Everyone seems to be only concerned about the other way (like OTF to BDF). I tried loading the font into FontForge and exporting an OTF or TTF but couldn't get anything out of it that ImageMagick recognizes as a font.
It seems fucking impossible to render text to an image with an Unicode BDF font in some automated way.
To add insult to injury, my searches containing “bdf” are always interpreted as with “pdf”. I'm not even a Franconian, I can distinguish B and P!4
Worst dev experience of 2016: compiling and including SDL and SDL2 into C projects, never got it to run all the functions, sometimes wouldnt compile, etc... Never got it to work properly in the end...3
Contemplating ideas for a game that will involve some exploration and puzzles (aimed at teaching some low-level computer stuff like binary etc.) Replayed an old 2D game in an emulator, looked at some old adventure games, decided a 2D platformer might work for what I'm aiming for.
So I start making some pixel art, simple things like 32x32 tiles for bricks, some bigge ones for doors etc. And I discuss some ideas with my girlfriend for what kind of scenarios would fit into this game world.
Anyway, she normally draws and paints, but seemed interested in trying pixel art so I gave her a link to Piskel and a rough idea of some decorative items I'd want to put around the map. Within a few hours she created a flower pot with flowers, a coffee machine, a light with lightshade, a small pile of books, and a couple of other things - all shaded and detailed beyond any of my attempts, including lighting going from left to right (which I wanted but didn't specify).
I mean, I could've expected this but pixel art is quite a different beast to drawing or painting as you have to do more with less.
Now I just need to make my game engine. So far I have an SDL program with a flowerpot that you can move around xD1
What's the most sensible way to build and use 32/64-bit libraries with MSYS on Windows? Specifically, I am wondering about zlib and libpng along with SDL2.
I know there are pre-built versions available, but I am inevitably going to need to build other libraries in future.
I'm expecting things to go into /usr/local (which they do), but I'd like to have separate builds for 32-bit and 64-bit. I know I can put things into "lib32" or "lib64" using ./configure options pretty easily, but DLLs (e.g. SDL) seem to end up in "bin" so I assume I should create a "bin32" and "bin64" for those?
Then there's the issue of e.g. libpng not being able to find zlib's headers when using its MSYS makefile... Should I be editing these makefiles? It looks as though I should (things are commented-out etc.) but when I want to update to a newer version, I'll need to modify the makefile again.
It probably sounds like a really silly set of questions but I've always found that building and installing libraries on Windows feels really clumsy and I just want to make sure I'm not making a really messy dev environment.