Well, I'm glad that's overI 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
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)
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 recommend also accepting the single-quote and forward-slash keys (the two closest to the right shift key).
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.
elthe on 2010/04/04 01:08:hello,
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
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
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)