Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn 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 -
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*3 -
Bit the bullet and installed VS and relevant compilers for C++ and started fucking around with sdl.
Not as terrible as I thought it was going to be.
Pointers seem pretty intuitive. Apparently my time with python has not in fact mentally mutilated me.7 -
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)5 -
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.6 -
My God is map development insane. I had no idea.
For starters did you know there are a hundred different satellite map providers?
Just kidding, it's more than that.
Second there appears to be tens of thousands of people whos *entire* job is either analyzing map data, or making maps.
Hell this must be some people's whole *existence*. I am humbled.
I just got done grabbing basic land cover data for a neoscav style game spanning the u.s., when I came across the MRLC land cover data set.
One file was 17GB in size.
Worked out to 1px = 30 meters in their data set. I just need it at a one mile resolution, so I need it in 54px chunks, which I'll have to average, or find medians on, or do some sort of reduction.
Ecoregions.appspot.com actually has a pretty good data set but that's still manual. I ran it through gale and theres actually imperceptible thin line borders that share a separate *shade* of their region colors with the region itself, so I ran it through a mosaic effect, to remove the vast bulk of extraneous border colors, but I'll still have to hand remove the oceans if I go with image sources.
It's not that I havent done things involved like that before, naturally I'm insane. It's just involved.
The reason for editing out the oceans is because the oceans contain a metric boatload of shades of blue.
If I'm converting pixels to tiles, I have to break it down to one color per tile.
With the oceans, the boundary between the ocean and shore (not to mention depth information on the continental shelf) ends up sharing colors when I do a palette reduction, so that's a no-go. Of course I could build the palette bu hand, from sampling the map, and then just measure the distance of each sampled rgb color to that of every color in the palette, to see what color it primarily belongs to, but as it stands ecoregions coloring of the regions has some of them *really close* in rgb value as it is.
Now what I also could do is write a script to parse the shape files, construct polygons in sdl or love2d, and save it to a surface with simplified colors, and output that to bmp.
It's perfectly doable, but technically I'm on savings and supposed to be calling companies right now to see if I can get hired instead of being a bum :P19 -
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 .-.6 -
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.
Fuck this2 -
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" -
This crazy guy who created SunVox synth released a single C file that contains a long note sequence AND the synth code itself, with echo and shit, no deps other than SDL to output audio, so you basically compile a single C file, and it PLAYS REAL MUSIC
HOOOOOW
https://github.com/pixicoder/PS
https://youtube.com/watch/...22 -
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 -
Couldn't be arsed with all the conditional compilation that angelscript required, so I dumped right back to good ol' lua for now.
Got lua in, vm started, loading strings and pushing/popping the stack.
Got SDL actually drawing as intended.
I don't know even half of what I'm doing.
Apparently header files that end in ".hpp" are specific to c++, while .h are for c headers.
I like the new SDL2 though, little bit different than SDL1. Not a lot of tutorials cover the difference, but I could kinda suss out from the documentation where I needed to adapt, even though I'm still pretty loose on the library, on the docs, and on c++ itself.
Still just a learning project.
Also, I'm continually surprised there isn't a portable, platform independent tool or little language just for replacing all pseudo-languages out there like .bat and .sh, and .zsh
Maybe even just a tool that standardizes it all, then takes config files that map the new standard to system dependant commands, so you can download the damn thing, configure the relevant environment variables, drop in the platform dependent configuration (or your browser or package tool detects what platform you are on and chooses the relevant package/download for your platform), write a console script and the tool automatically translates, and emits the system-relevant commands to that platform's console (so you don't even need much platform-specific code to do things like file access). -
Got VS running, SDL up and running and outputting, and angelscript included. Only getting linker errors on angel at the moment, not on inclusion, but on calling engine initialization.
Who knows what it is. Devs recommended precompiling but I wanted to compile with the project rather than as a dll (maybe I'm doing something stupid though, too new to know).
Goal is to do for sdl, cpp, and angelscript, what LOVE2d did for lua. Maybe half baked, and more just an experiment to learn and see if I can.
Would be cool to script in cpp without having to fuck with compilers and IDEs.
As simple as 1. write c++, 2. script is compiled on load, 3. have immediate access to sdl in the same language that the documentation and core bindings are written for.
Maybe make something a little more batteries-included than what lua and love offer out of the box, barebones editors and tooling and the like, but thats off in the near future and just a notion rather than a solid plan.
Needed to take a break from coding my game and here I am..experimenting with more code.
Something is wrong with me.8 -
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 -
Hi,
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 -
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 -
> 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
fucking goddAMMIT8 -
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 -
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 -
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 🤔1
-
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
-
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. -
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