Re Basic Mathematics
Return to home page
Comments Loading...
2003-09-14

After [Spotting this at the Fishbowl>http://fishbowl.pastiche.org/archives/001555.html] I thought I'd add my own little recent experience to this.

For the last few days I've been doing a re-make of a game I made in highschool that was a four player game. It was so popular, every lunch time we had three computers with four people on each duking it out.

What's this got to do with Fishbowl's math? Well, it's the same maths actually. The game involves turning lines around a screen, firing weapons or using defences, etc.. So it is all angle based. We have a weapon called 'Repel' which projects any pixel near you in a radius away from you at a decreasing velocity. This is fairly involved maths when you haven't done it for a while :)

So the original was in QBasic.. and it flew. The new version is in C with SDL and at every turn we're finding we have to optimise things. WTF?! - I remember not optimising a thing in QBasic.. but then again, it wasn't doing 'as much'. Though in some respects it was doing more... I'm confused to tell you the truth.

I've been finding SDL and C are a lot of fun - when you are making a small application. I knew right away that if I wanted to scale what we'd been doing to something larger - forget it. That's where Smalltalk comes in in my mind. You don't need to think about scalability of a code base of an application, it's handed to you on a platter. The cost is, it's harder to get going in St than it is in C.

The key to code scalability is a really cluey architecture storry that is applieed consistently over all your code. Hard to do in C without a lot of discipline. In Smalltalk, that story was already written for you years and years ago...