0
votes
0answers
14 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 ...
-2
votes
0answers
35 views

Having problems with collision response (SAT)

i been playing around with SAT collision, and figured out the most part. (By copying/writing codes from countless sites). The SAT collision detection works, since it detects a collision. Now the MTV ...
1
vote
2answers
95 views

Really simple count down timer

I'm making a little 2D tank game that fires bullets depending on where you click (This has been done and works a treat). I'm currently working on a timer class with a simple function that displays a ...
0
votes
1answer
79 views

How do I handle this type of collision?

So I've been messing around with simple game development for a while and just found an interesting game idea here . I'm using SFML 2.1 with C++ and so far I have a tilemap in a VertexArray using a ...
0
votes
1answer
60 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 ...
3
votes
2answers
218 views

How can I improve my collision detection's performance?

I'm new to programming and want to speed up the collision detection in my C++ 2D platformer game engine. Currently, only the player's collision detection works: Every frame, the player's update ...
0
votes
1answer
126 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 ...
0
votes
2answers
122 views

Synchronizing mob states in online multiplayer game

I'm developing an exploration-based platform game in which from the start there were plans about including local multiplayer support, but recently I've been considering an online multiplayer mode, ...
0
votes
0answers
254 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
88 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 ...
0
votes
2answers
121 views

What interface should be responsible for specifying the initial position of a game object?

I'm making a simple Pong clone game and have been having an issue deciding on how my classes should handle the initial placement of an object. For instance, my Ball class's constructor is: Ball ...
-3
votes
1answer
160 views

Simple collision detection implementation [closed]

I'm making a game with C++ where the program extracts the lines out of an image (via openCV), stores them in an std::vector< std::vector< int > > and the builds a tile map out of it which is ...
-1
votes
0answers
88 views

What's wrong with my tileMap implementation? [closed]

I need to implement a 2d platformer and decided to use a tilemap. I found this tutorial and tried to implement the second solution. The text says: Decompose movement into X and Y axes, step one at a ...
2
votes
1answer
138 views

How can I make an animation using arrays?

I want to take an array of sprites, for example sf::Sprite animation[3] = { stepLeft, inMiddle, stepRight }; and construct an animation by looping them. Is this possible? How do I go about it?
1
vote
2answers
473 views

C++&SFML Moving Sprites Smoothly in Tiles [duplicate]

As a student, I've always wanted to become a game developer. So far I've managed to learn the basics of C++ and SFML 2.1 For my first project, upon deciding to make a 2D RPG-ish game, I encountered a ...
1
vote
1answer
117 views

Implementing collision response, current implementation does too many checks

I don't know how I should handle my collision response when collision between two entities leads to second collision with third entity. Blue arrow is velocity of the rightmost entity and numbers ...
0
votes
1answer
384 views

implementing collision detection and handling for tiled 2D world with smooth wall sliding

Im using SFML 2.1 for graphics and my game structure follows SFML book quite closely (SceneGraph implementation etc) My world consists mostly of characters (around 1-400, moving around) and tiles ...
1
vote
1answer
114 views

SFML image extension for best performance

I am using SFML library in my 2D game. The Texture Class has a method to load an image from file: Texture.loadFromFile("image.*") Which file extension should I use to achieve best performance? ...
1
vote
0answers
181 views

SFML 2.0 Too Many Variables in Class Preventing Draw To Screen [closed]

This is a very strange phenomenon to me. I have a class definition for a game, but when I add another variable to the class, the draw method does not print everything to the screen. It will be ...
0
votes
1answer
159 views

How do I get information about the level to the player object?

I have a design problem with my Player and Level class in my game. So below is a picture of the game. The problem is I don't want to move on the black space and only the white space. I know how to do ...
2
votes
1answer
431 views

Improving Click and Drag with C++

I'm currently using SFML 2.0 to develop a game in C++. I have a game sprite class that has a click and drag method. The method works, but there is a slight problem. If the mouse moves too fast, the ...
-1
votes
1answer
150 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
vote
2answers
1k views

SFML: Generate a background image

I want to generate a background, which is used in the game, on every instance of the game based on certain conditions. To do so, I'm using a sf::RenderTexture and a sf::Texture like this: ...
4
votes
2answers
353 views

How would I display a unit that is hidden behind another object

Right, I've tried searching for this but as you might be able to tell from the title, I didn't really know how to word it anyway... In some games such as rts games, when a unit is hidden or half ...
2
votes
1answer
136 views

Development with multiple libraries

I'm almost fresh to the game development and I have one question about libraries. If I choose one library, such as SFML, to develop the menu of my game, is it possible to merge with, for example, ...
-1
votes
2answers
315 views

Shooting many bullets toward the mouse position

I try to shoot a bullet toward the mouse position by this code. float deltaX = mousePosition.x - (aircraft.getPosition().x + aircraft.getLocalBounds().width / 2); float deltaY = mousePosition.y - ...
1
vote
1answer
228 views

Drawing a textured 3D object breaks SFML text render

I writing a OpenGL game using SFML. I'm using the push/pop function to combine OpenGL with SFML like the tutorial SFML+OpenGL but, when I added textures to my model, the SFML text rendering appears ...
0
votes
2answers
440 views

SFML networking rts

You will be controlling only one person directly in the game. But, you can issue vague command like to build something here or attack at this square. So I'm trying to make a multi-player roguelike ...
2
votes
2answers
303 views

Framerate-independent acceleration

Is this the right way, or at least a way that works, for dealing with accelerations in variable time steps evironments? // Pseudo-code void onUpdate() { mySpeed += acceleration * ...
3
votes
1answer
336 views

SFML RenderWindow Unhandled Exception

So I've been following an SFML tutorial but unfortunately, it doesn't seem to be working. The tutorial shows a RenderWindow as a global variable and then accesses it like this: LevelState.h: struct ...
11
votes
4answers
540 views

How to determine range of possible movement in turn-based, distance-based strategy game?

I'm creating a 2-dimensional, turn-based strategy game using c++ and SFML-2.0. Movement is distance-based rather than grid-based, with several different triangle-shaped pieces that, on a given turn, ...
4
votes
1answer
440 views

C++ SFML Box2D - Somewhat confused when it comes to syncing phyisical body with a render body

While testing Box2D with SFML I encountered something which confuses me: The relation between physical body centroids and SFML's sprite origin. As an example I have a test class GameObject which is ...
3
votes
1answer
186 views

Sfml: Sprite scale transformation animation

Is there any way to animate a transformation on sf::Sprite like setScale or setPosition? ie: sprite.setScale(0.5f,0.5f);. I want the transition between normal and half scale be smooth. Thanks!
3
votes
1answer
225 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 ...
-4
votes
1answer
238 views

C++ SDL/SFML advancing help [closed]

I've been playing around programming using SDL and SFML for a while now and done all the basic tutorials I can find(love lazyfoo). but I'm stuck and not sure how to move on from simple games like ...
-1
votes
1answer
326 views

I want to start making 2D Games with C++ or #C [closed]

I know C++ pretty well, I think - polymorphism, vectors, templates, and more. I also know C#. I want to program a 2D game, but not like those programs where you click a button or two, and you ...
2
votes
0answers
789 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
374 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 ...
0
votes
1answer
594 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 ...
1
vote
1answer
389 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. ...
2
votes
1answer
399 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 ...
0
votes
1answer
179 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 ...
3
votes
1answer
1k 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 ...
8
votes
1answer
3k 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 ...
0
votes
1answer
813 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 ...
10
votes
5answers
631 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 ...
53
votes
9answers
6k 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 ...
4
votes
3answers
430 views

Current library situation [closed]

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 ...
0
votes
1answer
156 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 ...
2
votes
3answers
235 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 ...