Saturday, May 28, 2011

Simple SVG.

So simple, it is silly. SillySVG

var svg = new SVG();
svg.circle().attr({r:20,stroke:"black",fill:"none"}).transform.translate(100,100);

Sunday, May 22, 2011

Fun and Games in Boston

After three days of heavy fog, two days of bleary jet lag and one day of the lurgy, the sun came out today. So far I've met with quite a few interesting characters. Alex Schwartz of "Smuggle^H^H^H^H^H^Hnuggle Truck" fame, Ned Batchelder (an altogether nice chap) and today I had the good fortune to have lunch with Glyph Lefkowitz and Jp Calderone who assured me that Apple is not the Evil Empire we might think it is, and that PyPy is the future, as long as we can get build times down.

I'll be home in three days, and I'm super-keen to get back into some coding, and maybe have a crack at breathing life into some of my old projects. Oh, and start compiling PyPy trunk. :-)

Thursday, May 12, 2011

Python Hackers in Boston

I'm in Boston MA next week, looking to hire some awesome Python hackers to help open a new game development studio. We use Python for our game server, and Unity3D/C# for the game client. It is an amazing project with an existing international team based in Perth, Western Australia.

If you're interested, in Boston and want to chat, drop me an email at simonwittber@differentmethods.com and we can arrange a time and place.

Wednesday, May 11, 2011

Schweet In Game Render

Python in Unity3D

This is amazing. My two favourite technologies working together.

Monday, May 09, 2011

Adding Methods without Inheritance

Did you know that C# will let you add methods to objects, without needing to write new sub-classes? I didn't until today. The following snippet adds a new method to generic list instances, called Shuffle, which randomises the items in the list.
static class ExtensionMethods {

public static void Shuffle(this IList list)
{
var rand = new System.Random();
int n = list.Count;
while (n > 1) {
n--;
int k = rand.Next(n + 1);
T value = list[k];
list[k] = list[n];
list[n] = value;
}
}

}

Is this possible in Python? I think it is, but i need to experiment with some code first... stay tuned.

Update:

Of course you can do this in Python, but it won't work on built in types.
>>> import random
>>>
>>> x = range(10)
>>> def shuffle(self):
... random.shuffle(self)
...
>>> list.shuffle = shuffle
Traceback (most recent call last):
File "", line 1, in
TypeError: can't set attributes of built-in/extension type 'list'
>>> class List(list): pass
...
>>> n = List(x)
>>> List.shuffle = shuffle
>>> n.shuffle()
>>> n
[5, 3, 7, 4, 2, 9, 1, 6, 0, 8]
>>>

Thursday, May 05, 2011

Model-Off, Next Week.

Next week in the Different Methods office, we're having a model-off.

What is a model-off? Well, we all love our respective modelling software. Except Lisa, I think she just tolerates Cheetah 3D :-). Anyhow, we're going to all tackle the same model, and see who produces the best quality model, balanced with the time spent to build it. No texturing required, just polygons!

Simon - Wings3D
Stephen - Maya
Nicholas - 3D Studio
Lisa - Cheetah3D

Which package will reign supreme? Stay tuned for the results! We'll probably release a Unity web player showing the results.

Wednesday, May 04, 2011

...!!?

Popular Posts