Warming up: scale demo

For me, one of the most interesting things you can do with a 3-D game better than a 2-D game is play with different scales. You can much more easily have a boss that's 100 times the size of the player character. To that end, here's a demo of something I'm thinking about. None of the sprites interact or anything: you just run right through each other. Controls are:

Esc: quit
Arrow keys: move
1: Drink me
2: Eat me

scale demo (4.4 MB)

I'm not sure how I'll make this into a game, if at all. I've got some ideas, but nothing's really "clicked" yet. Still, it's fun to think about.

(log in to comment)

Comments

Reminds me: I must get pygame working again before the challenge starts...
Hey, cool! It is fun :)

Where'd you get Alice from, BTW?
The model? I made it in Blender last week. kent_turbo taught me to use armatures for animation over Pyggy, so the first thing I wanted to test was that I could actually export it and get it into a python program by myself.

If you mean where did I get the name from, that should be obvious. :)
Oh, nice!

I tried to use Blender once but it got the better of me. Maybe I should try again ;)

Are there any tutorials etc. on creating such a model, animating it and exporting OBJ format "frames"?
There are tutorials on creating and animating models, but very few of them start from scratch, so you have to work your way up, and it can feel like really slow going. In general, I find using Blender to be an emotional roller coaster: extreme frustration alternating with extreme satisfaction. Figuring out how to do something can be a real pain. First you don't know what to call it, and then they half change the keyboard shortcuts and menu names with every version, so when you find the answer online, you never know if it's still correct.

However, when you do figure out a feature, it's amazing how much you can get out of it. I could probably show every Blender tool I know in a 10-minute video. I actually would like to do that, not for anyone else, just to save myself time next time I'm relearning Blender. That way I can quickly review the things *I* want to be able to do without going through long tutorials.

Exporting to OBJ files is easy once you have an animation done. The only tricky part, I think, is selecting the right options they give you. I select "Animation", "Apply Modifiers", "Triangulate", "Normals", "HQ", and deselect "Selection Only". If your OBJs don't look right, try selecting different options on export. :)
Oh, and I'm well aware that my grasp of human locomotion is "okay" at best. I couldn't find any Muybridge sequences of someone running from the front, or any of a female subject. I finally had to ask a woman, "I know your hips sway when you walk, but do they sway right when your right leg's on the ground, or right when your left leg's on the ground?"

Flying creatures are so much easier. :)
Such a Blender video would be invaluable! It's a great tool, and not that difficult to use when you get the hang of it, but the basic interface is so alien that I always need to spend a lot of time relearning it. (I very rarely use it.)
I remember trouble with blender tuts. The tutorial resources for blender have improved ( relative what they used to be ) quite a bit since I last tried it.

I had seen a in depth tutorial, remake of the "cookie man" except it was much more detailed, and updated to a newer blender version. Unfortunately I can't remember the link. [ I believe it did modeling the man from scratch, lighting, rigging, animating ]

I really thought it was hidden in noob to pro, just maybe not on the front page, but a level or 2 deep?

Here's links to check out:
http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro
http://wiki.blender.org/index.php/Main_Page
http://en.wikibooks.org/wiki/Blender_3D:_Noob_to_Pro/Tutorial_Links_List

I would be interested in any info specific to blender -> pyopengl , or opengl.
Nice! One little fix - you're importing numpy in sprite.py, but never using it.
Using python 2.6, winVista, with numpy installed, I get an error running it:
Is it my end?

<code style="font-size: 10px; background-color:black; color:lightgray;">
C:\...\pyweek_prep\others\cosmologicon\scale-demo>python.exe scale-demo.py
Traceback (most recent call last):
  File "scale-demo.py", line 1, in <module>
    import pygame, os, math, sprite, random
  File "C:\Users\jake\Documents\py\pyweek_prep\others\cosmologicon\scale-demo\sprite.py", line 6, in <module>
    from OpenGL.GL import *
  File "c:\python26\lib\site-packages\OpenGL\GL\__init__.py", line 2, in <module>
    from OpenGL.raw.GL import *
  File "c:\python26\lib\site-packages\OpenGL\raw\GL\__init__.py", line 6, in <module>
    from OpenGL.raw.GL.constants import *
  File "c:\python26\lib\site-packages\OpenGL\raw\GL\constants.py", line 7, in <module>
    from OpenGL import platform, arrays
  File "c:\python26\lib\site-packages\OpenGL\arrays\__init__.py", line 22, in <module>
    formathandler.FormatHandler.loadAll()
  File "c:\python26\lib\site-packages\OpenGL\arrays\formathandler.py", line 37, in loadAll
    cls.loadPlugin( entrypoint )
  File "c:\python26\lib\site-packages\OpenGL\arrays\formathandler.py", line 44, in loadPlugin
    plugin_class = entrypoint.load()
  File "c:\python26\lib\site-packages\OpenGL\plugins.py", line 14, in load
    return importByName( self.import_path )
  File "c:\python26\lib\site-packages\OpenGL\plugins.py", line 28, in importByName
    module = __import__( ".".join(moduleName), {}, {}, moduleName)
  File "c:\python26\lib\site-packages\OpenGL\arrays\numpymodule.py", line 25, in <module>
    from OpenGL_accelerate.numpy_formathandler import NumpyHandler
  File "numpy.pxd", line 30, in OpenGL_accelerate.numpy_formathandler (src\numpy_formathandler.c:3543)
ValueError: numpy.dtype does not appear to be the correct type object
</code>
Hmmm, I'm not too familiar with handlers, but it looks like something wrong with your OpenGL/numpy setup. Since Martin's right, this doesn't need numpy, can you try removing numpy from the import line in sprite.py and try it again?
ValueError: numpy.dtype does not appear to be the correct type object

This means there's a Pyrex or Cython extension module in there somewhere that needs to be recompiled for compatibility with the version of numpy that you have.
That'll be the OpenGL accelerator.
Uninstalling opengl accelerator fixed it.