Re: Game Prog. NEED HELP

new topic     » goto parent     » topic index » view thread      » older message » newer message

Hi Dan,

> First what is the best way to animate in Euphoria, you know
> like in my game.  Will GIF files work, the kind I use on the net.

What I did for the couple of very simple games I wrote
was to:

1.  Create a number of images to be used as frames in the animation
and save them as bmp files.

2.  Load all these bmp's in my program, (I used a sequence to hold
the reference for each frame)

3.  Everytime (or 2nd, 3rd - depending on how fast you want to
animate your sprites) through your main game loop add 1 to
a counter (if > max then move 1 to counter) and display the image
associated with the sequence loaded above.

This might not be the best way of doing it but it works for me.
If your interested check out euAllegro Games Pack which can
be found through the RDS Contributions page.


Also you might want to look at some of the game/graphics libs available.

I wrote euAllegro - so I'll suggest that one :),
there is also Neil, Exotica, EuSDL,  Open GL wrappers, Morfit for Euphoria,
Jarod, etc etc etc

Actually someone not associated with any of these might like to do a review
giving the pros and cons of each system??

>     My other question is why is the color so messed up in DOS.  I started
> noticing it with some of my programs, so I did a little test.  I made like
15
> bars of colors in the windows paint program, saved it in 256 mode and then
> ran it in Euphoria in 256 mode.  They were extremely messed up!  Is there
a
> remedy for this?

As Jeffrey mentioned you need to load the palette associated with your
images.

Most images have a palette associated with them.  This is an RGB map which
defines the actual colours to be displayed.

You will also have to ensure all your graphics use the same palatte so each
image
doesn't screw other images palettes.

The euAllegro distribution comes with a program called "fixpal" (from
memory)
which given a series of images will make a common palette for all.

Ray Smith

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu