Jumping between towers
I got a lot of things working today, but the game doesn't look that different. The main new mechanic is jumping between adjacent towers, which you do by simply getting close enough and running in that direction. The main skill you'll have to acquire is getting the towers to sway enough to get close enough.Behind the scenes, I got fast model loading accomplished using the lessons learned from my warmup demos, and I got some text to appear on the screen, which I've never done in OpenGL before. It doesn't seem to hurt the framerate much.
I still haven't decided what the protagonist will be, so for now you control an enemy, a castle guard.
Teetering Towers 2 (2.2 MB)
Controls:
Mouse: move camera
Scroll wheel: zoom camera
Arrow keys: run
Esc: quit
(log in to comment)
Comments
Windows
I had the same trouble. Thanks, claxo, for the workaround.
I got up to about 208fps, but it seemed to hover closer to 190 most of the time. When I had a bunch of other apps open I was seeing around 180fps. The sway numbers are nice; they help me optimize my running.
On my native linux machine
(finally got it updated) the game played fine except I could not read any of the text. Just a few of the horizontal lines were there, so it was illegible.
linux in VirtualBox
Game played well, except I still had crazy behavior based on mousemotion. I tweeked those same lines again (which you moved to camera.py) until I could play it. The graphics and text looked fine. I got 28fps, but it was about the same response as with windows.
All of my platforms have trouble when I quit the game. I have just been killing the processes after I quit.
I had the same trouble. Thanks, claxo, for the workaround.
I got up to about 208fps, but it seemed to hover closer to 190 most of the time. When I had a bunch of other apps open I was seeing around 180fps. The sway numbers are nice; they help me optimize my running.
On my native linux machine
(finally got it updated) the game played fine except I could not read any of the text. Just a few of the horizontal lines were there, so it was illegible.
linux in VirtualBox
Game played well, except I still had crazy behavior based on mousemotion. I tweeked those same lines again (which you moved to camera.py) until I could play it. The graphics and text looked fine. I got 28fps, but it was about the same response as with windows.
All of my platforms have trouble when I quit the game. I have just been killing the processes after I quit.
claxo on 2010/04/01 05:54:
At first it crashed, made some adjustments and then succeedin windows xp, pyOpenGL 3.0.1 (the latest released in sourceforge), at the start crashes with:
D:\tmp\_pyweek10_previa\teetering-towers-2\teetering-tower-2>run_game.py
Traceback (most recent call last):
File "D:\tmp\_pyweek10_previa\teetering-towers-2\teetering-tower-2\run_game.py
", line 268, in <module>
tower.render()
File "D:\tmp\_pyweek10_previa\teetering-towers-2\teetering-tower-2\run_game.py
", line 116, in render
glutBitmapString(GLUT_BITMAP_HELVETICA_18, "%.1f" % r)
File "C:\Python26\lib\site-packages\OpenGL\platform\baseplatform.py", line 336
, in __call__
self.__name__, self.__name__,
OpenGL.error.NullFunctionError: Attempt to call an undefined function glutBitmap
String, check for bool(glutBitmapString) before calling
Workaround:
seems that glutBitmapString is not available in the standard glut32.dll shipped in the win binaries for pyOpenGL
greping the pyOpenGL sources with the func name suggested that freeglut was needed
got freeglut (I choosed the MSVC version) from
http://www.transmissionzero.co.uk/software/freeglut-devel/
copied freeglut.dll to site-packages\OpenGL\DLLS
renamed to glut32.dll
in %windir%\system32 rename glut32.dll to something else
Done, it runs (and the text shows)