Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualCornstalks

Posted 30 November 2012 - 01:48 AM

This isn't necessarily directly applicable to your case (right now, at least), but I think thinking about Antiobjects more can be very useful and constructive to good design. For example, I once made a game where there were hundreds of units doing pathfinding on a decently sized map. The "normal" OOP methodology would be to make each unit an Object of some sort and give it the ability to find a path given some information (like a game board of tiles), or make some helper class that, given a unit and a board, finds the path. Or something like that. After reading (part of) that paper, I instead made the tiles of the game board Objects and the tiles did the pathfinding, and the overall interface and design was greatly simplified after doing that.

Anyway, I just want to point out that when considering how do design your objects and relationships, sometimes the "better" solutions require you to think outside the box, where an Object (and its role) isn't the obvious.

#1Cornstalks

Posted 30 November 2012 - 01:46 AM

This isn't necessarily directly applicable to your case (right now, at least), but I think thinking about Antiobjects more can be very useful and constructive to good design. For example, I once made a game where there were hundreds of units doing pathfinding on a decently sized map. The "normal" OOP methodology would be to make each unit an Object of some sort and give it the ability to find a path given some information (like a game board of tiles), or something like that. After reading (part of) that paper, I instead made the tiles of the game board Objects and the tiles did the pathfinding, and the overall interface and design was greatly simplified after doing that.

Anyway, I just want to point out that when considering how do design your objects and relationships, sometimes the "better" solutions require you to think outside the box, where an Object (and its role) isn't the obvious.

PARTNERS