Simple and Fast Multimedia Library - a free, portable API that provides access to graphics, input, audio, etc.
48
votes
8answers
3k views
How can you put all images from a game to 1 file?
I've just finished a basic RPG game written in C++ SFML, I've put a lot of effort into the game and I'd want to distribute it, however I've ran into a small issue.
Problem is, I have well over 200 ...
10
votes
4answers
1k views
Python Performance vs Game Maker
I was originally thinking of creating a game with Python and SFML. I understand Python is slow compared to C++, but how is it compared to Game Maker?
The main reason I ask is I recently played a Game ...
10
votes
5answers
533 views
Do you need expensive servers and fancy hosting in order to make a multiplayer game?
I've finished working on an RPG and it would seem so much more fun to make it multiplayer. SFML has a networking feature, I figured it's possible but then again, never in my life have I even tried ...
8
votes
4answers
998 views
Collision rectangle response
I'm having difficulties getting a moveable rectangle to collide with more than one rectangle.
I'm using SFML and it has a handy function called intersects which takes 2 rectangles and returns the ...
7
votes
2answers
1k views
Better animation of elements in SFML/C++
This is not about animating individual characters or elements, I'm happy with spritesheets for that. What I'm looking for is the animation of elements on screen.
For example my game starts and the ...
6
votes
1answer
116 views
Get SFML to report the version of OpenGL that is being used
How can I get SFML to report the version of OpenGL that is being used by the render window?
6
votes
1answer
2k views
Is it possible to use SFML with the Android NDK?
I've started using SFML recently and I absolutely love it. I'd like to make games that could be ported to android, linux, mac and windows, but it seems that SFML lacks portability.
I've searched for ...
5
votes
1answer
1k views
Fast, accurate 2d collision
I'm working on a 2d topdown shooter, and now need to go beyond my basic rectangle bounding box collision system.
I have large levels with many different sprites, all of which are different shapes and ...
5
votes
3answers
297 views
Current library situation
Allright so I've been doing some searches, here what I got:
SDL: It is a standard, very mature but very old. (I got posts of late 2009 where they were still waiting for the 1.3 to come up...we are ...
4
votes
2answers
286 views
Game state management: the buck doesn't stop “here” soon enough
I realize there are already many Q&As on this site about GameState/GameScreen management, state machines, state stacks, etc. This question is meant as a follow-up:
Suppose hypothetically I ...
3
votes
1answer
2k views
glCreateShader causes segmentation fault
I can't create a shader when trying to use shaders with sfml. The function glCreateShader(GL_VERTEX_SHADER); causes a segmentation fault. At first I googled it and found that it does that when the ...
3
votes
5answers
1k views
Does SFML support these specific features that I require?
I've been working on a game in c++ for about a week and a half, and I've been using SDL. However, my current engine only needs the following from whatever library I use:
enable double buffering
load ...
3
votes
1answer
1k views
Loading textures with sfml for Open GL
I'm looking at nehe's texturemapping tutorial and it looks a bit overly complicated for just loading a texture. Is there a way to load a texture in SFML and then use it in Open GL? I use SFML for my ...
3
votes
1answer
103 views
small independent game development on a virtual machine
I've been learning about OpenGL and SFML with c++ now for about 6-8 months, and would like to work on a small little personal game to put some of my skills to the test.
Now I want to kill two birds ...
3
votes
1answer
252 views
How could I implement my library/game to run in a browser plugin?
I usually code cross-platform, to build as native code for Mac Linux and Windows,
but I clearly see the value in being able to display my game in a browser.
Could you guide me in doing such a task? ...
3
votes
2answers
108 views
Screen effects and antialiasing
I have been working on a game for a while using glut for basic window creation.
I was rendering to an offscreen buffer so that I could implement various effects like screen bulging, motion blur, ...
2
votes
2answers
374 views
how to keep a GUI on-screen without moving or resizing it according to camera movement
Hey i'm trying to make a GUI lib with SFML, and everything's done except one problem: Making the Interface stay still even when the camera moves or zooms in/out.
This would be easy to fix if zooming ...
2
votes
3answers
905 views
Question about “Entity System” design
I am developing a top down 'thing' in SFML and C++ and was wondering about how best to handle so called Entities in my game.
An entity, for example is defined by me as an object in-game, such as a ...
2
votes
1answer
2k views
Converting 3D coordinates to 2D and back?
I'm wondering if there is a simple way to convert 3D coordinates to 2D coordinates. Also, if it's possible, to convert in the reverse direction.
I'm using OpenGL(GLUT) in my C++ project.
I am also ...
2
votes
4answers
274 views
How can I have parent-child transform in a component system?
Before when using inheritance, I could draw all my objects using this recursive function:
void Object::innerDraw(sf::RenderTarget& target, sf::RenderStates states)
{
states.transform *= ...
2
votes
3answers
185 views
Collision organization problems
I just started playing around with c++ and some SFML. I'm going to create a 2D game with top view to test my ability and I came across a very big problem: collision detection and physics. So I see at ...
2
votes
1answer
48 views
pytmx: issue trying to get the correct texture rectangle for sprite for objetcs on map
:D Hello :D
I am currently developing a game engine. I'm using maps designed with Tiled and I placed several objects on a test map to develop the feature of loading objects as sprites/entities and ...
2
votes
1answer
213 views
SFML - Completely Unlimit Framerate
I am trying to completely unlimit the SFML framerate, so that as many frames will be displayed as possible. The reason for this is I want to loop through one section of code which calculates positions ...
2
votes
2answers
366 views
3D Translation using only distance and angles
So I'm starting to foray into 3D game programming, but I've hit something of a snag.
I have an object I want to move around. It should always move either forward or backward relative to its local Z ...
1
vote
1answer
372 views
Does SFML render graphics outside the window?
While working on a tile-based map I figured it would be a good idea if I would only render what the player sees on the game window, but then it occurred to me that SFML could already be optimized ...
1
vote
1answer
265 views
Indoor 3D game worlds
I'm looking for a little direction.
I'm building a game engine as a part of my university project, and I'm having a little trouble about what to look for when it comes to indoor 3D game worlds.
Now ...
1
vote
1answer
162 views
Duplicating Images in SFML
I was wondering how one would go about duplicating the same sprite in SFML, instead of having to create new sprites every time I would want have another sprite of the same image. Just some basic ...
1
vote
1answer
311 views
Theoretic question about rendering in sfml and in general
I have read whole tutorial section on sfml-dev.org and have some question.
What are exactly views and how to use them ?
Should I render things in views or in renderwindow ?
1
vote
1answer
1k views
How to display text and numbers in SFML 2.0
I want to display some text and numerical data over my OpenGL scene in SFML 2.0. I've looked at the SFML 1.6 text tutorials here. But I can't get the code to work.
There is (as of yet) no text ...
1
vote
1answer
474 views
Can't use SFML sprite drawing and OpenGL rendering at the same time
I'm using some SFML built in functions to draw sprites and text as an overlay on top of some OpenGL rending in an SFML RenderWindow. The opengl rendering appears fine until I add the code to draw the ...
1
vote
1answer
205 views
Unit selection - logic & screen communication
I'm building a game using SFML, with disconnected logic & screen systems that run on different threads and communicate through synchronised buffers. Now, this system worked perfectly well when I ...
1
vote
1answer
655 views
Should I write my own game engine, and if so what are the main features? [duplicate]
Possible Duplicate:
When to roll your own game engine?
I've been interested in writting games for a while, and now that I have acquired a bit of experience in programming, I feel like I ...
1
vote
0answers
341 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
1answer
214 views
OpenGL Depth Buffer/Coordinate issue with SFML
For some reason, my coordinate system in OpenGL is getting all messed up with depth. When I put something more than 1 unit away from zero (in terms of the Z coordinate), I can't see the object. ...
1
vote
0answers
141 views
How do I get the point coords of a rotated SFML shaperect?
I am trying to get collisions of bullets working, and am using SFML. I am using code to get the position of the points of the rectangle for collisions, however I think there's a way to do this without ...
1
vote
0answers
219 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 ...
1
vote
1answer
413 views
How to form a concave shape out of convex shapes? [closed]
I'm trying to get around the rule of only being able to form convex shapes in the SFML C++ library.
To do this I'm planning on testing given vertices, and if concave,
splitting the vertices ...
0
votes
3answers
546 views
How to handle many sprites and update?
I am making a game, and I just started to think about how I am going to update and render all the sprites on the screen. Should I store all sprites in some type of list (vector or something?) and then ...
0
votes
1answer
345 views
Does SFML render it's graphics using OpenGL internally?
By that, I mean that SFML has an abstraction for OpenGL? Sort of like SDL's blit functions, but using OpenGL internally?
"Yes SFML uses OpenGL for all the graphical stuff. "
Received this comment ...
0
votes
1answer
40 views
What happened to sprite::setSize in SFML2?
I'm porting one of my old projects to sfml 2.0, and I had a background that I scaled using
sprite.setSize(windowWidth, windowHeight)
Now, it seems like setSize has ben removed in 2.0, and I'm ...
0
votes
2answers
478 views
Action button: only true once per press
I'm using SFML2.0 and am trying to make a wrapper class for my controller/joystick.
I read all the input data from my controller and send it off to my controllable object.
I want to have two types of ...
0
votes
1answer
523 views
Creating an abstract Animation class
I'm creating a simple 2d game with c++ and SFML, and I've got a simple framework going for animating a sprite using a "SpriteSheet" image (an big image containing all the "frames" of an animation)
...
0
votes
2answers
209 views
How does one load TMX files into a SFML game?
How does one load .tmx files from Tiled into a SFML game?
0
votes
1answer
147 views
Picking a suitable resolution for a modern low-res game?
I'm working on a 2D game project right now (using SFML+OpenGL and C++) and I'm trying to figure out how to go about choosing a resolution. I want my game to have a pixel resolution that is around that ...
0
votes
1answer
145 views
Strange behavior for “make x face y” algorithm (with video)
I know, I know, on the internet there are a lot of tutorial on how to get the angle between the center of two objects or "make x face y".
I have this code:
// (180 / PI = 57.3065)
float ...
0
votes
1answer
1k views
SFML - Moving a sprite on mouseclick
I want to be able to move a sprite from a current location to another based upon where the user clicks in the window. This is the code that I have:
#include <SFML/Graphics.hpp>
int main()
{
...
0
votes
1answer
529 views
How to render images/textures in shape/polygon form?
I'm working with SFML right now, and upon finishing the tutorials I still do not know how to give a shape a texture or image -- not just a solid color/outline.
The only thing I know can take an ...
0
votes
1answer
100 views
How to achieve selection of a tile from a tile sheet based on an ID?
Let's say I have a tile sheet that contains 8 sprites per sheet. Each sprite is a tile of 30x30.
I wrote my own custom map parser/map loader however I'm having trouble extracting a certain tile ...
0
votes
1answer
295 views
How can you run events after a set amount of time in SFML 2.0?
I've been using SFML 1.6 for a while and recently upgraded to 2.0, apparently there's a new sf::Time type however I'm clueless as to how I can achieve running of a certain function after a set amount ...
0
votes
1answer
122 views
Open GL polygons not displaying
I have tried to follow nehe's opengl tutorial lesson 2. I use sfml for my window creation. The problem I have is that both the triangle and the quad don't show up on the screen:
#include ...

