jPCT-AE - a 3d engine for Android > Projects
TheoTown
Lobby:
Hi,
I wrote a 2d city simulation game using jPCT as blitting engine. It's still in alpha phase but I'm working on it :)
Homepage: http://www.theotown.de/app/
Google Play: https://play.google.com/store/apps/details?id=info.flowersoft.theotown.theotown
Greetings
Lobby
EgonOlsen:
That's pretty impressive...I ended up more or less bankrupt, but anyway... ;)
Are these buildings individual textures or are you using sprite sheets/texture atlas'...whatever you want to call multiple images on one texture?
Lobby:
Thank you :)
I use a huge 2048x2048 texture which contains all the graphics (so it's a texture atlas). Textual plugins then define the coordinates of single frames. I experimented on other solutions but the texture atlas seems to be the fastest for drawing.
This is the texture with a scaling of 25%:
A problem are old devices with a too small VM stack. They can't run the game, even if the texture size is supported.
EgonOlsen:
I see. That's because a 2048*2048 textures needs 16mb alone on the GPU plus the same amount in VM memory. There are some possibilities to tweak texture memory usage like using 16bit or ETC compression, compressing the VM copy in memory or even swapping it to the SSD by using the Virtualizer class. But I somehow doubt that this will cut it in the low end...how much memory do these devices have available?
Lobby:
It has a heap size of 16 MB ;D
ETC doesn't help because it needs for a short time even more memory than without it (I guess it's because of the compressing process). I think it would be needed here to upload just parts of the texture so that the whole image never has to be stored within the VM heap.
Navigation
[0] Message Index
[#] Next page
Go to full version