Gaming Your Way

May contain nuts.

Kentish Town smokers

Smokers who live / work in Kentish Town ( London ), here's an idea for you, instead of asking me if I have any "spare" cigarettes, why not go to the shop and buy your fucking own ?

Bad couple of days, don't know if you can tell.

AS3 continues to twist my melons. I've been working on a card game, always fairly straight forward. So I have a card movieclip with 52 frames, nice and old school. In that I have two other clips, one the "back" of the card ( So a quick flip of the visible property and it's facing upside down ) and within that another clip which has a tween in it for a glow effect.
A card gets picked, and it's just a simple gotoAndStop to the correct frame. But, within as3 I couldn't get to the glow tween clip. It just wouldn't find it ( So I couldn't call sprite["card"].face.gotoAndStop(1); to stop it going to frame 2 where the glow tween starts, and with it being as3 you can't just drop a stop(); on the mc's timeline ).
The fix was to trigger a one shot enterFrame and wait for a frame before being able to get to the mc. Logical in a way, pain in the arse in practise.

Speaking of the card game, I managed to delete the source code by accident ( Around an hour after it was feature complete. Obviously at any other time it wouldn't have had quite that same ring of irony ). It wasn't a recycle bin delete, it was a delete from within Flex ( ie Eclipse ). If you ever have anything dodgey on your machine, I dunno a list of drug dealers you employ, store the info in Eclipse, 'cause if you need to delete it no one will ever find it.
After a bit of a blind ( No backup anywhere ) panic, I thought ok, not a problem. Files aren't actually deleted, it's just a flag that's set on the block allocation map and so an undelete app will be able to find them, undelete them and everythings cool again.
4 undelete apps later ( Oh, 30 day trial, but without the ability to actually restore a file. What is the fucking point of that ? It's like buying Stephen Hawkings a great pair of trainers ) and not one of them found the files. They found files from a couple of years ago deleted by the God knows how many other people who have had this machine before me, but not a single one of mine.

No worries, Eclipse has this sweet local history feature. Hang on, if you delete the actual project file you can't get into the local history via Eclipse. Joy. So after a lot of hunting around I found the history files on my hd. Thank fuck. But joy of joys, they're stored in the most human unreadable form possible. A huge number of folders with hex names ( The catchy 8F, or the rather cheeky 5A ), and within those folders each little back up has a name like: 803d36994be9001c1049f5beb7af7d50
No file extension, no nothing.
Never mind, it's just an easy task to go through every folder with that days date ( A mere 60 or so ), sort each file by date, open it to see which class it is, and make a note of that. And then once all the notes are taken for each file in each directory I know which are the most recent and I can rebuild the game's structure from that.
3 hours to do that.
Yesterday with my 6 pages of notes, and the help of a decompiler ( The first time ever one has been useful, as opposed to allowing script kiddies to drop their own ads in your game ) I managed to fix everything as good as new.

There's a big fat lesson to be learnt there about backups ( Which I always do in-doors ).

Also discovered another fun little thing last night when working on Orbs. I've got senoculars' key.isDown class in there which works a treat. I've added the title screen, and you can click a couple of buttons to get into the game. What I found was though ( Which I wasn't expecting ) was the game lost focus in a way, so the key reading methods would only work by clicking on the game screen again ( I don't mean clicking away from the swf, just by clicking buttons on attached Sprites before hand meant that once in the game itself focus would be lost ).
After some hunting around, I found this would fix it,

There is more, so much more ( Don't get me started on Banks. I've been trying to sort out a foreign draft to pay someone for over a week now. From branches listed on google maps which it turns out have closed, to branches which are meant to be open at 9 but at 25 past still aren't ), but there's only so much venom one blog post can take.


Comments are closed