Starting a new game does not reuse objects.

Bug #518340 reported by Daniel Bell
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Hopper
Fix Committed
Critical
Daniel Bell

Bug Description

After loosing all life and the game over screen is presented to the user there is an option to: "Start a new game". When you start a new game it creates a whole new set of objects into memory instead of reusing the ones that were created in the previous game.

This in itself is not a huge issue when you are only playing 1-2 games (yet its unnecessary), but when you get into larger series of games (20-30 "new games") then there are serious issues with memory being used up.

Tags: regression
Daniel Bell (danielbell)
Changed in frogger:
importance: Undecided → Critical
status: New → Triaged
Daniel Bell (danielbell)
summary: - Starting a new game creates does not reuse objects.
+ Starting a new game does not reuse objects.
Daniel Bell (danielbell)
Changed in frogger:
assignee: nobody → Daniel Bell (danielbell)
milestone: none → 0.3
security vulnerability: yes → no
Revision history for this message
Daniel Bell (danielbell) wrote :

Hopper as of r51 should now properly re-use objects when possible.
Game now should have less loose references and less cycles where references could be tied up, thus making the collecter able to dump objects properly that are no longer used. This should hopefully fix the issues within the game, memory wise.

Changed in hopper:
status: Triaged → Fix Committed
Daniel Bell (danielbell)
visibility: private → public
Revision history for this message
Daniel Bell (danielbell) wrote :

r55 introduced a regression where the game no longer reuses objects, inorder to fix the issue where difficulty was not being updated.

Changed in hopper:
status: Fix Committed → In Progress
tags: added: regression
Revision history for this message
Daniel Bell (danielbell) wrote :

r56 fixes this, it uses a dirty hack to bypass the problem where difficulty was not updated since the class was already instantiated and with difficulty being set in the constructor meant that the difficulty changes were not reflected in the class.

This now allows you to change difficulty within the play_levels() function, via an optional paramater. This paramater when not Nothing will change difficulty within the instantiated class, removing need to recreate it. Only problem here is that its an ugly hack, where since difficulty is only speed we can get away with.

Changed in hopper:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.