Friday, August 18, 2006

C# and .Net

So.... I'm doing a tool to build textures. Last time I did this I did it in C++ as usual but since I need to update it a bit, I thought I'd have a go doing it in C#. Now C# is pretty good in some cases, really easy to do GUI stuff - just like visual basic is, but still has some problems when dealing with memory. I had a bug that showed this up - I thought I had to make millions of textures, but it turns out that was wrong - obviously. But it did show up that C# was allocating twice the ammount of ram to do the job. Now, for 16 byte allocations, that wasn't bad, but if I was doing this in c++ I'd allocate a huge chunk of memory, and then just point to it. But in C#, you can't do that. "fixed" arrays actually have to be constant, which I don't want, which means you're buggered. This is pretty bad really for a "new" laungage.

Still, after I fixed the bug memory wasn't an issue so I was able to proceed as normal, and it's pretty good - in general. The other reason for trying this is that with Microsoft doing an open devkit for the PC and 360 in C#, these are the kinds of problems I might hit.

I'm really looking forward to using this new SDK (Software Development Kit) and being able to do little games on a 360 - perhaps even sell them....I just need to think of one - preferably one that won't take a year of my spare time to do! I've been doing several projects at home. One is a retro Commodore Plus/4 shoot-em-up ( and then theres my DMA History site (, and then I have a few other smaller personal projects. Between all these - and family - I have almost no time to do "small games"....but I live in hope!

No comments: