Well, I'm glad that's over

I don't think I could have carried on. I'm completely exhausted. Tomorrow I shall drink copious amounts of beer and try to forget all about ninjas and vectors and texture coordinates.

Sadly the final game is still running poorly, with wonky framerates that even with hours of profiling I haven't been able to completely track down, though I have made huge strides. Pyglet sprites are slow, for one thing: the quad is rebuilt when you set any property - position, opacity, colour, rotation - so I had to use the internal, underscore-prefixed names, to work around this.

According to sloccount:

Total Physical Source Lines of Code (SLOC)                = 2,369

But also:

Development Effort Estimate, Person-Years (Person-Months) = 0.49 (5.94)
 (Basic COCOMO model, Person-Months = 2.4 * (KSLOC**1.05))

I like to think Python lets you do in a week what most developers take 6 months to do (and it's not just that COCOMO is a poor model for small projects).

(log in to comment)


Could you help me with launching your game?

Traceback (most recent call last):
  File "run_game.py", line 35, in <module>
  File "C:\bamboowarrior-1.0-final\bamboo\game.py", line 87, in run
  File "c:\Python26-32\lib\site-packages\pyglet\app\__init__.py", line 264, in run
  File "c:\Python26-32\lib\site-packages\pyglet\app\win32.py", line 47, in run
  File "c:\Python26-32\lib\site-packages\pyglet\app\__init__.py", line 153, in _setup
  File "c:\Python26-32\lib\site-packages\pyglet\window\win32\__init__.py", line 842, in dispatch_pending_events
  File "c:\Python26-32\lib\site-packages\pyglet\window\win32\__init__.py", line 1120, in _event_size
  File "c:\Python26-32\lib\site-packages\pyglet\window\win32\__init__.py", line 1073, in _immediate_redraw
  File "c:\Python26-32\lib\site-packages\pyglet\window\__init__.py", line 1219, in dispatch_event
    EventDispatcher.dispatch_event(self, *args)
  File "c:\Python26-32\lib\site-packages\pyglet\event.py", line 343, in dispatch_event
    self._raise_dispatch_exception(event_type, args, handler)
  File "c:\Python26-32\lib\site-packages\pyglet\event.py", line 340, in dispatch_event
    if handler(*args):
  File "C:\bamboowarrior-1.0-final\bamboo\game.py", line 80, in draw
  File "C:\bamboowarrior-1.0-final\bamboo\menu.py", line 131, in draw
  File "C:\bamboowarrior-1.0-final\bamboo\gamestate.py", line 161, in draw
  File "C:\bamboowarrior-1.0-final\bamboo\scene.py", line 128, in draw
  File "C:\bamboowarrior-1.0-final\bamboo\scene.py", line 24, in apply_transform
TypeError: this function takes 0 arguments (1 given)
Hmm, my OpenGL bindings accept that argument without complaint, but I'm obviously wrong to have written than.
There you go, try that.
I can't play - I apparently don't have a right shift or right control key.
Are they missing from your keyboard or does pyglet not issue the events? I did have those buttons on Z and X through most of development, but moved them so your hands wouldn't need to overlap player 2 in multiplayer mode.

The key bindings are in bamboo/gamestate.py: single player at 116 to 127, multiplayer at line 202 down to 230 if you want to experiment. What do you think the controls should be?
I have them on one of my keyboards (but not on my laptop or the wireless keyboard I prefer to use) but your game just doesn't seem to get the events it wants. No idea why... something to investigate.
I recommend also accepting the single-quote and forward-slash keys (the two closest to the right shift key).
I've done that and re-uploaded.
Also I think some systems may have the keys on the keyboard, but not provide any way of distinguishing between left and right. So it's probably not a good idea to rely on the distinction.
Thanks - well, it's all in a config file now.

It seems keyboards have got less standard since the 90s. I remember nearly all games used to use right ctrl, right shift, enter as the main buttons, partly, iirc, because keyboards better supported simultaneous keypresses on those keys. I hadn't really noticed but my laptop doesn't have a right ctrl key.