2D game with the need of fast image resizing

Hi, i’m new… i’m writing a game ibrid streetfighter-like/rogue-like.
I’m going to use a simple 2D rapresentation, front view, with objects
composed by PNG images (with alpha channel), heavry zooming activity,
in the streetfighter-like mode; panoramic, with objects of a single
PNG image (with alpha channel) in the rogue-like mode.

After some days i am now able to use SDL, but i found that the image
resizing is not implemented in the main lib, not in hw or sw surfaces:
so i use now OpenGL surface, not simple like the other two, but i
manage to make all work.

Now, i work and develop and play on linux, all the computers i use
don’t have a single danm bit of alpha channel >:(
I need the alpha, i found that there is a Mesa environment variable
that can force the alpha, MESA_GLX_FORCE_ALPHA, but i don’t find a way
to make it work :frowning: Somebody here can give me some
hint(!=hardwareupgrade)?

It is too heavry to change the full-screen surface from OpenGL to SW
and vice-versa during the game, when the game mode change (the
rogue-like mode is easyer to develop in SW surface, i’m not yet a
masochist)?

You think i have chosen the wrong library? You know one more adact?

Thanks for the help,
pangon

Well, I started using SDL some months ago, and I had some issues
with the alpha. Finally I realised that it was a problem of mine, using the
wrong calls. Be sure of this:

- Are you creating the surface with the right alpha mask?
- Are you using the right calls to SDL_DisplayFormat and

SDL_DisplayFormatAlpha?

It seems that using DisplayFormatAlpha when no alpha channel is

available for the surface, makes it invisible. The same may be applied to
the alpha mask.

Maybe you should provide some code or try making a simple test (only

with one surface) until you make it work…

Hope this helps!++++++++++++++++++++++++++++++++

ALBERT FERNANDEZ MARSAL
CIRSA INTERACTIVE CORP. SL
Analista senior y programador
++++++++++++++++++++++++++++++++

-----Mensaje original-----
De: sdl-bounces+afmarsal=cirsa.com at libsdl.org
[mailto:sdl-bounces+afmarsal=cirsa.com at libsdl.org] En nombre de Claudio
Felicioli
Enviado el: lunes, 10 de octubre de 2005 9:57
Para: sdl at libsdl.org
Asunto: [SDL] 2D game with the need of fast image resizing

Hi, i’m new… i’m writing a game ibrid streetfighter-like/rogue-like.
I’m going to use a simple 2D rapresentation, front view, with objects
composed by PNG images (with alpha channel), heavry zooming activity,
in the streetfighter-like mode; panoramic, with objects of a single
PNG image (with alpha channel) in the rogue-like mode.

After some days i am now able to use SDL, but i found that the image
resizing is not implemented in the main lib, not in hw or sw surfaces:
so i use now OpenGL surface, not simple like the other two, but i
manage to make all work.

Now, i work and develop and play on linux, all the computers i use
don’t have a single danm bit of alpha channel >:(
I need the alpha, i found that there is a Mesa environment variable
that can force the alpha, MESA_GLX_FORCE_ALPHA, but i don’t find a way
to make it work :frowning: Somebody here can give me some
hint(!=hardwareupgrade)?

It is too heavry to change the full-screen surface from OpenGL to SW
and vice-versa during the game, when the game mode change (the
rogue-like mode is easyer to develop in SW surface, i’m not yet a
masochist)?

You think i have chosen the wrong library? You know one more adact?

Thanks for the help,
pangon


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I have no problem to use the alpha with SW and HW surfaces, i can’t
get one in OpenGL surfaces; if i use:

SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);

to require a minimum of alpha before the SDL_SetVideoMode call, the
execution fail with:

SDL_SetVideoMode fails: Couldn’t find matching GLX visual

And it has all the right to happen, because using glxinfo i see that
no one supported visual can have any alpha.
What i want is to obtain it even if i can’t have it from hardware. i
know of a Mesa functionality, setting MESA_GLX_FORCE_ALPHA, but i fail
to make it works :frowning:
Anyway, thanks for your help :slight_smile:

What is your GLX driver under X11 ?
I know that Nvidia driver replace mesa based GLX with their own.On 10/10/05, Claudio Felicioli wrote:

I have no problem to use the alpha with SW and HW surfaces, i can’t
get one in OpenGL surfaces; if i use:

SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 8);

to require a minimum of alpha before the SDL_SetVideoMode call, the
execution fail with:

SDL_SetVideoMode fails: Couldn’t find matching GLX visual

And it has all the right to happen, because using glxinfo i see that
no one supported visual can have any alpha.
What i want is to obtain it even if i can’t have it from hardware. i
know of a Mesa functionality, setting MESA_GLX_FORCE_ALPHA, but i fail
to make it works :frowning:
Anyway, thanks for your help :slight_smile:


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I use MESA driver, it is specific for my card: Mesa DRI Rage 128 Pro
20041026 AGP 1x x86/MMX/SSE

I tryed to change to nvidia, but they don’t support my card and GLX
doesn’t start

help me, i can’t sleep :(((On 10/10/05, Olivier Delannoy <olivier.delannoy at gmail.com> wrote:

What is your GLX driver under X11 ?
I know that Nvidia driver replace mesa based GLX with their own.