Edging dangerously close to gameplay

Well, because it's a video game I added shooting. And other player controls. I'm still not sure what the point of the game is yet... there's certainly nothing to shoot at. I'm not even sure there should be.

Give it a shot if you like: stalk-1.zip

(log in to comment)

Comments

    _dll = SDL_DLL('SDL', 'SDL_Linked_Version')
  File "C:\Users\olof.bjarnason.UNIVERSUM\Desktop\stalk-1\cocos\audio\SDL\dll.py", line 54, in __init__
    _platform_library_name(library_name)
ImportError: Dynamic library "SDL" was not found
Ugh. Why cocos had to include an SDL dependency is beyond me. I'll look at removing it.
Please try editing cocos/audio/__init__.py to add a try/except around the import:


try:
    import pygame.mixer
except ImportError:
    pass
There seem to be more dependencies:

Desktop\stalk-1\cocos\audio\SDL\dll.py", line 54, in __init__
    _platform_library_name(library_name)
ImportError: Dynamic library "SDL" was not found
( I did add the try: catch: in the file you mentioned, but got more errors. )
pygame is require sdl library. so you need to install it or recompile the pygame.
If you don't want the library dependencies. you can use pyglet for your game engine.
I don't know what you're up to, but it seems I'll like it. =)
A better workaround (you get by default pyglet audio, no need for SDL)

svn diff director.py

Index: director.py
===================================================================
--- director.py (revisiĆ³n: 929)
+++ director.py (copia de trabajo)
@@ -326,10 +326,12 @@

# pop out the Cocos-specific flags
do_not_scale_window = kwargs.pop('do_not_scale', False)
+ audio_backend = kwargs.pop('audio_backend', 'PYGLET')
audio_settings = kwargs.pop('audio', {})

# Environment variable COCOS2d_NOSOUND=1 overrides audio settings
- if getenv('COCOS2D_NOSOUND',None) == '1':
+ if ( getenv('COCOS2D_NOSOUND',None) == '1' or
+ audio_backend=='PYGLET'):
audio_settings = None
# if audio is not working, better to not work at all. Except if
# explicitely instructed to continue

-----------------------------------

behavoir, after the patch applied:

Calling
director.init(...) with kwarg audio_backend='PYGLET' or without that kwarg uses pyglet audio, legacy behavoir, SDL will not be required, AVBin needed to use audio.

To use SDL audio, pass the kwarg audio_backend='SDL' in director.init(). Here SDL libraries will be required. There can be problems in windows, look at this thread:
http://thread.gmane.org/gmane.comp.python.cocos2d.user/996