Closed WithinAmnesia closed 2 years ago
I suspect this is a memory usage problem. I was able to get all 5 to load (proof). This was with a 64-bit Linux build with 16 GB of system RAM and 3 GB of video RAM. My task manager shows about 1.4 GB of system memory used.
I tried the Windows build (which is 32-bit) in a VM with 4 GB system RAM and 128 MB video RAM. I got several out-of-memory errors (see log below) and many missing textures with the sdl_hardware
renderer. I got no errors with the sdl
renderer, but the player's head didn't show up.
Error log:
ERROR: [mods\fantasycore\animations\avatar\male\default_feet.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: [mods\fantasycore\animations\avatar\male\default_legs.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: SDLHardwareRenderDevice: Couldn't load image: 'images/avatar/male/AGABAL/default_gloves(x4+).png'. Out of memory
ERROR: [mods\fantasycore\animations\avatar\male\default_hands.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: SDLHardwareRenderDevice: Couldn't load image: 'images/avatar/male/AGABAL/default_chest(x4+).png'. CreateTexture(D3DPOOL_DEFAULT): UNKNOWN
ERROR: [mods\fantasycore\animations\avatar\male\default_chest.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: SDLHardwareRenderDevice: Couldn't load image: 'images/avatar/male/AGABAL/head_short(x4+).png'. CreateTexture(D3DPOOL_DEFAULT): UNKNOWN
ERROR: [mods\fantasycore\animations\avatar\male\head_short.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
INFO: Map: Loading map 'maps/arrival.txt'
INFO: FogOfWar: Loading mask 'engine/fow_mask.txt'
ERROR: [mods\fantasycore\animations\avatar\male\default_feet.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: SDLHardwareRenderDevice: Couldn't load image: 'images/avatar/male/AGABAL/default_pants(x4+).png'. Out of memory
ERROR: [mods\fantasycore\animations\avatar\male\default_legs.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: SDLHardwareRenderDevice: Couldn't load image: 'images/avatar/male/AGABAL/default_gloves(x4+).png'. CreateTexture(D3DPOOL_DEFAULT): UNKNOWN
ERROR: [mods\fantasycore\animations\avatar\male\default_hands.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: SDLHardwareRenderDevice: Couldn't load image: 'images/avatar/male/AGABAL/default_chest(x4+).png'. CreateTexture(D3DPOOL_DEFAULT): UNKNOWN
ERROR: [mods\fantasycore\animations\avatar\male\default_chest.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
ERROR: SDLHardwareRenderDevice: Couldn't load image: 'images/avatar/male/AGABAL/head_short(x4+).png'. CreateTexture(D3DPOOL_DEFAULT): UNKNOWN
ERROR: [mods\fantasycore\animations\avatar\male\head_short.txt:56] AnimationSet: Frame count 6 != 0 for matching animation in animations/hero.txt
I should probably look at including a 64-bit build in the Windows package. It's been 32-bit only since it was good enough at the time and compatible with both 32-bit and 64-bit systems.
I'm back. reading
Wow the avatar looks like a giant! I will save that with my picture archive gallery of game development screenshots. That is too cool; pretty neat :-P.
Okay so you think that Windows 32-bit has reached its end and needs Windows 64-bit? It would be a good idea I take it to go Windows 64-bit anyway to help future proof the game. I cannot remember many new games running only Windows 32-bit these days; maybe prototype stuff. Yeah having Windows 64-bit with also your idea of changed high DPI settings could help future proof Flare https://github.com/flareteam/flare-game/issues/879#issuecomment-1010628638 + https://github.com/flareteam/flare-game/issues/879#issuecomment-1010631990 .
A 64-bit executable will help, but it probably won't solve all you problems. It would be helpful to know how much system and video RAM you have.
Consider the default_chest spritesheet at 4x. It's 16384*4096, so that's 67108864 pixels. Then consider that each pixel is 4 bytes (8 bits each for R,G,B,A), you end up with a 256 MB uncompressed image. Where the other player sprite pieces are around the same size, you're already over 1 GB of RAM used to draw the player. And that doesn't include the map tileset, enemies, spells, etc.
But you can also probably notice that there's a lot of empty space in those spritesheets. That's why we pack our spritesheets to only store the required pixels in the image. So unless you want to repack the spritesheets, you should scale up the existing packed ones instead.
Checks computer / how to find Windows 10 Video RAM
Video R.A.M. 24.531 GB Total Available Graphics Memory 8.192 GB Dedicated Video Memory
System R.A.M. Installed Ram 32 GB
Yeah, I don't think your hardware is the problem 😉
I suck at compressing so I use the big files XD. Also by 2030's my PC should be a dinosaur anyway and if my game gets a proper launch in the late 2020's then my Expensive 2016 PC should be as powerful as a regular affordable gaming laptop by 2026 (Moore's Law and all that).
I wonder though. I tested the big 1000x1000 map with 256x128 tiles and it ran fine. I wonder if I can run the big sprite files on the character and then put ~4000 big sprite enemies on the big 1000x1000 map with 256x128 tiles and stress test again and see if it works. The last stress test of the small tile 1000x1000 map with ~4,000 enemies worked fine even with like 500-1000 enemies on screen.
"A 64-bit executable will help, but it probably won't solve all you problems. It would be helpful to know how much system and video RAM you have." Hmm, if my PC can run Flare x 4 with the big 1000 x 1000 256 x 128 map with ~4,000 enemies with the entire screen filled with enemies using the non-compressed images... I hope that come the late 2020's may PC will be around the same level as a regular gaming laptop.
If I really need the extra performance I could compress but I suck at compressing and the compressed animation defs are a nightmare to upscale by hand.
I think one image has ~500 frames and like 7x2 inputs to change one frame. So without error and not using find-replace (because it is almost impossible to find 'skipped' or double changed values), requires ~3,500 inputs x 2 (using a calculator to find out what ~'367 x 4' is etc.) then manually changing a number with x 4 [~7,000 actions / inputs per image animation def] and then hoping that you did not make an error in the ~7,000 actions in one image. Then do that 5 more times for the basic body for 7,000 x 5 = 35,000 inputs without error / super human ability to get the compressed tileset defs increased in scale by 4.
I do not know how to create automated compressed animation defs. So last night with a calculator and a text editor I did ~10% of the animation image defs for the 5 default body animation images over like ~4 hours. I ended doing just ~half the chest and even then I only had 3 animation cycles or about ~3,500 inputs later. I had a semi-dream when I got up today to use the uncompressed images like I did with the dual wielding and I checked how Danimal made is new item / weapon / armour animations and they were uncompressed and the animation defs were the simplest. So I used that and made the prototype in ~2 hours verses what would have taken ~10+ days if I kept using the text editor and calculator XD.
I really hope that with a Windows 64-bit executable that this can solve the memory issue and Flare can work good enough on my PC (thus hopefully as well on a theoretical late 2020's ~'average' gaming lap top) in the crazy stress test (~4,000 enemies, 1000 x 1000 of 256 x 128 tiles ~'1 square kilometer' map with hopefully fog of test in ~'round 2'). I hope this works, it feels so close to get 'Flare x 4' working. The 128 x 128 icons work, the big menus work, the 1000 x 1000 maps work; with the 256 x 128 tiles work. The enlarged x 4 character avatar sprites work on your 64 bit Linus machine / PC but not with the Windows 32-bit executable. Bit by bit O.o. https://www.youtube.com/watch?v=9D-QD_HIfjA
@dorkster Is the Flare Windows 64-bit executable an older / previous feature on the wishlist or has it been an idea in the back of your mind? Does a Flare Windows 64-bit executable happen when all of the features of a patch are done and then everything is compiled together? Or is it something that can be added in-between features? My understanding on how to create a Windows 64-bit executable is very limited. How complex is implementing a Windows 64-bit executable for Flare do you figure? I take it that it is not trivial yet I hope that it is reasonably doable.
I should be able to ship a 64-bit version with 1.13. MSYS2 installs both a 64-bit and 32-bit environment, so compiling should be no problem. After that, there's only a few things:
Flare engine is working for big avatar sprites: https://github.com/flareteam/flare-game/discussions/887#discussioncomment-2020244 . All thanks to Justin Jacobs:-)!
default_chest(x4++).txt default_feet(x4++).txt default_hands(x4++).txt default_legs(x4++).txt head_bald(x4++).txt head_short(x4++).txt AGABAL.zip I don't have much time. These all work but break once more than 3 are loaded. All 5 cannot load together they make a black box around the avatar. I tested Head+Chest+Hands works, Head+Chest+Legs work etc. but once 4 or 5 are loaded together they break. I must go now.