Windows Not using any sprites. Good or bad?

YanBG

Member
Might fit programming forum too but i want a longer discussion.

Actually right now i have one sprite, having 1 pixel, to be able to use the mp_ functions but i draw everything else from backgrounds which are included files.



Should i feel smart? :D
 

TheSnidr

Heavy metal viking dentist
GMC Elder
It's a terrible idea actually! :D
Internal sprites are automatically packed into texture pages, which fits many sprites onto the same canvas and has the potential to greatly reduce texture swaps. GM also manages memory differently for internal and external sprites, resulting in external sprites using 4x the amount of memory. So the goal should always be to use internal sprites as often as possible.
 

YanBG

Member
It's a terrible idea actually! :D
Internal sprites are automatically packed into texture pages, which fits many sprites onto the same canvas and has the potential to greatly reduce texture swaps. GM also manages memory differently for internal and external sprites, resulting in external sprites using 4x the amount of memory. So the goal should always be to use internal sprites as often as possible.
These are spritesheets, curently 1400x1400 pixels(GM supports up to 2048x2048?). I use background_add and then draw_background_part, with variables for the specific frames. Spritesheets are way easier for adding/updating. I used automated script for making GM sprites from blender before that but i still ended up with huge amount of individual assets, not to mention all the separate frames in images folder. I could go with normal backgrounds but graphical mods won't be possible for the players.
So there will be more texture swaps now? I could check the debug myself actually.
 

TheSnidr

Heavy metal viking dentist
GMC Elder
Making your own texture pages is a good alternative to using the built-in ones, as it does pretty much the same thing. However, you still have the memory management problem, and this won't be fixed unless you import your sprites as internal sprites.
 

YanBG

Member
For now i have only the characters as included files(they are the bulk of the graphics), the menus, terrain tiles, houses and other environment objects are internal backgrounds. At some point i could import everything for a test.

Another benefit of external graphics is very fast compile times, there is a slowdown maybe when they are imported at the game start though.

Edit: @TheSnidr does it use less memory when i have only backgrounds for animations etc instead of sprites?
 
Top