So I figured it would be nice to document the process a bit. For one, because as a developer I’m always solving obscure problems, then forgetting the solution, then encountering the very same problem later and racking my brain trying to remember what the solution was. For two, to act as a work log on the project. For three, for maximum transparency. For four, for fun and profit.
It should probably be pretty private; I intend to post some intimate things about the problem solving process, which experienced programmers may look upon and scoff at my abilities, which will hurt my feelings. Also because I dislike having eyes on the embryonic stages of a creative process; or any stage of that process, come to think of it.
I debated for a bit whether to use the existing CMS on my site, or install WordPress, and went with the existing solution because, really, laziness. Then I reversed that decision and just manned up and installed WP. Not sure anybody in history has had to actually get manlier to install WP, but there you go.
Some shit I had to deal with yesterday:
Actionscript inheritence
I have different classes for each player character, all subclassing the “abstract” PlayerCharacter class. Quotes because AS doesn’t really have abstract classes. So just like promise not to instantiate one, ok? Problem: no var inheritence. So you can’t define
public function get playerName():String {
return this.__name;
}
in PlayerCharacter then just override the __name var in the file, because you can’t override vars. So that raises the question: do you just set __name in the constructor, or override playerName() to return the right name?
The problem with the constructor method is that it’s like invisible. There are some things you can override but you have to dig around the superclass to find them, or the (eventual) documentation. But because there’s no real abstract classes, you can’t just leave playerName() unimplemented and get a compile-time error letting you know to implement it. You could throw a runtime error or something but that’s… unseemly.
I went with the constructor, because: 1. it kind of reminds me of django, where you do something similar if you subclass a Model; 2. code reuse – you don’t have to write getters like 100 times or whatever; 3. you can do this with functions also; and
4. thinking ahead, I’d like to be able to read character settings and instantiate from file. This is so a collaborator could say, e.g., I don’t think FMB is firing fast enough, and then change the setting in a text file (or use a tool for same) without having to touch code or recompile. That’d ease the balancing process.
WordPress
Is it better to install an old version of WP (3.1) automatically from Fantastico, or manually install a later version (3.6)? I’m thinking manual, since then you’re not depending on yet another tool for your tools. Downsides: you gotta keep on top of updating. Maybe a big security flaw comes out, maybe you get hacked, maybe you end up responsible for zombie nuclear site attacks, or worse, spam.
This started yet another colossal rabbit hole tech one-thing-after-another hate fuck. Can’t download wordpress because my local website repository died in my HDD crash a few months ago. Need to git clone it from my server. What was that URL again? Can’t remember. Or do I restore it from backup? Should I restore it then git it? Did I do anything since the last backup? I should check my laptop, since I think I last developed from there. Do I even want to maintain the WP install with git? Does that even make sense?
Can one/should one deploy a simple website with git, instead of the typical FTP and pray method?
http://sebduggan.com/blog/deploy-your-website-changes-using-git/
http://toroid.org/ams/git-website-howto
http://www.bitbonsai.com/git-deploy-website-5steps/
Yes, one can. But that’s effort, and anyway it seems like a weak deploy solution, so should I look into capistrano? For a simple fucking website? Ugh. I just wanted a pepsi. Still so tired, I guess from the injury and healing or something, maybe residual percocets, even though I didn’t take any today in hopes of not being so tired. Foot hurts a little as a result, too. Sheeit.
So today:
F It
In the end I said fuck it, I’m not gonna try to git my site, I don’t even care about that right now. Just downloaded the latest wordpress, detarred it on the server – didn’t even unpack it down here, that’s how much IDGAF – ran the setup and here we are. I spent some time having a little fantasy about customizing the theme but that’s going in the trash for now. Who really cares what the random development journal looks like?
Just need to change up my subdomain configuration and add a user for Sean, assuming he wants in on this garbage.
Next
Since I’m already in a morass of non-development, I may as well get up a git repository or two. In the process I suppose I’ll see if I can recover my website and get that figured out. Same with all the other projects that died with the HDD – I can’t remember now where I backed them up, or when, or if I changed anything since the last backup that’ll be lost forever, lol.
For development, next is to get all characters on screen, then queue some enemies and get them moving.