GPL’d VROOM!!! for Linux

programming, python, game development, vroom — January 16, 2007 at 2:06 pm

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.

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:

For SDL_mixer-1.2.7 you’ll need these:

Enjoy.


6 Comments

  1. 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

    Comment by Richard Jones — January 17, 2007 @ 1:21 am
  2. 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()

    Comment by Richard Jones — January 17, 2007 @ 1:31 am
  3. 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.

    Comment by S. Monkey — January 17, 2007 @ 3:33 am
  4. 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

    Comment by T.D. Houfek — January 24, 2007 @ 9:05 pm
  5. 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.

    Comment by S. Monkey — January 25, 2007 @ 11:13 am
  6. Red

    OMG! I cant beleive it.

    Trackback by Red — July 23, 2007 @ 11:56 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.5 License. | The Stoic Monkey