Finished!/Post-mortem

With less than 15 minutes to spare, I pushed the final revision of Alias to PyWeek (plus an in-game screenshot). Now all I can do is wait for the judging...

I didn't get to accomplish all the things I set out to accomplish (multiple enemies, multiple levels, some other stuff), but hey, it was a good learning experience. And, I had a lot of fun in the process (not to mention one all-nighter) - you can't beat that. :) I learned how to UV map Blender models, bake ambient occlusion into a texture, use Panda3D's collision detection, use PandAI (though it's quite buggy, unfortunately), and I re-learned Git.

If I could have done things differently, I would have made a complete FPS engine and released and used that before the competition began, and spent the week drawing art and writing glue code. I also would have learned how to use Blender before the competition started, instead of learning on-the-fly. Other than that, the only thing I wish I could have had is more time. :)

All in all though, it was a great experience participating in PyWeek 14 - I can't wait for PyWeek 15!

(log in to comment)

Comments

Couldn't start your game, it said:
ImportError: No module named panda3d.core

I installed both Panda runtime and SDK but it still failed with that message.
I'm using Python 2.7 on Win7 (x64).

Solution to use Panda:
- Invoke Panda's python
  e.g. c:\Panda3D-1.7.2\python\python.exe main.py to run the game
- Install PIL for Panda's Python
  (PIL for 2.6 is needed, as Panda's Python is 2.6.5)
But it still fails:
C:\Users\BlueDragon\Downloads\alias\alias>c:\Panda3D-1.7.2\python\python.exe main.py
Known pipe types:
  wglGraphicsPipe
(all display modules loaded.)
:loader(error): Couldn't load file C:\Users\BlueDragon\Downloads\alias\alias\da
ta\models\corridors\right-corner.egg: not found on model path (currently: "/c/Us
ers/BlueDragon/Downloads/alias/alias;/c/Panda3D-1.7.2/etc/..;/c/Panda3D-1.7.2/e
tc/../models")
Traceback (most recent call last):
  File "main.py", line 33, in <module>
    main()
  File "main.py", line 28, in main
    level.load()
  File "C:\Users\BlueDragon\Downloads\alias\alias\alias\level.py", line 50, in
load
    corridor.load(self._window)
  File "C:\Users\BlueDragon\Downloads\alias\alias\alias\corridor.py", line 43,
in load
    self._type))
  File "c:\Panda3D-1.7.2\direct\showbase\Loader.py", line 169, in loadModel
    raise IOError, message
IOError: Could not load model file(s): ['C:\\Users\\BlueDragon\\Downloads\\alia
s\\alias\\data\\models\\corridors\\right-corner']
I tried my best to get it to load too, but to no avail.  Better instructions next time.
Hmm, might be due to use of "\" instead of "/" as the path separator in Windows. I'll look into it.
Hi, Danger guy. I want to give this a try. I put some effort into a batch file, which is posted here to help others. And then I'm at an impasse. Here's what I got so far. Maybe you can assist it further.

The following script will configure the Panda environment in a cmd window temporarily, i.e. without modifying your default Python. You need to install the dev kit. I chose 1.7.2 stable. Tell the installer NOT to make Panda3d your default Python. Then save the following batch commands in panda.bat in the Alias game folder (if you use a different panda version or install path, you'll need to edit the "set ..." commands).

@echo off
set PYTHON=C:\Panda3D-1.7.2\python
set PYTHONPATH=%python%\DLLs;%python%\Lib;%python%\Lib\lib-tk;%python%\Lib\site-packages
echo Python is %PYTHON%
echo PythonPath is %PYTHONPATH%
%python%\python.exe %1

Run "cmd" to open a command window. Change directory to the Alias game folder (e.g. "cd C:\...\alias\alias").

Run "panda.bat main.py".

Here's where I need help. I get the following traceback from the game:

Traceback (most recent call last):
  File "main.py", line 21, in <module>
    import alias.levelloader
  File "C:\...\pyweek14\alias\levelloader.py", line 21, in <module>
    import Image
ImportError: No module named Image

Gumm