A quick fix for the game monsterz on amd64 systems
The game monsterz is a fun distraction, much better then games that come with other operating systems in my opinion. Unfortunately I noticed that the amd64 version was broken in Ubuntu 7.04 (Feisty Fawn). I decided to check to see if it had been fixed in Ubuntu 7.10 (Gutsy Gibbon) but found that it had not. However I was able to find a quick fix that allows the game to be played. Here’s what I did.
So when running the game from a terminal by typing monsterz I was greeted with this (emphasis added):
/usr/share/games/monsterz/monsterz.py: could not open data from `/usr/share/games/monsterz'.
Traceback (most recent call last):
File "/usr/share/games/monsterz/monsterz.py", line 1984, in
main()
File "/usr/share/games/monsterz/monsterz.py", line 1973, in main
data = Data(sharedir)
File "/usr/share/games/monsterz/monsterz.py", line 322, in __init__
semi_grayscale(self.shaded[i])
File "/usr/share/games/monsterz/monsterz.py", line 112, in semi_grayscale
p[:] = (val + r) / 2, (val + g) / 2, (val + b) / 2
ValueError: matrices are not aligned for copy
I thought of spending time trying to actually get the code to work but what I wanted to see is whether a quick fix could work so I commented out line 112 of /usr/share/games/monsterz/monsterz.py and ran monsterz again and saw this (emphasis added):
/usr/share/games/monsterz/monsterz.py: could not open data from `/usr/share/games/monsterz'.
Traceback (most recent call last):
File "/usr/share/games/monsterz/monsterz.py", line 1984, in
main()
File "/usr/share/games/monsterz/monsterz.py", line 1973, in main
data = Data(sharedir)
File "/usr/share/games/monsterz/monsterz.py", line 339, in __init__
semi_transp(self.shadeye)
File "/usr/share/games/monsterz/monsterz.py", line 133, in semi_transp
p[:] = (m + r) / 2, (m + g) / 2, (m + b) / 2
ValueError: matrices are not aligned for copy
So that indicates progress that it was no longer exiting at the same place and instead having a similar error on a similar piece of code. So I commented out line 133 of /usr/share/games/monsterz/monsterz.py and tried again.
And this time the game loaded and was playable though with the grayscale and transparent effects disabled. Still I didn’t find that had any impact on the gameplay.
So in conclusion:
- change line 112 of
/usr/share/games/monsterz/monsterz.py- before:
p[:] = (val + r) / 2, (val + g) / 2, (val + b) / 2 - after:
# p[:] = (val + r) / 2, (val + g) / 2, (val + b) / 2
- before:
- change line 133 of
/usr/share/games/monsterz/monsterz.py- before:
p[:] = (m + r) / 2, (m + g) / 2, (m + b) / 2 - after:
# p[:] = (m + r) / 2, (m + g) / 2, (m + b) / 2
- before:
- Enjoy.




Recent comments
8 weeks 4 days ago
12 weeks 1 day ago
13 weeks 6 days ago
14 weeks 2 days ago
17 weeks 3 days ago
22 weeks 1 day ago
27 weeks 16 hours ago
30 weeks 5 days ago
36 weeks 1 day ago
37 weeks 5 days ago