Original Post
Hello everyone. This is my first post here but I have lurked for a while to help myself out with some problems. I finally have one that I can't find a solution to. I am writing a multiplayer game in java using LWJGL and I just recently converted my client textures to not be hardcoded in, but to be loaded from a sprite sheet. All textures are loaded using slick-util's TextureLoader class.
The sprite sheet is loaded at initialization in my ResourceManager class and this class also loads the positions of all of the textures on this sheet and I use these relative positions in order to render each texture from the main sheet.
My problem is that it displays a very weird image consisting of unicode characters, as shown in the attached image. If I instead load the sprite sheet on every update loop, it then displays correctly. Obviously I don't want to load the textures each loop and this causes a MemoryOverflow exception. But when I instantiate this class at initialization the problem occurs. I can't seem to figure this out. It seems as if the texture is no longer in memory, although it should be.
Thanks in advance.
The sprite sheet is loaded at initialization in my ResourceManager class and this class also loads the positions of all of the textures on this sheet and I use these relative positions in order to render each texture from the main sheet.
My problem is that it displays a very weird image consisting of unicode characters, as shown in the attached image. If I instead load the sprite sheet on every update loop, it then displays correctly. Obviously I don't want to load the textures each loop and this causes a MemoryOverflow exception. But when I instantiate this class at initialization the problem occurs. I can't seem to figure this out. It seems as if the texture is no longer in memory, although it should be.
Thanks in advance.