Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


#ActualStarnick

Posted 10 September 2013 - 06:36 PM

The IAdd interface to me is kind of weird, you're modeling a behavior (imo a good thing when it comes to interfaces), but it feels like two of the same behaviors...one as an abstract class and the other as an interface (Step vs moveXUnit), which basically are two differently named ways of doing the same exact thing. To me, if you want to define behaviors like "Move along X axis", "Move along y axis", "Move along x/y", those would be individual interfaces that something like Movement would implement. In that case, what would "Step" mean? Just feels redundant and muddying behavior.

 

Simple example granted, but defining behaviors like that in this way is kind of restricting in my opinion too. You may be able to skip, run, and hop, but that's the manner of how you do it (e.g. speed and other influences like hopping up and down), those behaviors don't need to care where you're moving. So Movement to me sounds like it should model how you're moving, and it gets used by, or itself operates on another object (interface) that models where you're moving.


#3Starnick

Posted 10 September 2013 - 06:36 PM

The IAdd interface to me is kind of weird, you're modeling a behavior (imo a good thing when it comes to interfaces), but it feels like two of the same behaviors...one as an abstract class and the other as an interface (Step vs moveXUnit), which basically are two differently named ways of doing the same exact thing. To me, if you want to define behaviors like "Move along X axis", "Move along y axis", "Move along x/y", those would be individual interfaces that something like Movement would implement. In that case, what would would "Step" mean? Just feels redundant and muddying behavior.

 

Simple example granted, but defining behaviors like that in this way is kind of restricting in my opinion too. You may be able to skip, run, and hop, but that's the manner of how you do it (e.g. speed and other influences like hopping up and down), those behaviors don't need to care where you're moving. So Movement to me sounds like it should model how you're moving, and it gets used by, or itself operates on another object (interface) that models where you're moving.


#2Starnick

Posted 10 September 2013 - 06:35 PM

The IAdd interface to me is kind of weird, you're modeling a behavior (imo a good thing when it comes to interfaces), but it feels like two of the same behaviors...one as an abstract class and the other as an interface (Step vs moveXUnit), which basically are two differently named ways of doing the same exact thing. To me, if you want to define behaviors like "Move along X axis", "Move along y axis", "Move along x/y", those would be individual interfaces that something like Movement would implement. In that case, when then would "Step" mean? Just feels redundant and muddying behavior.

 

Simple example granted, but defining behaviors like that in this way is kind of restricting in my opinion too. You may be able to skip, run, and hop, but that's the manner of how you do it (e.g. speed and other influences like hopping up and down), those behaviors don't need to care where you're moving. So Movement to me sounds like it should model how you're moving, and it gets used by, or itself operates on another object (interface) that models where you're moving.


#1Starnick

Posted 10 September 2013 - 06:34 PM

The IAdd interface to me is kind of weird, you're modeling a behavior (imo a good thing when it comes to interfaces), but it feels like two of the same behaviors...one as an abstract class and the other as an interface (Step vs moveXUnit), which basically are two differently named ways of doing the same exact thing. To me, if you want to define behaviors like "Move along X axis", "Move along y axis", "Move along x/y", those would be individual interfaces that something like Movement would implement. In that case, when then would "Step" mean? Just feels redundant and muddying behavior.

 

Simple example granted, but defining behaviors like that in this way is kind of restricting in my opinion too. You may be able to skip, run, and hop, but that's the manner of how you do it (e.g. speed and other influences like hopping up and down), those behaviors don't need care where you're moving. So Movement to me sounds like it should model how you're moving, and it gets used by, or itself operates on another object (interface) that models where you're moving.


PARTNERS