# Homing Missile with Loose Coupling

**URL:** <https://forum.kirupa.com/t/homing-missile-with-loose-coupling/299327>\
**Category:** flash\
**Created:** [November 3, 2009, 2:57pm UTC](https://forum.kirupa.com/t/homing-missile-with-loose-coupling/299327 "2009-11-03T14:57:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alpha\_Remex](https://avatars.discourse-cdn.com/v4/letter/a/779978/32.png) [@Alpha\_Remex](https://forum.kirupa.com/u/Alpha_Remex)\
**Post date:** [November 3, 2009, 2:57pm UTC](https://forum.kirupa.com/t/homing-missile-with-loose-coupling/299327/1 "2009-11-03T14:57:29Z")

</div>

So I am creating a side scrolling Gradius-esque game using OOP techniques. I’ve got a pretty good set up so far: I have a CollisionManager class that tracks all enemies, bullets, and the “hero”… it dispatches an event when a collision occurs so that each object can independently handle animations and status changes without having to be tightly coupled with other classes.

The problem I am running into is the issue of bullet behavior. I have different types of bullets (i.e., blaster, missiles, etc). And I want to give the missiles a homing effect without giving it a reference to it’s target object which would mean that the bullet would always have to be aware of where the target is.

Instead, I would guess that the path to loose coupling would take me to an MVC type design with a Controller determining the behavior of the bullet.

Am I over-thinking this here? I wanted to throw out my conceptual dilemma to see if anyone has an easy design solution…

Let me know what you think.  
AR
