Questions tagged [sfml]
SFML (Simple Fast Multimedia Library) is a portable and easy to use multimedia API written in C++. You can see it as a modern, object-oriented alternative to SDL. SFML is composed of several packages to perfectly suit your needs. You can use SFML as a minimal windowing system to interface with OpenGL, or as a fully-featured multimedia library for building games or interactive programs.
sfml
3,630
questions
0
votes
0
answers
10
views
SFML sf::Touch position is wrong
`
if (button.isDown(0))
{
sf::Vector2i buttonPos = button.getPosition(1);
std::cout << buttonPos.x << std::endl;
}
`
I'm a beginner, coding on mobile.
When getting the position ...
0
votes
0
answers
12
views
How do I set up collision criteria in SMFL between CircleShape objects using object attributes?
I am implementing the simple game "Connect Four" and want to detect the presence of a stationary disc immediately below a falling disc as criteria for the falling disc to stop.
I am using ...
0
votes
0
answers
22
views
How to project shape into correct positiong C++ SFML
I'm trying to make a simple shape projection into my screen but I can't get the correct position for the rectangle shape. I want to make it so that my world width and height bounded by [-1, 1]. For ...
0
votes
0
answers
29
views
sfml widget with transparent background in Qt
I am using the QSFML repo to use sfml 2.x inside a Qt 6.x widget.
I cound not find a way to make the sfml background transparent to see classic qt widgets behind the sfml widget (whatever I try the ...
1
vote
1
answer
16
views
CSFML Background not loading
I'm trying to learn how to use CSFML. And i created this basic window:
my_window_t *init_window(void)
{
my_window_t *temp = malloc(sizeof(my_window_t));
sfTexture *texture = ...
0
votes
0
answers
47
views
How can I add parallelism to nested loops here?
I am currently developing a c++ minecraft clone in sfml and am trying to implement parallelism for rendering and modifying the chunks using a thread pool. The main issue I am currently facing is how ...
-1
votes
0
answers
23
views
My application in c++ developed with Visual Studio and SFML works on my PC but not on others [duplicate]
I have developed a video game on Visual Studio 2022 and SFML. I have fully released the application. Everything runs fine on my PC. However, on others, the programm does not start. There are 4 ...
-1
votes
1
answer
67
views
Entry point not found while my DLL file is in a folder next to my EXE
I have my EXE file compiled by Visual Studio. I am coding in C++ and I can debug and run my code correctly with the correct additional dependencies and working directory.
I would get this error:
The ...
0
votes
1
answer
73
views
Input Manager as a Singleton? [closed]
I’m creating a game with C++ and SFML, and i am writing an Input Manager to do stuff like hold a container with callback functions and load Bindings from a file. Is it a good idea to define the Input ...
0
votes
0
answers
15
views
SFML C++ I can't make the object bounce. Help please
I wanted the circle to bounce when it collided, and I didn't understand what to do next. In short, my object bounces and then falls and doesn't want to bounce a second time. I want you to suggest or ...
0
votes
0
answers
72
views
Pure virtual method called in derived class Player
I've been writing a simple 2D game in SFML. I've done a draft version of the game, but when I run the program, it reports an error:
Pure virtual method called
The debugger wrote the problem is in ...
0
votes
0
answers
30
views
How to make that SAT collision algo implementation work for walls?
I wrote Separating Axis Theorem (SAT) algorithm implementation for collisions in my SFML game by one of the OneLoneCoder video tutorials on YouTube. But it doesn't work for wall colliders, the problem ...
0
votes
0
answers
29
views
"Makefile:7: recipe for target 'link' failed" error compiling c++for smfl
I will learn SFML for C++. I want to install SFML in Vscode but after this code
mingw32-make -f Makefile
I get this error:
g++ -Isrc/include -c coding/*.cpp
g++ *.o -o main -Lsrc/lib -lsfml-graphics -...
-1
votes
1
answer
67
views
White square instead of an actual image
I started to learn SFML recently through a book and came up with the problem that when you load an image you get a big white square instead.
I have class TextureHolder for managing game resources, ...
0
votes
1
answer
91
views
Visual studio won't load my background pics, why?
Visual Studio says it can't open my file for "graphics/background". The reason it gives is that it is unable to open. Here's what I have done. Can someone please help me?
#include <SFML/...