1. answer (reprise)

>
> for i=1  to 30 by 1 do--number of bitmap (+1 for indexing in sequence purposes
)
> for poop = 1 to (length(tank[i]))  do
>     for aloop = 1 to 29  do--length of bmp file
>
>         a=tank[i][poop][(aloop)]

ok, here's a more complete answer:
tank is a sequence of IMAGES, without palettes, tank[1]=frame 1
tank[2]=frame 2, etc.  "i" is the FRAME number 1-30.  Each frame is of
the tank facing a different angle, -OR- of different distances from you,
depending on which demo the code was ripped from

Length(tank[i]) is HOW HIGH frame i is in pixels
poop (don't ask!) is indexing down vertically scanline by scanline of
tank image i

aloop is indexing horizontally along scanline poop of image i

a=tank[i][poop][(aloop)]=tank[i][poop][aloop]=the pixel color aloop
pixels from the left side of scanline poop of tank image i.

When I draw into the virtual screen, I check to see if a > 0. 0 is my
masking color, anything color 0 in a "sprite" will be transparent. If a>0
then I replace the appropriate pixel in the Virtual Screen with a.

It's really VERY simple about the 5th time you do it.  Keep playing with it.

Now the asteroids thing will take longer to explain... =)  I've had 50+
asteroids animating on the screen without any trouble, aside from a
strange bug in my screen update procedure that draws something wierd in
one of the corners somethimes. Get out the raid can.

Michael Packard
A Crash Course in Game Design and Production
http://exo.com/~lgp/euphoria
lgp at exo.com

new topic     » topic index » view message » categorize

2. Re: answer (reprise)

>It's really VERY simple about the 5th time you do it.  Keep playing with it.

Maybe I just need to write it without your code sitting in front of me.:)



>Now the asteroids thing will take longer to explain... =)  I've had 50+
>asteroids animating on the screen without any trouble, aside from a
>strange bug in my screen update procedure that draws something wierd in
>one of the corners somethimes. Get out the raid can.


Yes your mailer is getting out.  Thank you for the reply,  I am hoping I
start understanding it.  I was writing it down line by line and kind of
diagramming what variables are where, and how they affect each other,  and
then I saw those parenthasis, and went "What the H at ## is that???"  Hmm.
calls for some in depth searching.  Quite a while later,  I gave up looking
through what I had.
        I am not sure how to help the guy who wrote me back,  I don't really
have anything to send him,  can send him what I have, but would mostly be
inclined to let those who wish to send him THEIR stuff to let them.
         The GURU engine seems to ignore punctuation marks.  It would be
cool to write in the ability to stick a wild card in the middle of the search.
        Yes I know, everyone has great idea's.
Thanks again for the help,  I am working on a Star Trek type game similar to
EGATREK,  hopefully with better graphics.  Already I have figured out the
[1..200] part of your code (mostly) but still want to figure out how to
limit the width of it,  so stuff could come from outside the area, and onto
the main view screen.  You have really helped me a lot,  and really
appreciate it.  I know that we need to send in a formal step by step answer
to your assignments,  so will get down to it.  I have been off the computer
most of the night, so will sign off for now, and either go to sleep or
program, or whatever.  Had three cups of Guatamalan Antigua coffee in the
last hour, so don't think sleep is in the works.
Monty

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu