🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.oop.macapp3
Article #308

How can I detect overlapping Views??

#308
From: pdsaffer
Date: Fri, 22 Jan 1993 17:27
34 lines
1675 bytes
Hi,

    I'm working on an annimation application. In the main content view
of my scenario window I want to have several cast members that move
arround the screen. I need to detect collisions between these actors.
I wonder if the best solution would be to draw each of them on an independent 
subview of the main content part of my window? 
If this is so, could someone tell me if:

[1] MacApp makes it possible to change from the program
    the relative position of a view from its superView using?

[2] Can I detect from my program if two views are just about to start
    overlapping (they share an edge or a corner)?

    My application is very similar to a video-game. When you shoot a
space invader the program must somehow detect if the bullet has hit the
martian. How would the authors of "Space Invaders" have implemented this 
feature using MacApp?

				Thanks in advance,

					Paul.

P.S. Please kindly send your answers to: 

	pdsaffer@malloco.ing.puc.cl 

------------------------------------------------
Pontificia Universidad Catolica de Chile
Escuela de Ingenieria
Departamento de Ciencia de la Computacion
Centro de Informatica Educativa
------------------------------------------------
Technical Details
Message-ID: <1993Jan22.172744.1476@tolten.puc.cl>
Path: arc1-ca.pugleaf.net!sparky!uunet!puc.cl!pdsaffer

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.mac.oop.macapp3
Path: arc1-ca.pugleaf.net!sparky!uunet!puc.cl!pdsaffer
From: pdsaffer@ing.puc.cl (pdsaffer)
Subject: How can I detect overlapping Views??
Message-ID: <1993Jan22.172744.1476@tolten.puc.cl>
Sender: news@tolten.puc.cl (News Manager)
Nntp-Posting-Host: malloco.ing.puc.cl
Organization: Pontificia Universidad Catolica de Chile
X-Newsreader: TIN [version 1.1 PL8]
Date: Fri, 22 Jan 1993 17:27:44 GMT
Lines: 34