30/04/2007

A very simple profiler

I needed a very simple and quick profiler - this is what I came up with. Youll notice its very like a C define, oh well :)

from time import time

PROFILE_STACK = []

def BEGIN_PROFILE(thing):
    ind = "  " * len(PROFILE_STACK)
    PROFILE_STACK.append((thing, time()))
    print "%sBEGIN_PROF %s" % (ind, thing)

def END_PROFILE():
    thing, start = PROFILE_STACK.pop()
    ind = "  " * len(PROFILE_STACK)
    print "%sEND_PROF %s = %.3f" % (ind, thing, time()-start)

You simply wrap blocks of code in BEGIN_PROFILE('some string ident') and END_PROFILE() and it will print the execution time.

Im still fighting with pywracer physics unfortunatly and now Im vaguely tempted to try my hand at a golf game. There arent any free golf games! ( unless we count neverputt )

20/04/2007

Not very interesting...

Wow what fun! No - infact. Altho I have swapped in a new config backend for saving data, updated the model exporter and created a nice easy way to insert instances into levels! Here's what the level designer looks like:

Main Window:
Instance Manager:

Dont ask me why those text labels are different colors, seems to be a weird bug in blender ( couldnt possibly be me ;)

19/04/2007

Building textures

Ive created some building textures using blender! Its not very difficult you just need to use Ortho setting for the camera. I think its also possible to create normal maps this way ( see this tut ).

Here are the results:

15/04/2007

The Power of the High Pass Filter

This is a tutorial I spotted at blendernation and its great! The tutorial is from gamasutra here.

Gimp users fear not - ideasman even posted a gimp script for a high pass filter in the comments of the blendernation post. The script is here and should be placed in ~/.gimp-2.2/scripts on linux.

The results are great, lets see if I can make some nicer looking buildings now :)

14/04/2007

Pywracer in Color

Since the last post:
  • Color UV textures
  • Fading out of detail texture
  • Lots more buildings

10/04/2007

Pywracer video

Ive never done this before but this should be a YouTube video of pywracer..

09/04/2007

Let there be instances

Baked in-place instances - yay! The instances are linked from other .blend files via blenders library stuff. With my export script you can "bake" the instances ( which copies all the linked meshes to real meshes ) and with these you can bake the lighting as they are in the scene. Blimey... That screenshot was also baked with Ambient Occlusion ( which is nice ) - a nice advantage of using blender :)

08/04/2007

Screenshots

Some screenshots from the latest pywracer level viewer. There is now a detail tex on the track and some pretty lens flares ;)