Compiled Sprites

How would compiled sprites solve that problem? Compiled sprites are
just a different way of storing the pictures (as assembly instructions
instead of pixel information in memory), or do you know a definitionb
of compiled sprites that I don’t.

Also compiled sprites (in the traditonal sense) don’t lend themselves
well to SDL as they are processor (or at least processor family)
specific.

Chris Esen wrote:

Is or when will there be support for compiled sprites? I just started using

SDL and I planned to make a font engine as my first project, and I rather
not use a minimum of 36 ( a - z, 0 - 9) bitmaps to represent the
characters.>
Later,

Chris


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Is or when will there be support for compiled sprites? I just started using
SDL and I planned to make a font engine as my first project, and I rather
not use a minimum of 36 ( a - z, 0 - 9) bitmaps to represent the characters.

Later,

Chris________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

I meant having one picture w/ say 10 different frames of animation in it.
Instead of 10 different pictures w/ 1 frame of animation.

This way I can individualy take the required frame out, instead of loading
10 different surfaces w/ a single frame. (I just started, so there may be a
different way of doing it.)>From: Phoenix Kokido

Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: Re: [SDL] Compiled Sprites
Date: Tue, 08 Aug 2000 19:37:55 +0000

How would compiled sprites solve that problem? Compiled sprites are
just a different way of storing the pictures (as assembly instructions
instead of pixel information in memory), or do you know a definitionb
of compiled sprites that I don’t.

Also compiled sprites (in the traditonal sense) don’t lend themselves
well to SDL as they are processor (or at least processor family)
specific.

Chris Esen wrote:

Is or when will there be support for compiled sprites? I just started
using

SDL and I planned to make a font engine as my first project, and I
rather
not use a minimum of 36 ( a - z, 0 - 9) bitmaps to represent the
characters.

Later,

Chris


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

I had a feeling that’s what you were talking about, you can pass that
information to SDL_BlitSurface with the src and dst SDL_Rect’s.

Chris Esen wrote:>

I meant having one picture w/ say 10 different frames of animation in it.
Instead of 10 different pictures w/ 1 frame of animation.

This way I can individualy take the required frame out, instead of loading
10 different surfaces w/ a single frame. (I just started, so there may be a

different way of doing it.)

From: Phoenix Kokido <@Wes_Poole>
Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: Re: [SDL] Compiled Sprites
Date: Tue, 08 Aug 2000 19:37:55 +0000

How would compiled sprites solve that problem? Compiled sprites are
just a different way of storing the pictures (as assembly instructions
instead of pixel information in memory), or do you know a definitionb
of compiled sprites that I don’t.

Also compiled sprites (in the traditonal sense) don’t lend themselves
well to SDL as they are processor (or at least processor family)
specific.

Chris Esen wrote:

Is or when will there be support for compiled sprites? I just started
using

SDL and I planned to make a font engine as my first project, and I
rather
not use a minimum of 36 ( a - z, 0 - 9) bitmaps to represent the
characters.

Later,

Chris


Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

You make an image which is all the frames concatinated.

say your frame is 100x100 and you have 10, just make a 1000x10 image
which contains them.

Then to get the frame you want, you do something like the following:

SDL_Rect source_rect, dest_rect;

source_rect.w = 100;
source_rect.h = 100;
source_rect.x = 100 * the_frame_number_you_want; // 0-9
source_rect.y = 0;

dest_rect.w = 100;
dest_rect.h = 100;
dest_rect.x = x_coord_on_the_screen_to_draw_the_frame;
dest_rect.y = y_coord_on_the_screen_to_draw_the_frame;

SDL_BlitSurface( image_holding_all_the_frames, &source_rect, screen,
&dest_rect );

is that what you’re after?On Wed, 09 Aug 2000, you wrote:

I meant having one picture w/ say 10 different frames of animation in it.
Instead of 10 different pictures w/ 1 frame of animation.

This way I can individualy take the required frame out, instead of loading
10 different surfaces w/ a single frame. (I just started, so there may be a
different way of doing it.)

From: Phoenix Kokido
Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: Re: [SDL] Compiled Sprites
Date: Tue, 08 Aug 2000 19:37:55 +0000

How would compiled sprites solve that problem? Compiled sprites are
just a different way of storing the pictures (as assembly instructions
instead of pixel information in memory), or do you know a definitionb
of compiled sprites that I don’t.

Also compiled sprites (in the traditonal sense) don’t lend themselves
well to SDL as they are processor (or at least processor family)
specific.

Chris Esen wrote:

Is or when will there be support for compiled sprites? I just started
using

SDL and I planned to make a font engine as my first project, and I
rather
not use a minimum of 36 ( a - z, 0 - 9) bitmaps to represent the
characters.

Later,

Chris


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

I promise you I did that, but it didnt show up. It works now though, I
appreciate your help.>From: Julian Peterson

Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: Re: [SDL] Compiled Sprites
Date: Wed, 9 Aug 2000 09:31:28 +1200

You make an image which is all the frames concatinated.

say your frame is 100x100 and you have 10, just make a 1000x10 image
which contains them.

Then to get the frame you want, you do something like the following:

SDL_Rect source_rect, dest_rect;

source_rect.w = 100;
source_rect.h = 100;
source_rect.x = 100 * the_frame_number_you_want; // 0-9
source_rect.y = 0;

dest_rect.w = 100;
dest_rect.h = 100;
dest_rect.x = x_coord_on_the_screen_to_draw_the_frame;
dest_rect.y = y_coord_on_the_screen_to_draw_the_frame;

SDL_BlitSurface( image_holding_all_the_frames, &source_rect, screen,
&dest_rect );

is that what you’re after?

On Wed, 09 Aug 2000, you wrote:

I meant having one picture w/ say 10 different frames of animation in
it.
Instead of 10 different pictures w/ 1 frame of animation.

This way I can individualy take the required frame out, instead of
loading
10 different surfaces w/ a single frame. (I just started, so there may
be a
different way of doing it.)

From: Phoenix Kokido
Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: Re: [SDL] Compiled Sprites
Date: Tue, 08 Aug 2000 19:37:55 +0000

How would compiled sprites solve that problem? Compiled sprites are
just a different way of storing the pictures (as assembly instructions
instead of pixel information in memory), or do you know a definitionb
of compiled sprites that I don’t.

Also compiled sprites (in the traditonal sense) don’t lend themselves
well to SDL as they are processor (or at least processor family)
specific.

Chris Esen wrote:

Is or when will there be support for compiled sprites? I just
started

using

SDL and I planned to make a font engine as my first project, and I
rather
not use a minimum of 36 ( a - z, 0 - 9) bitmaps to represent the
characters.

Later,

Chris


Get Your Private, Free E-mail from MSN Hotmail at
http://www.hotmail.com


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

I meant having one picture w/ say 10 different frames of animation in it.
Instead of 10 different pictures w/ 1 frame of animation.

Say the image is 50x50 pixels (at most).

Just make a 500x50 image with all 10 frames, then use offsets into it
when using SDL_BlitSurface.

I do this when drawing text (not animation, I know… but similar).

-bill!

I just want to say thanks again, I just finished a font engine. It is
simple, yet effective. ;)>From: William Kendrick

Reply-To: sdl at lokigames.com
To: sdl at lokigames.com
Subject: Re: [SDL] Compiled Sprites
Date: Tue, 8 Aug 2000 16:22:13 -0700 (PDT)

I meant having one picture w/ say 10 different frames of animation in
it.
Instead of 10 different pictures w/ 1 frame of animation.

Say the image is 50x50 pixels (at most).

Just make a 500x50 image with all 10 frames, then use offsets into it
when using SDL_BlitSurface.

I do this when drawing text (not animation, I know… but similar).

-bill!


Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Hi,

How to make a compiled sprite in SDL?

[]s
Paulo

Hello !

How to make a compiled sprite in SDL?

There are no compiled sprites like in Allegro in SDL.
But you can use the RLE flag, that produces sprites
that are written memory like set color x in next y pixels,
next z pixels are transparent and so on.

CU