Classic lines from game dev.

“I added this thing so that you can slow down time.
I couldn’t speed up time cause things explode”

Matt Clark

I have a very weird job.

Genius Moments in Game Design

Some damn funny game design over at Mazapan.

You Have To Burn The Rope

rock paper shotgun did a walkthrough

Absolute genius.

We’re up on google code

city lights river view

In the last week I’ve been putting the two libraries I’m involved in up on google code. So the OBJLoader and the Collada Loader both have nice safe source controlled homes. Over the coming weeks I’ll be making sure that all documentation and examples are also up on google code.

the OBJLoader
the Collada Loader

Saving uncompressed TGA


(this image has nothing to do with this post. Just something I’m working on)

Alas RLE compression isn’t supported everywhere. Can’t expect the earth, it’s only old enough that I can’t find when it was invented. But onto the problem.

I needed to dump out uncompressed tga’s from processing. Turns out this was an old processing feature that was upgraded to RLE. Because I’m still living in the dark ages, Toxi pointed me towards the original code that he wrote for uncompressed tga saving. Just so I don’t lose it and maybe other people are looking for something like this. Here is the slapped together bit of code.

The zipped up sketch

MattD

Collada Loader 003

The Collada Loader has been updated and now sits at version 003. There are a few new functions involving materials. You can check out the supplied example file for the usage. But here is the list of new stuff.
[cce lang="java"]
model.toggleTexture();
//toggles the texture on and off

model.toggleMaterial();
//toggles the collada material

model.setTexture(PImage);
//replaces the loaded texture with a supplied PImage

model.originalTexture();
//reloads the original texture
[/cce]

ColladaLibrary_003_demo
ColladaLibrary_003_lib
ColladaLibrary_003_src

UPDATE: I’m sorry to say that with the updates to the XML library in processing, the collada loader broke. And broke hard. If anyone would like to help out in fixing this, that would be great. I’m afraid free time is just not happening for me at the moment.

Processing and tga’s

You can always depend on a tga. That faithful image format is like an old friend. But processing has a bug where is saves them out upside down. You can see the bug in this code
[cce lang="java"]
line(10,10,90,90);
save(“data/img.tga”);
PImage img = loadImage(“img.tga”);
img.save(“data/img2.tga”);
exit();
[/cce]
Until a fix gets in, here is a workaround
[cce lang="java"]
line(10,10,90,90);
save(“data/img.tga”);
PImage img = loadImage(“img.tga”);
PImage outImg = createImage(img.width, img.height, ARGB);
for(int x = 0; x < …. waitaminute
[/cce]
UPDATE:

It’s fixed for 0136. WooT

One down thirteen to go

Week 01 of 1109GFS is in the can. Thank you to all the awesome students who came along. I had a great time. See you same place, same time, next week.

remember
[cce lang="java"]
problem = pebkac;
lol(u);
[/cce]
mattD

1109GFS and trying to explain (art == data)

This is the last weekend before I start teaching at QCA. This year between working full time making games, I’ll be teaching two classes called 1109GFS and 1112GFS. They have been titled something like “Programming for Artists 1 & 2″ but I prefer to call them 1109 and 1112.

The formal structure of the class will be teaching processing to students of the games design degree. But the subtext of whole thing is to try to show that you can view art as a form of data. It’s a different approach and one that takes understanding before you can appreciate all the ramifications of what that approach means. Consequently when I talk about this idea at work they smile politely and nod. There is a lot of scratching and shaking of heads, and it mostly finishes with everyone agreeing that I’m on to something, we just can’t put a good finger on it.

First class is on Tuesday night. Wish me luck.

Processing Collada Loader version 001

Here it is.

colladaLoader_001
collada_library_test
Collada_Loader_source_001

So why another format?
Lot’s of reasons but mostly because I needed to load Collada files into processing. The added bonus is that the collada format is far more extendable than the obj format. It can store mesh, splines, cameras, lights, skeletons, skins, animation and even physics. So it’s more a storage medium for 3D data rather than being just a model format.

What can your loader do for me?
At the moment the loader can load and display one model with one material (textured or untextured). There are also several helper functions for drawing the bounding box, vertex normals, face normals and the wire frame. You can see them all in the example above.

Is that it?
In this release, I’m afraid so. There is a lot more work to do. The current todo list (in order) looks like this.

  • Multiple materials
  • Multiple geometries.
  • Cameras
  • Lights
  • Splines
  • Animation
  • So when is it going to be finished?
    Um. I’ll get back to you on that.

    Can you add support for (insert thing here)?
    Yes. It’s meant to be used. If there is something that you need from the loader just ask.

    I broke it.
    Excellent. Drop me and email and I’ll try and get it sorted.

    MattD

    June. Quick year so far.

    Time is moving faster. But I think I’m getting a lot done. Living in a new house now. That has taken up the majority of my time this year. Beautiful place. It even has it’s own Half-Life pipe. (It makes sense if you can see the view out the back door)

    And I’m doing a lot more coding. In fact one of my happy achievements this year has been the work on the obj loader for processing. Saito (the creator of the library) asked me help out with the upkeep of it. Not bad for a photographer.

    Also for anyone interested in studying art in computer games, QCA is starting up a 3 year degree in it next year. I’ll be helping with the writing and teaching. I’m really looking forward to it.

    Also freakdesign has been hard at work on the new front end for the site. It looks rather spiffy. and you might even be reading this on it.

    MattD