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 - Symphonym

Pages: [1]
1
So I'm trying to create a small resource managing class where I simply map filepaths to textures/fonts. But when I started testing my resource manager by loading fonts into sf::Text objects things started crashing, a lot. So before I write too much text I'll just give you a minimal example of what works and what does not.


                sf::RenderWindow m_window(sf::VideoMode(800, 600), "Test");

                std::unique_ptr<sf::Font> font = std::unique_ptr<sf::Font>(new sf::Font());

                if(!font->loadFromFile("a_font.ttf"))              // This line causes a crash, see below for output
                        std::cout << "ERROR" << std::endl;

                sf::Text text;
                text.setFont(*font);
                text.setString("Test");
                text.setCharacterSize(24);
                text.setColor(sf::Color::Red);

                while (m_window.isOpen())
                {
                        sf::Event event;
                        while (m_window.pollEvent(event))
                        {
                                if (event.type == sf::Event::Closed)
                                        m_window.close();
                        }

                        m_window.clear();
                        m_window.draw(text);
                        m_window.display();
                }
 

Which gives the error
*** Error in `/gameBinaryDirectoryPathIsHere/': malloc(): memory corruption: 0x000000000062a470 ***
 

And a GDB backtrace

#0  0x00007ffff6ec8bb9 in __GI_raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007ffff6ecbfc8 in __GI_abort () at abort.c:89
#2  0x00007ffff6f05e14 in __libc_message (do_abort=1,
    fmt=fmt@entry=0x7ffff7014668 "*** Error in `%s': %s: 0x%s ***\n")
    at ../sysdeps/posix/libc_fatal.c:175
#3  0x00007ffff6f139b6 in malloc_printerr (ptr=0x62a470,
    str=0x7ffff70107da "malloc(): memory corruption", action=<optimized out>)
    at malloc.c:4996
#4  _int_malloc (av=0x7ffff7251760 <main_arena>, bytes=392) at malloc.c:3447
#5  0x00007ffff6f15230 in __GI___libc_malloc (bytes=392) at malloc.c:2891
#6  0x00007ffff6643aa0 in ft_mem_qalloc ()
   from /usr/lib/x86_64-linux-gnu/libfreetype.so.6
#7  0x00007ffff6643ae8 in ft_mem_alloc () from /usr/lib/x86_64-linux-gnu/libfreetype.so.6
#8  0x00007ffff664482e in FT_New_Library ()
   from /usr/lib/x86_64-linux-gnu/libfreetype.so.6
#9  0x00007ffff663f5c4 in FT_Init_FreeType ()
   from /usr/lib/x86_64-linux-gnu/libfreetype.so.6
#10 0x00007ffff7ba727f in sf::Font::loadFromFile(std::string const&) ()

 

In my real code I use a std::unordered_map<std::string, std::unique_ptr<sf::Font> > but the results here are the same. So then you might think "Why not put the resources on the stack, since STL map's doesn't invalidate its elements", and then we get this:

                std::unordered_map<std::string, sf::Font> fontMap;
                sf::Font font;

                if(!font.loadFromFile("assets/a_font.ttf"))
                        std::cout << "ERROR" << std::endl;

                fontMap["assets/a_font.ttf"] = font;

                sf::Text text;
                text.setFont(fontMap["assets/a_font.ttf"]);
                text.setString("Test");
                text.setCharacterSize(24);
                text.setColor(sf::Color::Red);

                while (m_window.isOpen())
                {
                        sf::Event event;
                        while (m_window.pollEvent(event))
                        {
                                if (event.type == sf::Event::Closed)
                                        m_window.close();
                        }
                        m_window.clear();
                        m_window.draw(text);
                        m_window.display();
                }
 

Which appears to run "fine", window opens and stays open, yet there's no text displaying. And when I close the window I get a segfault which doesn't say much (in gdb) other than pointing to the destruction of the std::unordered_map. Although in this case I'd rather have my resources on the heap since (in my opinion) it makes management/usage of them easier.

Finally, the below example works just fine to have some sort of reference:

                sf::Font font;

                if(!font.loadFromFile("assets/a_font.ttf"))
                        std::cout << "ERROR" << std::endl;

                sf::Text text;
                text.setFont(font);
                text.setString("Test");
                text.setCharacterSize(24);
                text.setColor(sf::Color::Red);

                while (m_window.isOpen())
                {
                        sf::Event event;
                        while (m_window.pollEvent(event))
                        {
                                if (event.type == sf::Event::Closed)
                                        m_window.close();
                        }
                        m_window.clear();
                        m_window.draw(text);
                        m_window.display();
                }
 


2
I'm in the process of developing a  little engine project of my own and got some questions regarding how to package the code base in order for it to be used by others (such as SFML). My understanding is that you provide the header files for the dependencies, which is platform-independent as there (should) be #ifdef's and similar depending on the platform it is compiled on. Then platform-specific library files (.dll, .framework, .lib and whatnot) are provided which is what the project will link against. On Linux platforms neither headers nor library files are provided since they might vary between distros and it's better to just use the versions that the distro repos provide.

But as I'm going through the SFML extlibs/headers folder I've noticed that platform specific header files are provided for libsndfile and libfreetype, why is that the case? Shouldn't a library that is cross-platform take care of this in a single header file using #ifdefs or similar? I've also noticed that no OpenGL headers are provided, I assume that the lack of them means that the header files are different depending on both graphics drivers and operating system. As otherwise couldn't they just be packaged per-platform like libsndfile (still don't understand why this is the case though)?

Anyone that could help bring me some clarification on this issue? Even though it might not be super specific to SFML itself.

3
General / Why doesn't SFML use ALuint to identify sources/buffers?
« on: June 04, 2014, 07:48:37 am »
Just something that struck me while looking through the SFML source since it's an issue I'm currently having. I find myself trying to wrap API defined types in small classes in order to hide OpenAL dependencies which I feel will get out of hand when I get to writing OpenGL code. But SFML just uses a pointer to a regular unsigned int where the  OpenAL API expects an ALuint pointer, would this be safe on all platforms?

Just to get another idea of what I'm confused about; I have a Color class with floats as each of its components that I'm using to set the OpenGL clear color. Would this be safe since glClearColor expects GLfloat's and not regular float's? The general question is that I'm wondering how much I have to use the types defined by an API since it seems that SFML doesn't use them with every function call to the API using the types.

4
General / How does SFML resolve dependencies?
« on: May 02, 2014, 01:44:18 am »
I'm currently developing a little library of my own, which uses OpenAL (amongst others) like SFML. So when I compile my library I dynamically link against the OpenAL Soft .so file and create my own .so file, no problems.

But when I create a test program and link against only my own library, and include the headers of my own library; it doesn't work. Undefined symbols to OpenAL as well as it not finding its headers. (It works when I manually add these to the compilation settings of the test program; linking and including OpenAL).

However using SFML audio would only require you to link to the SFML modules, such as sfml-audio, and not manually adding OpenAL to the linking settings. So I assume SFML automatically links the dependencies it has when you link against it in your program, but how is this achieved? I've looked into libtool, pkg-config, ld options and whatever things google might suggest without much success.

So I thought I'd finally ask here to see how you do it, since I can seem to figure it out on my own :/

5
I'm currently trying to compile SFML on a school computer but now I'm stuck at some weird errors. I have done exatctly as you're supposed to do, use CMake, select MinGW Makefiles and go to the "Build Directory" and run  "mingw32-make" to compile SFML. However when running "mingw32-make" it gives a bunch of errors and stops:

Code: [Select]
C:\Users\Administratör\Desktop\CompiledSFML>mingw32-make
CMake Error: Target DependInfo.cmake file not found
Scanning dependencies of target sfml-system
CMake Error: Directory Information file not found
Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj
G__~1.EXE: error: @CMakeFiles/sfml-system.dir/includes_CXX.rsp: No such file or
directory
G__~1.EXE: error: C:\Users\Administrat¸r\Desktop\LaurentGomila-SFML-86897a8\src\
SFML\System\Clock.cpp: No such file or directory
G__~1.EXE: fatal error: no input files
compilation terminated.
src\SFML\System\CMakeFiles\sfml-system.dir\build.make:57: recipe for target 'src
/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj' failed
mingw32-make[2]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj]
Error 1
CMakeFiles\Makefile2:107: recipe for target 'src/SFML/System/CMakeFiles/sfml-sys
tem.dir/all' failed
mingw32-make[1]: *** [src/SFML/System/CMakeFiles/sfml-system.dir/all] Error 2
Makefile:115: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

C:\Users\Administratör\Desktop\CompiledSFML>

Any idea what may be causing this to happen?

6
So I'm currently working on a school game project using SFML, and occasionally it randomly crashes. I've finally managed to catch this happening when running the program in GDB, so here's the backtrace:

#0  0x0000000100000000 in ?? ()
#1  0x00007ffff2e1983b in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#2  0x00007ffff2e81f21 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#3  0x00007ffff2e82cdc in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#4  0x00007ffff2ec67c8 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#5  0x00007ffff2ecb967 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#6  0x00007ffff2ea282c in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#7  0x00007ffff2eb0397 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#8  0x00007ffff2eb04e7 in ?? () from /usr/lib/nvidia-current/libnvidia-glcore.so.304.43
#9  0x00007ffff586f9fd in ?? () from /usr/lib/nvidia-current/libGL.so.1
#10 0x00007ffff58461c7 in glXSwapBuffers () from /usr/lib/nvidia-current/libGL.so.1
#11 0x00007ffff7749784 in sf::priv::GlxContext::display (this=0x80d020)
    at /home/jakob/Skrivbord/LaurentGomila-SFML-9fac5d7/src/SFML/Window/Linux/GlxContext.cpp:146
#12 0x00007ffff7746a9c in sf::Window::display (this=0x7fffffffe230)
    at /home/jakob/Skrivbord/LaurentGomila-SFML-9fac5d7/src/SFML/Window/Window.cpp:331
#13 0x0000000000409f3d in jl::Engine::gameloop (this=0x7fffffffe210) at Engine.cpp:106
#14 0x000000000041b49e in jl::Engine::run<GameState> (this=0x7fffffffe210) at Engine.h:80
#15 0x000000000041ae0b in main (argc=1, args=0x7fffffffe588) at main.cpp:24
 

My code points down to the window.display() function in my gameloop, and the SFML code points down to the "glXSwapBuffers(m_display, m_window);" call in Linux/GlxContext (as you can see above). My initial thought was that I maybe have a memory leak somewhere, the fault is then mine, otherwise I have no idea what causes this.

7
Audio / [SFML 2] Linux not needing "openal32.dll"?
« on: March 13, 2013, 07:11:29 pm »
So I recently tried playing a few test sounds with SFML on Linux and one thing boggles
my mind. That (unlike SFML on Windows 7) it dosen't throw an error message in the style of
"openal32.dll is missing from your computer". Which could then be found in the "extlibs" folder
in the directory where I've built my SFML files. But here on Linux I have the "extlibs" folder as well,
but I don't have need of "libsndfile-1.dll" nor "openal32.dll", why?

I would assume that they're already installed on my computer somewhere, and it then finds those
files when running. However, isn't ".dll" a "Windows only thing"? As far as I know Linux uses .a and .so
as library extensions. And Windows is using .lib files to import the libraries during compile time, and then on
run-time it needs the .dll files in the same directory as the .exe (And the .lib files are at this point not needed?)?

8
General / [SOLVED]Linux to Windows port with MinGW
« on: March 08, 2013, 04:47:53 pm »
So I've been working with C++ in Linux for a while, and I feel pretty settled with it as my primary OS. So I started looking into how I can port my projects(SFML projects) over to Windows with SFML.

What I've done is simply a window displaying program, it uses pretty much the default layout found on the website for getting a window running. Runs fine on Linux, so I send it over to my Windows partition, get my Windows .dll files, replace the include directory with the one I got when building it for windows (Although, I don't really need to care about switching include directory, right? It's the same source? :I ).

So lets get to the problem: When I try to compile it on Windows I get a bunch of "undefined reference" errors. I've been googling around for a bit and have yet to find out why. Do I perhaps need to compile SFML libraries specifically for the MinGW's port of the "g++" compiler or should standard Windows built libraries work fine?

Below is the Makefile of my Linux setup:
# Project name goes in the PROJ_NAME variable, it has to be passed
# to the makefile externally

# Default compiler flags and options
CXX := g++
CXXFLAGS := -Iinclude -std=c++11
CXX_DEBUG_FLAGS := -Wl,-R,'$$ORIGIN/lib' -L../debug/lib
CXX_RELEASE_FLAGS := -Wl,-R,'$$ORIGIN/lib' -L../release/lib     \
        -lsfml-audio -lsfml-graphics -lsfml-window -lsfml-network -lsfml-system
src_cpp := $(wildcard *.o)


# Release target, for maximum performance
Release: ${src_cpp}
        ${CXX} -o ../release/${PROJ_NAME} -g *.cpp ${CXX_RELEASE_FLAGS} ${CXXFLAGS} -Wall

# Debug target, uses debug symbols when compiling
Debug: CXXFLAGS += -g
Debug: ${src_cpp}
        ${CXX} -o ../debug/${PROJ_NAME} *.cpp ${CXX_DEBUG_FLAGS} ${CXXFLAGS} -Wall


# For effective, fast and correct compiling(not skipping files):
# specify each .h file that each .o file is dependent on in the
# form of:
# objectfile.o: headerfile.h
 

And the Windows makefile:
# Project name goes in the PROJ_NAME variable, it has to be passed
# to the makefile externally

# Default compiler flags and options
CXX := g++
CXXFLAGS := -Iinclude -std=c++11
CXX_DEBUG_FLAGS := -Wl,-R,'$$ORIGIN/lib' -L../debug/lib
CXX_RELEASE_FLAGS := -Wl,-R,'$$ORIGIN/lib' -L../release/lib  \
        -lsfml-graphics-2 -lsfml-audio-2 -lsfml-window-2 -lsfml-network-2 -lsfml-system-2
src_cpp := $(wildcard *.o)


# Release target, for maximum performance
Release: ${src_cpp}
        ${CXX} -o ../release/${PROJ_NAME} -g *.cpp ${CXX_RELEASE_FLAGS} ${CXXFLAGS} -Wall

# Debug target, uses debug symbols when compiling
Debug: CXXFLAGS += -g
Debug: ${src_cpp}
        ${CXX} -o ../debug/${PROJ_NAME} *.cpp ${CXX_DEBUG_FLAGS} ${CXXFLAGS} -Wall


# For effective, fast and correct compiling(not skipping files):
# specify each .h file that each .o file is dependent on in the
# form of:
# objectfile.o: headerfile.h
 

And finally the error produced can be seen below:
Code: [Select]
C:\Users\XXXXX\Desktop\CrossPlatformTest\src>mingw32-make PROJ_NAME=Wind
owsTest
g++ -o ../release/WindowsTest -g *.cpp -Wl,-R,'$ORIGIN/lib' -L../release/lib
-DSFML_DYNAMIC -lsfml-graphics-2 -lsfml-audio-2 -lsfml-window-2 -lsfml-network-2
 -lsfml-system-2 -Iinclude -std=c++11 -Wall
C:\Users\XXXXX~1\AppData\Local\Temp\cc7MaKMQ.o: In function `main':
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:5: undefined refer
ence to `_imp___ZN2sf9VideoModeC1Ejjj'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:5: undefined refer
ence to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKSsjRKNS_15ContextSettingsE
'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:13: undefined refe
rence to `_imp___ZN2sf6Window5closeEv'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:10: undefined refe
rence to `_imp___ZN2sf6Window9pollEventERNS_5EventE'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:16: undefined refe
rence to `_imp___ZN2sf5ColorC1Ehhhh'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:16: undefined refe
rence to `_imp___ZN2sf12RenderTarget5clearERKNS_5ColorE'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:17: undefined refe
rence to `_imp___ZN2sf6Window7displayEv'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:7: undefined refer
ence to `_imp___ZNK2sf6Window6isOpenEv'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:20: undefined refe
rence to `_imp___ZN2sf12RenderWindowD1Ev'
C:\Users\XXXXX\Desktop\CrossPlatformTest\src/main.cpp:20: undefined refe
rence to `_imp___ZN2sf12RenderWindowD1Ev'
collect2.exe: fel: ld returnerade avslutningsstatus 1
makefile:15: recipe for target 'Release' failed
mingw32-make: *** [Release] Error 1


What am I doing wrong?

9
General / [Ubuntu/Linux] Need some help understanding linking and CMake.
« on: January 13, 2013, 05:51:59 pm »
I'm currently experimenting with some stuff in Ubuntu, and thought I'd try SFML as well. I installed the extra required dependencies, downloaded the latest SFML release and compiled etc.

So I've got SFML up and running now using KDevelop4 (Which I choose over Eclipse C++ due to some annoying bugs). As KDevelop4 uses CMake to run it's applications, I've got a CMakeLists.txt that looks like this:

cmake_minimum_required(VERSION 2.8)
project(sfml)

set(SFML_INCLUDE_DIR "${PROJECT_BINARY_DIR}/libs/sfml/include/")
set(SFML_LIBRARY_DIR "${PROJECT_BINARY_DIR}/libs/sfml/lib/")

include_directories(${SFML_INCLUDE_DIR})

add_executable(sfml Engine/Foobar.cpp main.cpp)

find_library(SFML_AUDIO NAMES sfml-audio HINTS ${SFML_LIBRARY_DIR} NO_DEFAULT_PATH)
find_library(SFML_GRAPHICS NAMES sfml-graphics HINTS ${SFML_LIBRARY_DIR} NO_DEFAULT_PATH)
find_library(SFML_WINDOW NAMES sfml-window HINTS ${SFML_LIBRARY_DIR} NO_DEFAULT_PATH)
find_library(SFML_SYSTEM NAMES sfml-system HINTS ${SFML_LIBRARY_DIR} NO_DEFAULT_PATH)
find_library(SFML_NETWORK NAMES sfml-network HINTS ${SFML_LIBRARY_DIR} NO_DEFAULT_PATH)

target_link_libraries(sfml
        ${SFML_AUDIO}
        ${SFML_GRAPHICS}
        ${SFML_WINDOW}
        ${SFML_SYSTEM}
        ${SFML_NETWORK})

install(TARGETS sfml RUNTIME DESTINATION bin)


add_subdirectory(Engine)
 

So I have a folder called "libs" in the same directory as my executable, where I keep the SFML libraries and includes. So I proceed to build this, and run it, getting a nice little SFML window.. BUT.. here's what I don't understand:

  • If I move my executable, as well as the lib folder far away from eachother, I can still run the executable without problem. I assume it uses the libs located in /usr/local/lib to link to, but shouldn't it search for libraries in the folder I specified in CMake? Or look for them in the same directory  as the executable is in?
  • So I think everything is fine and send my friend the executable as well as the SFML libraries, but he's missing those extra dependencies that you had to install for Linux (according to tutorial). So I would assume I have to export those libraries to him as well or tell him to download them through the package manager? I'm fairly new to Linux and Ubuntu, but this seems like a kinda unuserfriendly way to send around a program
  • If the above seems kinda cluttered, a quick summary: Executables look for their libs in /usr/local/libs or in the directory the .exe is in? Does the person I send the program to need all the extra linux dependencies too, if he's running Linux? Why don't Windows for example need those extra dependencies?

10
Graphics / sf::Texture subRect loading bug?
« on: December 23, 2012, 11:59:23 pm »
So I'm experimenting around with my assetLoader, parsing asset data (If we take a Texture for example), such as subRect and filepath. As this allows be to change path and such of my assets without messing around with the code.

And now I implemented an additional little feature, to reparse the file and reload the asset during runtime, mainly for faster testing of different things. However, when changing data for my Textures, the subRect data more specifically(show below):

myTexture.loadFromFile("myPath.png", subRect);

If I change the Xand Y values of the subRect, another sprite on my spritesheet is drawn on my screen. But if I change the Width and Height values of the subRect, and reloading, nothing happens to the texture. Altough if I change the subRect Width/Height to something lower, I get this(See below):

INFO: The below pictures are rendered on my SFML sf::RenderWindow, and I have then taken screenshots of what it looks like, just to clear things up.

Texture taken from sprite sheet, sf::IntRect(0,0, 8,8)


Texture taken from sprite sheet, sf::IntRect(0,0, 4,4)


As you can see the picture with width and height of 4 pixels, is still 8 x 8 pixels. I have tried invoking the texture's default constructor right before reloading it to reset all values, but still the same result. I suspect this is a bug but I really have no idea what's going on :/

HOWEVER... When I have reloaded the texture as a 4x4 texture, atleast the 4x4 pixels around the top left corner are showing what they should, my guess is that the other pixels are somehow "left behind" and not getting cleared up or something :I

11
Graphics / sf::Sprite.setTextureRect possible bug?
« on: August 28, 2012, 08:08:28 pm »
So I decided to move my tile textures onto a spritesheet instead of having separate images. So I loaded the spritesheet texture to the sprite of my tile, set the textureRect of that sprite and this bug occurs.

I believe that the TextureRect is leaking, and here's why:

As I'm moving my character vertically, these spaces between tiles occasionally flickers (Took me ages to actually get one of these flickers on picture). For the record, this did NOT happen when I had separate textures. And I believe that the reason to why the lines are black/yellow is because my spritesheet looks like this:

The tiles below the ground tiles are just there so I can distinguish the tiles easier, and no, I haven't finished the tile textures, that's why the same tile is looped all over the tiles on the spritesheet. Anyway, as you can see the edges around the tiles below the "ground" tiles are indeed yellow and black, which the flickering lines in the game are.

Is this a bug or am I doing something wrong? Should I create separate textures from the spritesheet and store them in a vector or such?

12
So I found an answer to my previous question on how to properly use sf::Views, altough now suddenly, not sure exactly when this problem occured. But as long as I'm moving my mouse around my SFML program completely freezes. I googled my way to http://en.sfml-dev.org/forums/index.php?topic=6079.0 where the solution is to :

"comment the call to ProcessJoystickEvents in src/SFML/Window/Window.cpp"

Altough I don't know where or how I find the Window.cpp file, so my question is simply this: How do I locate that file? I'm using Visual C++ Studio 2010, so is it a file I need to look for within Visual Studio or do I need to go around different directories to find it?

Any help is appreciated :/

EDIT: Alright, so I haven't had this problem with my other projects before which are much smaller than this project. But now all of a sudden all of my SFML projects freeze on mouse movement so I really believe it's the same problem as the one in the thread I linked.
And also, I'm using the Static library.

13
Graphics / Help with sf::View
« on: August 12, 2012, 02:35:33 pm »
Hi

So I'm currently making a game that uses pixelgraphics for most sprites and whatnot, having tiny images that I scale up in SFML. The thing is, to scale all my sprites I run them through a draw method which simply does "setScale()" using the constant float containing the scale factor. However, when I'm rendering many sprites, such as a tile grid, it takes a moment for the sprites to scale, which gives an ugly looking 1-2 seconds when loading the tile grid. This could ofcourse be because the tile rendering is very uneffective at the moment, as I render every tile and not only those who are visible.

So I was thinking if there was a better way scaling my sprites, using a "sf::View" instead. But I can't seem to understand how it works properly. How much would a times 5 scaling be using the "view.zoom". And as the zoom function zooms to the center, all my sprites are getting placed outside the window, or atleast they're not visible.

So any tips on how I should be scaling pretty much all my sprites to a constant scale effectively?

EDIT: I'm using SFML 2.0

Pages: [1]
anything