[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Hi, I'm new... , isometrics (long)
--- Glen Wheeler <firstname.lastname@example.org> wrote:
> I'm not sure I am grasping exactly what your
> saying here. Are you saying
> something along the lines of splitting each sprite
> which would be placed 'on
> top' of each diamond to determine the draw order,
> then we can just sort of
> paste them all on?
Something like that, yes. Drawing the diamonds is the
easy part. It's what happens when you place tall
things on the map (people,walls, etc) that things
begin to get difficult.
You can simplify things immensely by deciding that
you'll never draw anything that's more than 1 map unit
wide (make walls, buildings etc. out of 1 unit
segments). That way, the calculation of what is
behind what (zbuffer order) is a lot simpler and you
simply draw in order of rearmost visible corner. For
maps this just means Draw the rearmost cell first.
> couldn't the engine get away with drawing
> the sprites from the top-down, so as to handle
> overlaps properly thatway? Or am I just totally
> confused? (last night was not a good night for me
You may be effectively saying "in z order" (ie.
furthest away first)
> Heh heh, well I guess the outdoor areas could be
> drawn, and interacted
> through that way
> When you say imobile, do you mean that it will be
> imobile while scrolling?
I mean 90% of the pixels that you're scrolling into
are going to remain unchanged because they're things
like walls, trees, floors, columns and other
architectural whatnots that don't roam around and have
very little animated movement.
> Because I was/am planning on animating alot of the
> game screen
> (monsters/warriors with idle animations, burning
> torches, spiders and stuff
> cruising around, etc) but pausing it all while
I'd keep the novelty animations in small areas. There
are a couple of tricks you can do to speed them up
based on the fact that you need to draw everything
both behind and in front of anything that moves.
1) If you know the maximum height of everything on the
map, it limits the number of map diamonds in front of
the animation that you need to draw.
Suppose that you are animating something that is high
enough to obscure two diamonds behind it. You must
draw everything on those two diamonds before drawing
the animation. Suppose the tallest thing on the map
obscures 5 diamonds behind it. You must check the 5
diamonds in front of each animation for things to be
redrawn in front of that animation.
You may wish to examine:
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
pygame mailing list