Hi, Maybe, for the sake of example, since it's a football game, the announcer knows where everyone is. <grin> Jim Jim Homme, Usability Services, Phone: 412-544-1810. Skype: jim.homme Internal recipients, Read my accessibility blog. Discuss accessibility here. Accessibility Wiki: Breaking news and accessibility advice -----Original Message----- From: programmingblind-bounce@xxxxxxxxxxxxx [mailto:programmingblind-bounce@xxxxxxxxxxxxx] On Behalf Of Tyler Littlefield Sent: Monday, September 27, 2010 2:25 PM To: programmingblind@xxxxxxxxxxxxx Subject: Re: Object Orientation And Game Programming Question -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello Jim, It depends on what is going on. If you want to call something on the field that will report say the position of all players, the field could: 1) Know where every player is. 2) Query a list of players for their positions. If the player needs to know where the player is, and your logic for movement is stored within the player: 1) The player should know where the player is, with a possible reference to the field. It really depends on how your laying things out, though. Maybe you want to coordenate team movement, in which case the team might have a list of player positions to find decent movement, or the team might query the field. One thing you will want to consider: When you get to serious game programming, sometimes it is better to store a reference to something (or have a pointer or something that points to the player's coordenates) so that everything doesn't have to be updated. The player will move, it's coords will be changed and since everything stores a reference to it besides the player, everything that uses it can query it. This doesn't mean that the player's coords should be stored on everything, but only some things where accessive lookups to the player's coordenates might slow things down. On 9/27/2010 11:07 AM, Homme, James wrote: > Hi, > This is just Jim trying to come to grips with Object Orientation again. > > As a simple example, let's say that we are making a program that plays > American football. Let's further say that we are working with one player who > is on the field. Should we allow the field to know where the player is on the > field, or should we allow the player to know where the player is on the > field? How do we determine the answer? > > Thanks. > > Jim > > Jim Homme, > Usability Services, > Phone: 412-544-1810. Skype: jim.homme > Internal recipients, Read my accessibility > blog<http://mysites.highmark.com/personal/lidikki/Blog/default.aspx>. Discuss > accessibility > here<http://collaborate.highmark.com/COP/technical/accessibility/default.aspx>. > Accessibility Wiki: Breaking news and accessibility > advice<http://collaborate.highmark.com/COP/technical/accessibility/Accessibility%20Wiki/Forms/AllPages.aspx> > > > ________________________________ > This e-mail and any attachments to it are confidential and are intended > solely for use of the individual or entity to whom they are addressed. If you > have received this e-mail in error, please notify the sender immediately and > then delete it. If you are not the intended recipient, you must not keep, > use, disclose, copy or distribute this e-mail without the author's prior > permission. The views expressed in this e-mail message do not necessarily > represent the views of Highmark Inc., its subsidiaries, or affiliates. > - -- Thanks, Tyler Littlefield -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJMoOGGAAoJELDPyrppriJPO6wH/jkRRthnXhytMnPhw6giDxWi soRxD8AwlsObWIwpY2Ig6vzI2HvNA/YN3FaddTK6eUO7vpJoHk4leE7aScsJDGna 7OEZce9fC37Wndh6MZU7CQNjlbz3qxfk2b4pAGems+0pScvclPwmWKBve/prjKwD QPTKbUXkQxLfKbz+NkgenIIrHEFPJRXXgDWUJ9oyZQPZRN4A/+MsLZn20hMtNCxT 38ZYf5sZhjAS80Bil2QSqyfzDW0Cj8RQcV3b69tGiyS/1wMJTEIzPdarlRcAoMFX pmTc+lVokKDKBzzUgAkWTvBOAjN8F24Yvg/eMhZ0dcFIjBdeIreQCzx6YXyBtKA= =EWLv -----END PGP SIGNATURE----- __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind __________ View the list's information and change your settings at //www.freelists.org/list/programmingblind