HI John, I'm not referring to a specific situation but I will say that Phil 
brings up a great point.

My point though is that since I cannot predict what I might want later on, it 
is a very good practice to keep your code modular.

YOu want to know exactly what you are calling at any given time and exactly 
what it is causing to happen. As your game grows, you will find that this is 
becoming more and more important for you. The idea that you always know what 
code is doing what, is a very good idea to keep in mind.

Make sense?…

Thanks,

Cara :)
---
View my Online Portfolio at:

http://www.onemodelplace.com/CaraQuinn

Follow me on Twitter!

https://twitter.com/ModelCara

On Aug 18, 2013, at 1:35 PM, john <[email protected]> wrote:

I'm not sure I follow you here. What type of a situation are you referencing? 
Even if I wanted to teleport the player, I wouldn't want to teleport them into 
a wall.

----- Original Message -----
From: Cara Quinn <[email protected]
To: Gamers Discussion list <[email protected]
Date sent: Sun, 18 Aug 2013 13:14:27 -0700
Subject: Re: [Audyssey] looking for programmingadvice:cyntaxdifferencebetween 
bgt and java

Hi again John,

Just as a follow-up to my own note here, I thought I'd add that I personally 
prefer not to have collision detection called from within any movement code.

I think it's good practice to have your methods only doing what they say they 
will. I.E. movement only moves. Collision detection only detects collisions.

this way if you want to move your player for some other reason than a 
traditional game movement, you can always call your player's movement methods 
and not need to worry about some other method getting called somewhere to get 
in the way of what you'd like to do. Does this make sense?

Your collision detection method can either report back which objects collided, 
or simply call the appropriate methods on those objects that collided with each 
other.

For example, if two objects collide, then call the touch methods on each of 
those objects. That way each object will do what it is supposed to when it is 
touched by another object.

Hope this helps!

Have a great day!

Cara :)---
View my Online Portfolio at:

http://www.onemodelplace.com/CaraQuinn

Follow me on Twitter!

https://twitter.com/ModelCara

---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].


---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to