Sunday, August 30, 2009

What is delicious?

One sheet of Puff Pastry.

A few scoops of Peanut Butter.

A few cubes of Dark Chocolate.

Combine inside a sandwich press.

10 minutes.


Thursday, August 27, 2009

Dell Laptop Dead. Sad Face. Happy Face.

I work with OSX, Linux and Windows. Most of my Python development happens on Linux, and I just use Windows to run VM instances of Linux. :-)

Unfortunately, my favorite machine, a Dell XPS M1330 died yesterday due to a common fault with the video chipset, which causes the graphics chip to get really hot and unsolder itself. This manifests itself by causing glitchy screens, then eventually the screen won't work at all, it just fills up with random vertical lines and slowly turns white.

Much of my Python game dev happens on this machines, so I was pretty sad. But... After some research, I discovered that Dell had extended the warranty of my particular model especially to cover the fault! Awesome. After ten minutes on the phone, a Dell technician is coming to my office tomorrow to replace the faulty parts. I'm very happy now. It would be nice if Apple respected their customers in the same way.

Wednesday, August 26, 2009

SPW does stupid easy GUI screens.

I would like an easy way to write GUI screens for my games... one function to draw the GUI, handle GUI state, and respond to GUI events. No widget graphs, no parent child relationships, no callbacks. It can be done. The code below uses a new GUI module in the SPW library. Many more widgets are required, as at the moment there are only input boxes, buttons, toggles and menu widgets.
import pygame
from spw.gui import GUI, Context

class Window(object):
def draw_gui(self):
text = GUI.input("textbox", (70,10,100,30))
if GUI.toggle("show", (290,10,10,10)):
if GUI.button("quit", "Quit", (190,30,100,100)):
print text
raise SystemExit
options = "new", "open", "save"
action ="file", "FILE", (10,10,50,30), options)
if action is not None: print action

context = Context(pygame.display.set_mode((320,240)))
window = Window()
while True:
e = pygame.event.wait()
if e.type == pygame.QUIT: break
with context as canvas:
GUI.draw(window, canvas, e)

Saturday, August 22, 2009

Javascript Game Tools.

V8 Javascript + OpenGL. Awesome.

V8 Javascript + Game Engine. More Awesome.

Simple Pygame Wrapper

I do a lot of prototyping. Simulations, user interfaces, algorithms etc. Often I'll use pygame to visualise the results, as it is a nice simple library.

Sometimes though, it's just a bit too low level. So I created SPW, which add a very light interface over the pygame drawing and blitting functions. This interface provides a canvas which handles scaling and translations, enabling you to easily scroll across a drawing, or zoom in and out. It also looks after dirty rectangle updates. This is what it looks like:

from spw import gui

with gui.Context() as canvas:
canvas.scale(0.5),0), 50)

The context manager tracks the dirty rectangles, and does a screen.update when it exits. I've put it on google code, and it can also be installed using easy_install.

Friday, August 14, 2009

Terrain building is fun...

This is done in Unity3D. I've found that having a tablet (instead of a mouse) is essential for this sort of thing. It's much better for your wrists too.

Friday, August 07, 2009

Star Hammer Preview

Fellow Perth Game Dev Paul Turbett has released a trailer video featuring an early build of Operation Star Hammer.

Popular Posts