🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #1004

Re: Software Pinball Machine

#1004
From: Si Owen
Date: Thu, 05 Nov 1992 12:54
49 lines
2719 bytes
>In article <1992Nov2.204624.24267@u.washington.edu> goble@hardy.u.washington.edu (Brian Goble) writes:
>
>I have programmed many arcade style games but never anything like a
>pinball machine.  It seems very challenging and I am interested in hearing
>what others have done or how they might go about it.
>
>Email or post...thanx!
>
>-Brian

 I've not actually put this into practice, but it's something i remember
 reading in a computer mag somewhere regarding collision detection with walls.
 The ball sprite was an odd number of pixels so it had a proper centre. The
 collision detection data consisted of equations of lines linking the boundries
 of solid areas, and a collision was detected when the CENTRE of the ball lay
 ON one of the lines (or passed through into a 'solid' area). At first thought
 this sounds like the ball will be half way into the wall before the collision
 is detected. BUT the tables are set up with an outline equal to the ball
 radius added to them. ie:


       X   |                              Where:  C is call centre touching
       X   |                                        collision detection line.
       X   |
       X   |              
       X    \                                     
        X    \              
         X    \            _____  Ball
          X    \          /     \
           X    \_________(__C__)___________  Collision detection line.
            X             \     /
             X             \___/
              XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX  Wall shown on screen.

 It seems to make it quite easy to check all around for collisions will walls.
 Most of the time is spent wading through tables of line data, making checks
 for contact with the ball.
 Curved surfaces are obviously made with short lines with a slight change in
 angle, the penalty for a higher resolution curves is just more lines to
 check!! There is probably an optimum number of lines for a realistic curve.
 If someone tries (or has tried) this method, maybe they'd like to share it
 with us.

 Hope you understood this!

 Si

 S.N.Owen@newcastle.ac.uk
Technical Details
Message-ID: <Bx8uIv.IJ4@newcastle.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!agate!doc.ic.ac.uk!uknet!newcastle.ac.uk!newton!n031r
References: <1992Nov2.204624.24267@u.washington.edu> <18899@ucdavis.ucdavis.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!sdd.hp.com!zaphod.mps.ohio-state.edu!caen!spool.mu.edu!agate!doc.ic.ac.uk!uknet!newcastle.ac.uk!newton!n031r
From: S.N.Owen@newcastle.ac.uk (Si Owen)
Newsgroups: rec.games.programmer
Subject: Re: Software Pinball Machine
Keywords: pinball
Message-ID: <Bx8uIv.IJ4@newcastle.ac.uk>
Date: 5 Nov 92 12:54:30 GMT
References: <1992Nov2.204624.24267@u.washington.edu> <18899@ucdavis.ucdavis.edu>
Organization: Computing Laboratory, U of Newcastle upon Tyne, UK NE1 7RU.
Lines: 49
Nntp-Posting-Host: newton