Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sprite bigger than tiles??

2 views
Skip to first unread message

Gregory Alan Jones

unread,
Dec 28, 1995, 3:00:00 AM12/28/95
to
I am in the process of writing a game that is tile based. Most of my
sprites are going to be bigger than the tiles. Does anyone have any
opinions as to the best way to handle this? If I have the sprites
"registered" in only one tile at a time then there will be collision
problems and problems with trying to select the sprite with a mouse.
I could "register" every tile the sprite is on but then i have the
problem of when 2 sprite cover a tile (each covering 1/2) of the tile.
Which one gets "registered"?
Also, the sprite will be constantly changing the tiles it is in.. if the
sprite is fairly large then this could slow things down (possibly). If
anyone has any better solutions I would be grateful!

Rainer Deyke

unread,
Jan 3, 1996, 3:00:00 AM1/3/96
to
Gregory Alan Jones (gaj...@jove.acs.unt.edu) wrote:
: I am in the process of writing a game that is tile based. Most of my

Don't "register" the sprites in tiles. Instead create a linked list or array
of all the sprites with their location (in pixels or tiles). Since each
sprite is a rectangle (with some of the pixels turned transparent), you can
easily check if the mouse cursor is on a sprite. BTW, what do you mean by
tile based game? Almost all 2D games are "tile based", but a tile based
side scroller is totally differet from a tile based RPG.

--
+------------------------------------------------------+
| "Fumbling in frustration, inside soul torn apart |
| Feel the loss of paradise, leave an empty heart |
| Closing eyes will shut out, the warm light of a life |
| Grip is fading slowly, for each day passing by" |
| - Desultory, "A Closing Eye" |
+------------------------------------------------------+
| Rainer Deyke (rai...@mdddhd.fc.hp.com) |
+------------------------------------------------------+

0 new messages