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

learn more… | top users | synonyms

4
votes
2answers
537 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 ...
2
votes
1answer
109 views

OpenGL App not setting cursor position appropriately

I have written a small application using OpenGL, and have implemented some rudimentary camera controls. Unfortunately, I cannot get the application to set my cursor position correctly. The cursor is ...
1
vote
1answer
48 views

What's a way to improve this wall collision detection code to keep objects within a perimeter made of these walls

// Player Collides with Wall counter1 = 0; for (iter60 = wallArray.begin(); iter60 != wallArray.end(); iter60++) { if (Player1.rect.getGlobalBounds().intersects(...
0
votes
1answer
57 views

How to create animation using sprite sheet in C++ and SFML 2.0?

I was wondering how do animation using a sprite sheet. I have a sprite sheet and the size is height:400 width:601 The code I am using is: #include<SFML/Graphics.hpp> #include<iostream> ...
0
votes
1answer
47 views

OpenGL vbo black screen

I am using sfml with opengl and using glew Here is my code: // MainWindow.cpp // window is declared outside in the class it is a sf::Window #include "MainWindow.h" #include <iostream> //#...
0
votes
1answer
56 views

csfml wait event

I would like to spawn a separate thread to deal with inputs using c and sfml. I made a prototype that waits for input in main() and it works fine. I made a prototype that spawns a new thread and waits ...
-1
votes
1answer
484 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
189 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
365 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
41 views

SFML Raycasting Problem: Textures not displaying propely

I have been lurking on gamedev.Stackexchange for a while now and finally have a question to ask. I have been working on a simple raycasting engine (like wolfenstein 3d) using the SFML Graphical ...
2
votes
0answers
177 views

Creating random nebulae for scrolling space background

If you've ever seen a picture of space, you'll most likely see that there is some kind of pretty nebula in the background. I would like to find out how I could create random, semi-realistic looking ...
1
vote
0answers
28 views

C++ SFML: Keypressed Event not registering half the time?

I have a very simple event handeling system at the moment. void LevelScreen::PollInput() { sf::Event event; while (pWindow->pollEvent(event)) { if (event.type == sf::Event::...
1
vote
0answers
23 views

SFML Texture issue removing from memory

I am currently working on loading tmx levels into my game, all is going well and i have layers being loaded textures being loaded and all the data being loaded such as level name, tile sizes etc. The ...
1
vote
0answers
66 views

Anti-Aliasing + Atlas Texture + VBO = nasty looking artifact

With my research I have found that using a VBO to render graphics is much faster than using depreciated OpenGL. I've found with this that you can't switch textures mid VBO render, so if I have ...
1
vote
0answers
291 views

C++ - SFML - OpenGL - GLSL - smooth waving texture

I have this shaders: Fragment: uniform float time; uniform sampler2D texture; void main() { float t = time; vec2 aux = gl_TexCoord[0].xy; // This would also make waving/deform the ...
1
vote
0answers
325 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
58 views

GUI, interface/listener equivilent in c++

brief intro I am currently working on a game engine using SFML for a small project, Coming from Java I know a fair bit but unfortunately I have come across a lot of snags (to be expected when ...
0
votes
0answers
16 views

Config SFML in QTCreator with file.pro

I know that are a method with cmake , but i wouldlike config my project in Qtcreator usinig qmake and my doubt is what my file .pro must have for work it ?. I will run in windows , maybe later linux . ...
0
votes
0answers
32 views

Jumping to tiles in y coordinate before displaying all tiles in x?

I am learning how to load in tile maps and I have successfully done so, sort of. The problem is that the program is jumping to the tiles in the y coordinate before displaying all the tiles in the x. ...
0
votes
0answers
86 views

How can I improve my ray casting algorithm

So I finished coding this ray casting algorithm in C++ and I feel like it could be improve, despite that, I believe that it is really good since it is coded using SFML. Here is the algorithm in C++ ...
0
votes
0answers
169 views

How do I draw a tilemap in SFML (C++)?

I've been working with SFML and I've used what I know to try and create a TileMap. However, opening the RenderWindow will only display a black screen and the image I have loaded in the files will not ...
0
votes
0answers
72 views

Can't display sf::text using custom class, crash

I have my own Text class which uses sf::Text to display text on the screen. First I couldn't get the text to display on the screen, my solution was that I forgot to give the text a font before ...
0
votes
0answers
279 views

Setting Up A Visual Studio 2015 Android C++ Project To Utilise The SFML Library And compile On An Android Device

So in Visual Studio I have installed the cross platform tools to set up a C++ project for Android and iOS such as the Android SDK, NDK and the corresponding USB drivers required to debug the program ...
0
votes
0answers
240 views

Alternative to a timer in a separate thread in a turn-based game

I'm making a 2d turn based game and I'm having some difficulties with the timer itself. 3 characters vs 3 characters, two players. A timer giving them a chance to preform acts within a set amount of ...
0
votes
0answers
356 views

How do I scale a Spine animation at runtime?

The spine docummentation shows how to scale the skeleton when loading. Is it a must to reload the skeleton to scale the animation while playing it?