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

learn more… | top users | synonyms

0
votes
2answers
2k views

SFML fail to load image as texture

I have come to a problem with the code below ... Using SFML 2.0 #include <SFML/Graphics.hpp> #include <iostream> #include <list> int main() { float speed = 5.0f; // create the ...
5
votes
1answer
147 views

Can SFML load anything other than RGBA8888? (RGBA4444, RGB565, etc.)

I have tried searching google, and there's next to nothing on there. I tried searching the SFML forums, but still have no luck. Am I missing it in the documentation somewhere obvious? Or does SFML ...
3
votes
1answer
289 views

Jittery Movement, Uncontrollably Rotating + Front of Sprite?

So I've been looking around to try and figure out how I make my sprite face my mouse. So far the sprite moves to where my mouse is by some vector math. Now I'd like it to rotate and face the mouse as ...
1
vote
1answer
117 views

Using unordered_multimap as entity and component storage

The Setup I've made a few games (more like animations) using the Object Oriented method with base classes for objects that extend them, and objects that extend those, and found I couldn't wrap my ...
0
votes
1answer
114 views

Why is my Simplex Noise appearing in four columns?

I'm trying to make a Texture out of Simplex noise, but it keeps appearing like this regardless of how big or small scale is: The following code is used to produce the image's color date: private ...
0
votes
1answer
83 views

SFML Stuttering issue with Linux

I wrote a little game of a bouncing ball, using SFML and Box2D. When running on Windows, the graphics animate smoothly. The problem is on my Linux machine. The animation stutters randomly. To be ...
0
votes
1answer
144 views

Slight pause/delay when moving

I've been working on this little framework for my game today and realized that moving delays when moving around. I've used SFML before and have had the same problem, but never bothered to fix it. I'm ...
-1
votes
1answer
154 views

Texture doesn't draw correct

I'm writing a game using SFLM and Opengl but when I create a terrain i got some OpenGl problems. I use heightmaps to generate a terrain but when I load the texture on it the texture is not correct ...
-1
votes
1answer
200 views

Drawing multiple sprites with clear screen for every frame

I googled with best of my skills, but I cannot find any relevant answer to my problem. I'm making a game with an isometric view. I need to draw multiple sprites on the screen and before switching to ...
2
votes
0answers
841 views

2D water shader in SFML

I want to implement the algorithm for a 2D water surface described here and here. Before somebody finds out, beats me up and deletes this, I'm gonna say it myself. I posted this question over at ...
1
vote
0answers
261 views

Keeping crosshairs & GUI onscreen - SFML

I read this question, but didn't understand the implementation suggestions with SFML on C#. For example, right now I'm just trying to make sure that the mouse crosshairs stay onscreen constantly. I ...
0
votes
0answers
12 views

OpenGL textures trigger error 1281 if SFML is not called

I am using SOIL to apply textures to VBOs, without textures i could change the background and display black (default color) vbos easily, but now with textures, openGL is giving an error 1281, the ...
0
votes
0answers
108 views

Procedural Tilemap generation

So i'm building a 2d game but i have never really done any procedural generation i followed the SFML tutorial for tilemaps and i have the maps loading what i know want to know is how can i convert the ...
0
votes
0answers
329 views

How can I load an SVG file and create a shape and collision data from it?

I'm looking to write a game in C++ with vector-styled graphics. For this, I will need to turn an SVG shape into a Box2D body and a polygon for rendering in SFML. I don't need the full capabilities of ...
0
votes
0answers
96 views

How can I align a 2D object properly using tilemap collision

I'm making a mario clone, and I have been working on the collision but I can never seem to get it right. I started out with "true/false" collision, aligning the player at it's last position, and as ...