How to Create an "animated Sprite" with bigger than 4096 pixels?

Posted By: BySharDe

How to Create an "animated Sprite" with bigger than 4096 pixels? - 11/18/16 15:42

As 128*32= 256*16=4096, an animated sprite(image+16.tga , image+32.tga) can only support 16 frames of 256*256 sprites,
which the total frames account is quite not enough.
Is there a method to handle a 8192 pixels BMAP, which contains 32*(256*256) frames?
Or we should construct our own functions.
Posted By: HenWoll

Re: How to Create an "animated Sprite" with bigger than 4096 pixels? - 11/18/16 15:55

im undestand your question.
tested this with a 20+ sprite
and i have nothing problems


the result is 8000. its other 4096 ^^
Posted By: 3run

Re: How to Create an "animated Sprite" with bigger than 4096 pixels? - 11/18/16 16:23

If you'll set 'warn_level' to 6, you will get the error. But it's ok, when you'll publish your project, such errors won't appear. You could code your own way to use animated sprites too (like in some other engines where they use sprite sheets, so they cycle vertically too).

Quote:
Warning W1108: Oversized texture

This texture size is not supported on many target systems. This warning is issued with textures bigger than 4096x4096 pixels if the warn_level variable is set to 3 or above. Unless you need a big texture size for sky cubes or sprite animations, avoid textures above 1024x1024.


Best regards!
Posted By: BySharDe

Re: How to Create an "animated Sprite" with bigger than 4096 pixels? - 11/19/16 04:42

Originally Posted By: BlackJack
im undestand your question.
tested this with a 20+ sprite
and i have nothing problems


the result is 8000. its other 4096 ^^


Hej, dude. I tested on my snippet of your "test+20.png" sprite, and still meet my mentioned problem. My code is here.
Code:
#include <acknex.h>
#include <default.c>

action explosion()
{
	my.ambient = 100;	
	while(1) 
	{
		while (!key_e) 
			wait (1);
		for (my.frame=0; my.frame<20; my.frame += 1.0 * time_step) 
			wait (1);
	}
}

function main()
{
	vec_set(sky_color,vector(100,100,100));
	level_load(""); 
	ent_create("test+20.png", vector(800,0,0), explosion);
}

© 2024 lite-C Forums