GPL’d VROOM!!! for Linux
By popular demand I released a pared down version of VROOM for Linux under the GPL so people can study and modify it. The internet scores part has been stripped out because that would make it way too easy to cheat. I’ve been meaning to enhance it to use a fixed time step as described here. If someone succeeds at this before I get around to it please let me know.
- Download vroomDemo.tar.gz (for i686 GNU/Linux)
This version includes a new feature. The engine sound revs much more smoothly. I made a couple of tweaks to the SDL_mixer and Pygame code to make this work. I’ll try to cover the details soon.
To run, you’ll need to set an environment variable so Pygame will pick up the new SDL_mixer library:
% tar -xzvf vroomDemo.tar.gz % cd vroomDemo % setenv LD_LIBRARY_PATH ./sdl_mixer % python vroomDemo.py
If the setenv LD_LIBRARY_PATH trick doesn’t solve the “undefined symbol” error, you can try patching, compiling, and installing SDL_mixer. Here are the patch files for SDL_mixer-1.2.4:
- mixer.c.diff (v1.2.4)
- SDL_mixer.h.diff (v1.2.4)
For SDL_mixer-1.2.7 you’ll need these:
- mixer.c.diff (v1.2.7)
- SDL_mixer.h.diff (v1.2.7)
Enjoy.
6 Comments
RSS feed for comments on this post. TrackBack URI
Sorry, it breaks under Ubuntu: [Thanks for pointing this out. This has been fixed.]
vroomDemo.py:537: RuntimeWarning: use mixer: /tmp/vroomDemo/pygame/mixer.so: undefined symbol: Mix_QueueChannel
pygame.mixer.pre_init(22050,-16,1,512)
Traceback (most recent call last):
File “vroomDemo.py”, line 605, in ?
mso = error.errOut()
File “/tmp/vroomDemo/error.py”, line 27, in __init__
self.font = pygame.font.Font(”freesansbold.ttf”, ptsize)
pygame.error: font not initialized
BTW the pygame clock will tell you elapsed time. You ask it to set a frame rate and you get the delta t back (for example, 30FPS:
clock = pygame.clock.Clock()
dt = clock.tick(30)
The dt value is the milliseconds since the last call to clock.tick()
Richard,
Thanks for trying it out. Looks like I forgot that the new SDL_mixer symbol isn’t in pygame. I updated the package to include the SDL_mixer library. Please see the updated directions on how to run.
Breaks on my Debian system, looks like the same issue as was on Ubuntu:
vroomDemo.py:537: RuntimeWarning: use mixer: /usr/local/games/vroomDemo/pygame/mixer.so: undefined symbol: Mix_QueueChannel
pygame.mixer.pre_init(22050,-16,1,512)
Traceback (most recent call last):
File “vroomDemo.py”, line 605, in ?
mso = error.errOut()
File “/usr/local/games/vroomDemo/error.py”, line 27, in __init__
self.font = pygame.font.Font(”freesansbold.ttf”, ptsize)
pygame.error: font not initialized
T.D., I updated the instructions with patch files to SDL_mixer. I hope this helps.
If anyone can help make an RPM for this please let me know.
Red
OMG! I cant beleive it.