var svg = new SVG();
svg.circle().attr({r:20,stroke:"black",fill:"none"}).transform.translate(100,100);
Saturday, May 28, 2011
Simple SVG.
So simple, it is silly. SillySVG
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. :-)
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.
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
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.
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.
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.
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
Subscribe to:
Posts (Atom)
Popular Posts
-
These are the robots I've been working on for the last 12 months. They each weigh about 11 tonnes and have a 17 meter reach. The control...
-
This hard-to-see screenshot is a Generic Node Graph Editing framework I'm building. I'm hoping it can be used for any kind of node...
-
So, you've created a car prefab using WheelCollider components, and now you can apply a motorTorque to make the whole thing move along. ...
-
Unfortunately I've not secured a venue for the GGJ. With 9 days left, things are not looking hopeful. It could be that GGJ Perth will no...
-
Often, when building a game, you need to test if objects are colliding. The objects could be spaceships, rocks, mouse pointers, laser beams....
-
MiddleMan: A Pub/Sub and Request/Response server in Go. This is my first Go project. It is a rewrite of an existing Python server, based o...
-
Thank to Adrian Boeing I was inspired this morning to hack together a ripple shader for Unity3D. Thanks for the math Adrian. You can see th...
-
I made something which lets you render very large worlds with a small farClipPlane. https://github.com/simonwittber/scaled-origin The d...
-
I've just read a newspaper article (courtesy of Kranzky ) from WA Business News documenting the malfeasance, gross negligence and misc...
-
Space is awesome. Especially when it is generated using Perlin noise, and some cool shaders. You can try it out over here.