delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/02/19/16:51:16

Message-Id: <199802192147.OAA13214@mail.enol.com>
From: "Mark Crowder" <mlcrowd AT mail DOT enol DOT com>
To: djgpp AT delorie DOT com
Date: Thu, 19 Feb 1998 15:03:47 +0000
MIME-Version: 1.0
Subject: Worms and game physics
Reply-to: mlcrowd AT enol DOT com

Hi,

  I just have a few questions in regards to Worms-style games (most 
are fairly similar):

  1.  Does anybody know where I can find a wind equation?  I.e. an
  equation to calculate the forces applied through wind to a
  projectile.

  2.  For those of you who have played Worms, you've most likely
  noticed that when the explosions go off, any worms that are within a
  certain radius of the explosion go flying off in all directions. 
  Anybody know where I can find the formula for that?

  3.  Yes, another equation question :).  What about the projectiles?
  When I was writing my Space War game a few years ago I came upon the
  sin()/cos() formula for rotating a point, which can also be used to
  calculate velocity.  Would I just use that formula in conjunction
  with the downward (or upward ;) ) pull of gravity?

  4.  Landscapes.  Is it efficient enough to hold the entire 
  landscape as a big bitmap?  The only alternative that I've thought
  of so far would be tiles, but that would complicate the terrain
  generation a lot.  

  5.  Collision detection.  For one, would it be fast enough to 
  bitwise AND the bitmap of the worm (or whatever it is) together with
  the terrain?  Also, if it would be worth it, how exactly would you
  do that?  I guess you'd have to shift the bitmap around to match up
  with the position in relation to the terrain, right?

  6.  Would it be reasonable to split up my palette into a few 
  different areas (i.e. 0-32 for worms, 33-192 for terrain, 193-255
  for sky)?

  7.  Are there any tutorials on game physics (i.e. the equations
  described above) available on the Internet?

  Also, on a side note, are the Allegro 3-D functions sufficient for a
simple 3-D wireframe flight simulator (i.e. Netwars, for those of you
who've played it)?

Thanks in advance!
Ben <mlcrowd AT enol DOT com>
The only place success comes before work is in the dictionary

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019