Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - eggw

Pages: [1]
1
I was experiencing some issues in my current project with latency delays while testing locally. Then I came upon this thread, specifically this message:

https://en.sfml-dev.org/forums/index.php?topic=12011.msg91201#msg91201

Changing my if's to while's fixed it. I was just wondering why it made such a huge difference. Is this a bug, or is there an intentional reason/explanation for why this occurs?

Thanks!

2
Graphics / Fixed viewport possible?
« on: June 06, 2016, 08:53:02 pm »
I have a view used to draw the black bar at the bottom. I want that black bar to have a fixed size, and to always be in the bottom-center of the window. By default, the window size is as such, and everything is fine:



What I WANT to happen when I increase the size of the screen is have the black bar remain the same size:



But instead, the black bar scales to the new window size (due to SFML viewports being defined as a ratio of the screen) and this happens:



Is there a solution for this, or is it impossible due to the way SFML's viewports work?

3
General / Merging multiple image files
« on: August 01, 2015, 09:36:33 pm »
At the moment, for my current project, I store all the sprites needed in a couple of image files, which act as sprite sets. So, for example, in units.png I'll have the different sprites needed for unit type 1, unit type 2, and so on.

The drawback to this is, of course, is that you have a limited subset of sprites to work with, since they all have to be present in that one image file at runtime; adding new ones will involve manually editing it, which is error-prone and a hassle. As far as I'm aware, it's inefficient for the GPU to have a different image file for each different sprite (especially when you have a lot to work with, as I do). However, I want it to be easy to dynamically add new ones - without that overhead of having plenty of image files. The idea I have is to do just that, give each unit its own sprite, but to merge them all into one big, cached image file at runtime - but SFML does not seem to have this capability. Is there a way to accomplish this, or perhaps a different solution altogether?


Pages: [1]