36% DNW! Aaah!
Bottom half of the table. I am crushed :-)I should be happy though, because the main reason I do pyweek is to test and debug my game graphics library. So I suppose I have some work to do...
The other comments about camera position and steering were, sadly, completely fair :-(
(log in to comment)
Try replacing GL.GL_RGBA8 in the second parameter with just 4.
Is it possible the texture image is not loading correctly? The spec says Invalid Value is the error for
width or height being less than 1. Maybe add:
Oh, and if you know which version of OpenGL and GLU you have, that would help too.
Thanks
(bjorn: I'm not suggesting your graphics card is crap, it's probably something else. But if you're still mildly interested in playing the game, you could try with the --snow option, which disables most textures entirely, or try replacing the larger textures with scaled-down versions).
Other than that, I'm out of ideas until I can replicate the problem somehow.
In case it's a texture size thing, I've scaled some of the textures down a bit,
but the title banner image is still quite large, (and that's shown even with
--snow on).
I think I'm going to have to catch errors, print a warning, and carry on with a null texture in cases where it goes wrong inexplicably like that. :(
Anyway, hope the game compensates you for all your effort with a few minutes of fun at least.
Comments
$ python run_game.py
Traceback (most recent call last):
File "run_game.py", line 15, in
main.main()
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/main.py", line 54, in main
choice = gamescreens.run_title_screen()
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/gamescreens.py", line 829, in run_title_screen
t = TitleScreen()
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/gamescreens.py", line 158, in __init__
skyball=sky.SkyBall('sky')
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/sky.py", line 23, in __init__
super(SkyBall,self).__init__(name,**kwd)
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/tdlib/backdrop.py", line 45, in __init__
super(TextureBackdrop,self).__init__(name,**kwd)
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/tdlib/backdrop.py", line 26, in __init__
self.restyle()
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/tdlib/part.py", line 78, in restyle
self.prepare()
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/sky.py", line 31, in prepare
self.tex = texture.get_texture(filepath(texname))
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/tdlib/texture.py", line 62, in get_texture
tex = Texture(filename)
File "/home/bjorn/Desktop/pyweek/vracers-1.0/lib/tdlib/texture.py", line 45, in __init__
img_data)
OpenGL.GLU.GLUerror: [Errno 100901] invalid value
gluBuild2DMipmaps(GL.GL_TEXTURE_2D, GL.GL_RGBA8, width, height, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, img_data)
The error is 'invalid value'. So one of the parameters is maybe not valid for your version of OpenGL?
But I can't tell which without knowing more.
assert width >= 1 and height >=1
on the line before, and see if the assert fails before the GLU call.
I don't know if that is my graphics card(I have an older - 5years - laptop, which is kinda funky ;) ) or what, but I know this happens.
The workaround I used is to use pygame to scale the image to a power of 2 before sending it to Opengl, basically you have a function like this:
def get_correct_dimensions(image):
oldx, oldy=image.get_size()
newx=newy=2
while newx <= oldx:
newx*=2
while newy <= oldy:
newy*=2
return newx, newy
I'm still not sure if that is correct, but it sounds like the same problem, so I thought I'd let you know :)
python-opengl 2.0.1.09.dfsg.1-0.3
libgl1-mesa-glx 6.5.2-3
using the --snow option didn't help. I've got a bit of time this evening so I'll look into it a little; unfortunately I'm not experienced w/ opengl.
svn co https://tdelusion.svn.sourceforge.net/svnroot/tdelusion/trunk tdelusion
The game is in vracers (the graphics library is in tdgl; there should be a symlink
from vracers/lib/tdgl there if I've done it properly)
File "/home/bjorn/source/tdelusion/vracers/lib/tdgl/texture.py", line 45, in __init__
img_data)
OpenGL.GLU.GLUerror: [Errno 100901] invalid value
with either version, if I run it with --snow it crashes here:
bjorn@berserker:~/source/tdelusion/vracers$ python2.4 run_game.py --snow
Traceback (most recent call last):
File "run_game.py", line 14, in ?
main.main()
File "/home/bjorn/source/tdelusion/vracers/lib/main.py", line 47, in main
materials.NOTEXTURES = True
not sure if that sheds any insight, or how to debug this further. Seems likely there may be a bug in the 64 bit python opengl stuff on my system though.
scav on 2007/09/23 11:16:
Added a fixed version of vortex racers, so those who couldn't run it during judging might now be able to dislike it on its own merits. :)