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
175 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
0 votes
0 answers
161 views

This is my first time using this website and I'm a beginner too, so sorry if what I'm asking doesn't make sense. I am using C++ and OpenGL to make a basic platformer. My issue is that the fragment ...
Zuper Potato's user avatar
3 votes
1 answer
150 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
1 vote
0 answers
71 views

I'm developing a pool game using SFML and Box2D, and I'm currently facing an issue with creating the cue ball outline when the player aims. I have three rays that are cast: two black ones and one ...
Yosef Sirak'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
0 answers
44 views

I am encountering a perplexing issue in my SFML game development where my program crashes instantly during runtime when I add a CircleShape as an instance variable ...
Julian42_74's user avatar
0 votes
1 answer
505 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
1 vote
1 answer
119 views

I am currently making a game in c++ using sfml, I encountered a problem where if I jump in my game, the jump mechanic allows the player to jump repeatedly in mid-air which is something I do not want. ...
Cheez's user avatar
  • 11
0 votes
1 answer
202 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
77 views

I have a main window whose loop is just in the program and a Window class in which separate sf::RenderWindow objects are created and the loops for them are in ...
Proger's user avatar
  • 1
0 votes
1 answer
750 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
0 votes
2 answers
259 views

The game development library SFML has a Vector2 class template (and a Vector3 for that matter), which can use any arithmetic ...
JensB's user avatar
  • 157
1 vote
1 answer
445 views

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

I'm working on a small SFML engine, and i'm trying to implement continuous collisions. It's working great, but the corners are getting detected as collisions and i can't figure out why. I already ...
Xscreade's user avatar
1 vote
0 answers
440 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
2 answers
773 views

I'm currently developing a tower defense game as a part of a group project in school. This game will be programmed in C++ using SFML. We are having trouble with finding a good way to define the path ...
user294957'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 vote
1 answer
518 views

I am trying to create a raycasting engine using C and CSFML, I already have the walls and textures rendering done and right now I would like to be able to render sprites into the scene. The difficulty ...
Xscreade's user avatar
-1 votes
2 answers
344 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
1 answer
105 views

Does the bee move very fast in the very first frame of the game? I think the Clock object when it is declared, the clock starts automatically as this documentation ...
Đạt Phạm's user avatar
0 votes
3 answers
155 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 vote
0 answers
77 views

I'm using SFML & the book I am reading has that snippet of deprecated code. Specifically, it uses the deprecated enum Return value from the keyboard. The newer ...
Đạt Phạm's user avatar
-1 votes
1 answer
155 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
48 views

What will happen if I intend to display the hidden surface after clearing the window, draw the game objects, and then display the window again? Am I watching the drawing process of the objects? Is ...
Đạ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
0 votes
1 answer
85 views

Is it still necessary to check if the window is requested to be closed when I prepare a 1920x1080 window, in full-screen mode? How could the user close the window in full-screen mode, when you could ...
Đạt Phạm's user avatar
1 vote
1 answer
166 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
137 views

Do I have to clear the entire target with a single color every frame? I thought the newly drawn ones will overwrite the old ones.
Đạ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
275 views

I'm new to coding. I'm trying to make a simple game where you can left click to spawn a salt "molecule" and right click to spawn a water one where the mouse cursor is. I don't know how to ...
Elijah Campbell's user avatar
0 votes
1 answer
114 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
1 vote
1 answer
888 views

I'm trying to render isometric maps, my final goal is to render scenes that resembles Snake Rattle 'n' Roll: So I started by rendering cubes: For now I have an array with a collection of 3D vectors ...
PaperBirdMaster's user avatar
0 votes
0 answers
73 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
0 answers
202 views

I'm making a short jump test in SFML. However I have a problem: whenever the jump button is pressed the character will jump but will not fall down, he will keep going higher. However, in the beginning ...
dareesome's user avatar
  • 101
0 votes
1 answer
186 views

...
Menna Shaaban's user avatar
1 vote
1 answer
286 views

I store 2D animation frames in some class. But the problem is that when I want to create multiple objects for example I want to spawn explosion or enemy ...
Eminiox PL'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
0 votes
1 answer
1k views

I'm trying to implement "canvas" where I will display loaded texture and select specific parts of it so I can put them on tilemap, I'm also trying to add zooming and panning only in "...
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
1 answer
270 views

I have been getting into game development and I have made some progress. I have come across an obstacle which is jumping I managed to get the Jumping to semi work but it doesn't look like a jump but ...
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
1 answer
364 views

Similar to this question https://stackoverflow.com/questions/33904998/sfml-extremly-slow-irregular-framerate, I have created a small program to experiment with SFML I have a very simple SFML test ...
Bruce Adams's user avatar
0 votes
2 answers
216 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
1 vote
1 answer
177 views

I've recently finished version one of a simple arcade game I've been making in SFML. I've already spent months on the physics engine and game, and I'm wondering how much time it will take to port it ...
john_shreds's user avatar
2 votes
0 answers
172 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
2 votes
1 answer
104 views

Tilemap data is stored in a 2D array. It is saved using the following code ...
Featherball'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
176 views

I am making a 2D top-down game in C++ and the graphics library SFML. I have designed a chunk system by myself and have successfully made it so that when a chunk is off-screen, it isn't rendered, to ...
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
0 votes
0 answers
423 views

I'm working on a 2D game using SFML and many textures (which I'm loading from PNG files, created with Gimp) I use are appearing blurry. They're being drawn without any kind of scaling and ...
Epiglottal Axolotl's user avatar

1
2 3 4 5
8