Skip to main content

Questions tagged [sfml]

Simple and Fast Multimedia Library - a free, portable API that provides access to graphics, input, audio, etc.

Filter by
Sorted by
Tagged with
1 vote
1 answer
172 views

I am working on creating an options menu through which I can change resolution and toggle full screen mode. I am allowing only those resolutions that have aspect ratio 16:9, as my game was originally ...
kiner_shah's user avatar
3 votes
1 answer
149 views

Thinking of doing a little Micro Machines clone in SFML/C++. I know Micro Machines 'ai' was handled by having 2d array positions (or tiles) marked as being 'on-track' or 'off-track and directing the ...
Reverend Speed's user avatar
0 votes
1 answer
87 views

I have an SFML programme using window.setFramerateLimit() to determine the time step of the game. I have a game loop that looks like this: ...
Momus's user avatar
  • 1
0 votes
1 answer
501 views

This has been bugging me for few days now. I'm trying to stop movement jittering in my game. I've looked towards semi and fixed time steps - moving towards the latter below so I can really understand (...
tisolo's user avatar
  • 1
0 votes
1 answer
201 views

I'm on Mac and OpenGL and Vulcan are not supported. Even worse, I'm on a 2015 MBP 13". Yeah, can't do much with that. I spent a full year learning C++ and I have no patience to try and learn ...
BeardlessDev's user avatar
0 votes
1 answer
740 views

I've been trying to code a multiplayer client/server prototype game using SFML's networking. My server and client use TcpSelectors to wait for a certain amount of time for incoming packets without ...
xGolden's user avatar
1 vote
1 answer
443 views

I currently have a Renderer class, which as in the example code, looks like this: ...
BOOM's user avatar
  • 11
1 vote
0 answers
438 views

I'm writing a raycasting engine in C++ and SFML. I have the wall texturing done and I'm trying to get floor and ceiling texturing right. I almost got it but the textures are "sliding" when ...
Xscreade's user avatar
0 votes
1 answer
81 views

I am trying to do something really basic with sf::View. On a 1280x720 pixel window. I need to place a viewport which is 560x560 with a 160px gap from the top. What ...
Aaron Z's user avatar
  • 143
-1 votes
2 answers
343 views

Why do the coordinates x and y in the 2D game both floating-point numbers, not integers? For example, the SFML setPosition function requires two floating-point ...
Đạt Phạm's user avatar
0 votes
3 answers
153 views

I've learned that magic numbers are bad in code. However, should the coordinates, and rotation angles of all the sprites be stored in variables? Is the convention in game development to leave those ...
Đạt Phạm's user avatar
-1 votes
1 answer
154 views

Why is it common in the 2D game frameworks for the clear function to have the option of clearing the entire screen with a color? Why is this option available to us? Are there any practical ...
Đạt Phạm's user avatar
0 votes
1 answer
73 views

Should I re-position a graphical text in the dead center again, which I previously do, after editing the text of the graphical text, recalculate its new center origin of the text? I did see that with ...
Đạt Phạm's user avatar
1 vote
1 answer
164 views

When detecting a keyboard key is released. What happened if the key is released at the end of the game loop, how could the pollEvent function, which is at the top of the game loop, and it is a brand ...
Đạt Phạm's user avatar
0 votes
1 answer
278 views

When implementing pressing Enter to restart the game, should I use Keyboard::IsKeyPressed or use Event::KeyReleased in some way? I am afraid that Keyboard::IsKeyPressed will restart the game in excess ...
Đạt Phạm's user avatar
0 votes
1 answer
113 views

I want to be able to render sf::CircleShape (representing pointwise charges) when pressing mouse buttons on the window. The problem is easy enough, however the ...
user avatar
0 votes
0 answers
72 views

I have created a kind of framework for a game that combines box2d and sfml. All game scenes are stored in the Game class. The scenes also contain information about static and dynamic objects: ...
slverwolf's user avatar
0 votes
1 answer
185 views

...
Menna Shaaban's user avatar
1 vote
2 answers
1k views

I've tried drawing RenderTexture directly to the ImGui window and I've stumbled upon a bug. Everything is drawn correctly until I center ImGui Image inside the ImGui window. Centered Image: Not ...
wixy0's user avatar
  • 67
1 vote
1 answer
190 views

Summary: What approach should I take to allow custom inputs saved in a file be interpreted in the engine? So I am making a game engine similar to Mugen where I want characters to have their own ...
FlimsyEar665012's user avatar
0 votes
2 answers
1k views

I am working on a 2-D snake game in C++ with the SFML library. I would like to smooth out the movement of my snake as it looks extremely choppy currently. How the Snake moves The snake is made up of a ...
user avatar
0 votes
2 answers
215 views

by frame skip off i mean that the game should just slow down if the fps drops, just like in terraria, i got this code currently and want to implement it to it: ...
random person's user avatar
2 votes
0 answers
171 views

I'm writing a simple physics based game in C++ using SFML. I want to trigger a scene change when my playerCharacter collides with a door. Since C++ does not have any native Event Sender/Listener ...
john_shreds's user avatar
0 votes
0 answers
90 views

I am making a game in SFML, and whilst I was making an AI moving system I was wondering which would be better, If I was to instance update all my entities at once, or individually update them via a ...
tygzy's user avatar
  • 129
0 votes
1 answer
131 views

I dont know why but my jump method does not work. My character can only jump on one single object. The other obstacle haven't any influence on the player. I really don't see my mistake ...
MoonyTown's user avatar

1
2 3 4 5
8