Questions tagged [sdl]
SDL - Simple DirectMedia Layer is a cross-platform multimedia library designed to provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL, and 2D video framebuffer. It is used by MPEG playback software, emulators, and many popular games, including the award winning Linux port of "Civilization: Call To Power."
92
questions
0
votes
1
answer
139
views
Object Collision in Breakout game using SDL library [closed]
Im trying to make a retro game of Breakout using an SDL library. Im still trying to learn developing and OOP. I got to the part where i want to check for collision between paddle and the ball, and ...
6
votes
2
answers
328
views
SDL Simple Wrapper Library
I wrote a little library to generate wrappers for SDL2 in C++20 with the idea to build a simple video game with it afterwards, and was looking for some feedback on the code!
The idea is not to create ...
1
vote
0
answers
161
views
Haskell SDL2 Yellow Snow Game. My first program [closed]
I have been working hard trying to learn Haskell, or at least understand it enough to make simple programs. This is my first program. I have been working on it for about a month now. I had already ...
2
votes
1
answer
61
views
SDL Stream for C++ follow up
Initial review requested here:
The big thing I had missed was that read/write either work successfully (and all requested data is read/written) or it fails the flags are set appropriately.
For write ...
4
votes
1
answer
119
views
SDL Stream for C++
Looking at the SDL library.
Looking to load images from file into an SDL_Surface using the SDL2 Image API to do this I need to implement the SDL_RWops object class in terms of a C++ stream.
The reason ...
6
votes
1
answer
185
views
Chess game for two human players
I'm relatively new to programming, as in my second semester of college. To practice C, I started work on a chess game. I'm wondering if there are ways I could improve my code, make it look more ...
4
votes
1
answer
255
views
Snake game in rust
I made a small rust snake game in order to teach myself rust. I would like to know what I am doing well and poorly, and how to improve my rust code
Cargo.toml
...
15
votes
4
answers
4k
views
Chess engine for chess without checks in C++
Project Description:
Chess without checks: A chess variant where you can take the enemy king.
This engine implementation is for chess without checks. Since checks don't exist, expect the code to not ...
5
votes
1
answer
418
views
C++, SDL, and RAII
Learning Modern C++ patterns and this ended up being the direction I went to to create an encapsulation of SDL's window management, while trying to stay with RAII practices. This is meant to be a ...
4
votes
0
answers
109
views
Testing and coding conventions for testing C with SDL
I finished my first real C project and it was Conways Game of Life. The code is working fine and the game runs. Since this was my first project though I don't know any of the real code conventions for ...
1
vote
1
answer
620
views
Snake game in C++17 with SDL2
I implemented a simple snake clone in C++, using SDL2 for the graphics part. Gameplay-wise, its pretty much classic snake: The player is able to control the snake with "WASD", food gets ...
2
votes
1
answer
166
views
C++ wrapper for font opaque pointer
I'm creating a class which has a raw pointer member which comes from a C function. In order to make it RAII approved, I just created a method free() that is called ...
8
votes
1
answer
741
views
Modular synthesizer framework for C++
While working on a much more complicated audio application, I was thinking about modular synthesizers, and whether it could be made simple to build a C++ application that implemented a modular ...
1
vote
1
answer
1k
views
How to use smart pointers with SDL2 (SDL_RWops)?
I want to write read savefile function with smart pointers and SDL2. I have little expirience with smart pointers and just want to ask is my code good, correct and no memory leaks.
this is my code:
<...
4
votes
1
answer
261
views
C++ SDL2 Space Invader C++ questions
The whole project would be a bit much to post, but there were a couple of questions that came up while I worked on this project. This is a fully working space invader game I coded in C++ with SDL2. I ...