New games every week!
The case for good Framework...
Blog
7th August 2011
Over the years, I've settled into somewhat of a set of "Bad" habits.
I clump everything into unnamed arrays, with unnamed numerical references for everything. I reuse arrays for anything from enemy locations, collectables, particles and anything else. If you open up my PlayMyCode games (click the edit button!) you'll see my habits. They're everywhere, and they "EVIL!!!" I am an oldskool coder. This is how I code.. -=-=- My terrible evil coding habits have become so mindbogglingly lazy that I've started to reuse everything, from variable names to function names, and more. I am the epitome of terrible coding, and everyone who see my code agrees.. Jay can code quick, but damn, there's a drawback!!! .. Here's an example. On the left is some code from Sheep Goes Left on the iPhings. It's written in Obj-C, with Cocos over the top, and is a pretty modern language, It's meant to multitask, and be kind to devices, and all of that gubbins. On the right is some code from Sheep Goes Left on the NintendoDS. The NintendoDS code is done in plain-bog-standard ye-olde C. I'm still not sure if it's C++ or not.. Haven't a clue. It uses DevKitPro to HACK into the DS, bypass it's security and run my code, and over the top of that is PALib. The iOS code is legally accepted by Apple, and is available in the AppStore. The DS stuff is all hacked, probably quite illegal given that you need an illegal "PIRATE!!!" cartridge to run it, and according to Nintendo, is done by some crazy whacked out mental "Garage Developer". (.. can't argue there!) The difference in the two sets of code is absolutely mind-boggling. Your brain will implode, trying to decipher the immense amounts of changes between the two sets of code.. .. I had to cut down the number of sprites on the DS version. Views 27, Upvotes 5
Daily Blog
New games every week!
|