Re: [Super-tux-devel] Gameloop Rewrite Status
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-01-03 11:03:11
|
Hey, The hardest thing about bitmask is to know what side is colliding... Have = you=20 managed to full fill that? You could also have a look at one of the Ingo's games, like Windestille or= =20 Pingus (they are c++, but may be helpfull). Ricardo Em S=C3=A1bado, 3 de Janeiro de 2004 03:22, o Tobias Gl=C3=A4=C3=9Fer escre= veu: > Am Fr, den 02.01.2004 schrieb Bill Kendrick um 16:04: > > On Fri, Jan 02, 2004 at 06:04:51PM -0500, Tobias Gl=C3=A4=C3=9Fer wrote: > > > One possibility is to check if the "rectangle" of an object hits the > > > "rectangle" of another object, like we currently do, but I don't like > > > this method, because it isn't very precise. On the other hand it's > > > relativly fast. > > > > I almost always stick to 'bounding box' (what you described above) > > because it's fast, simple to program, and for most fast action games > > it's "close enough." > > > > The trick is to give the player a slight advantage. (e.g., their > > bullet can hit just outside the enemy's x,y/w,h range, but the > > enemy's bullet actually has to be a little INSIDE the player's rectangl= e, > > otherwise it's ignored) > > > > Super Tux is a fast action game, but can go slowly (e.g., the player > > can walk around a little to try to make a precise hit, or just be > > standing there when a bad guy aimlessly bumps into Tux), so it MIGHT > > be worth doing more precise collision detection. > > > > I think, though, that so far the bounding box method has done well > > in Super Tux, so I would much rather we worry about adding gameplay > > elements (more enemies, more kinds of objects to deal with, and > > more levels and level art). If we REALLY need to fix the mechanics, > > we can do it later. :^) > > > > The biggest complaint in the 3 years since I first released Super Tux > > was that there was only one level and few enemies. :^) Not that > > Tux didn't collide with laptops 'precisely' ;^) > > > > > > > > -bill! > > > > PS - FYI, I recently had to do line-intersection for collision detection > > for a vector-drawn game I'm prototyping for my new job... :^) > > I first do bounding-box to decide whether I need to BOTHER with the > > slow line-related math, of course. Keep this trick in mind!! > > I'm trying my luck with bitmask-collisions, but first doing bounding-box > tests is obviously. > > My aim with this rewrite is to make it very is easy to add funky new > enemies and items. I'm sure that's a better way of doing something in > the long run, than to add more code to already bloated code. > > Greetz... > > Tobias Gl=C3=A4=C3=9Fer > > > =2D-=20 It's time to boot, do your boot ROMs know where your disk controllers are? |