~hopper-devs/hopper/legacy

Viewing all changes in revision 56.

  • Committer: Daniel Bell
  • Date: 2010-04-01 21:26:51 UTC
  • Revision ID: daniel.bell@saraclan.com-20100401212651-98b93ccyw2b00078
Made a few changes to how I check and set difficulty in levels.py to bypass the regression in memory usage.

You can now set difficulty in play.level() and sending through difficulty as an optional variable. When it gets that, it will set self.difficulty to that value and then set self.speed to its according value based upon the self.difficulty.

Problem here is that this is a dirty hack. If we want to change how we implement difficulty in other ways than speed, then we can't really do it that way, as obhects might already be created, such as cars or logs that we can't really remove or add too, based upon the previous setting very well.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: