All posts by r b

10 10 Ninjas

Sup Ninjas

Got ninjas added to the game. 10 ninjas enter the room from the right, one at a time, and charge towards the stage at varying speeds. Each ninja has a randomly generated name (well, randomly selected from a batch of ninja names I came up with). Each ninja has a randomly generated speed with an upper bound and a lower bound. Last time I ran it everyone reached the stage, then in the distance there appeared one slowpoke ninja shambling forward.

Have I mentioned all the players are colored blocks and the ninjas are yellow blocks? Yeah, that’s some exciting gaming right there.

Ninja subclasses Enemy; adding a different enemy type (rhinoceros, maybe?) would be a matter of making another colored block, specifying its speed and name, and Enemy handles the rest.

I should be able to add attacking these ninjas within the next couple days.

Youth are Nice

I went out to dinner with my dad at a small place near the dyke on lake Wallenpaupak. It was just turning dark. He dropped me off near the entrance and went to park around back so I wouldn’t have to hobble very far. I made my way to the door and stood facing the roadway while I waited for him to park. As I leaned on my crutches a small SUV drove down 507 towards me; the restaurant sits on a curve so they were coming nearly straight on and had a good look. They approached, at least 3 young guys, and they leaned out the window in my general direction and laughed loudly and yelled “AHAHAHAHAHAHAHAHAA <inaudible> FAGGOT <inaudible>!!!!” I can’t be sure if that’s what they actually said, because of the wind and the noise from the car and the road, that’s just my best guess. They drove on down the road. I looked around and didn’t see anything or anyone else they might be yelling at; I suppose it was me, the crutches indicating my infirm condition, though the true reason we will never know.

We went inside and ate dinner and talked about the finish on the wooden tables and I got a chocolate milkshake.

Stats

324 lines of code

40KB worth of xlf

15KB swf

09 Oct 2013

In the Poconos recuperating, escaping a somewhat trapped and confined existence at home. Much easier here.

Sketches of Pain

Spent some time sketching out the stage and characters by hand on some graph paper. Learned that I’m out of practice. Trying to work out the perspective, as there will be multiple problems to deal with there. You can go straight top-down, but you want the characters to be in semi-profile so that will look kinda like they’re all lying down on the stage, which isn’t a thrilling show. Maybe not a huge problem, I mean think about computer chess games – you don’t throw them out the proverbial window because the pieces are technically on their sides. But still a top down view with cartoon-realistic players is gonna look strange I think.

You can alleviate some of that by tilting the board, bringing the camera down. In real life doing that will put the whole stage in perspective – the back will be smaller on screen than the front, etc. That also means that lane 1 is technically narrower than lane 5, the characters will be smaller, and in general everything has to scale down, which adds a layer of translation to certain calculations, which I don’t want to do. I really just want fake 3d here.

So you can just ignore all that and keep everything the same size, which is physically ridiculous but easier to handle and so is much more appealing, and I think is reasonable to the user. Look at Streets of Rage, for example. Or Peacekeeper. As long as the gameplay is fun we can ignore some physical realities. So that’s fine, but I need to work out how that will be done and fit on screen. So I’m looking at reference, sketching out different layouts, etc.

I think it’s probably a bad idea to rotate horizontally, ie so that characters in a vertical line appear diagonally (think Radiant Historia, eg). It lets you pack the characters closer together, and is more exciting, but it messes with user perspective in a bad way in pseudo-action game I think.

So probably the right angle is just a rotation down vertically from the top to something that looks nice. Still trying to find it.

Listened to this interview with DFW while drawing. Earlier listened to his commencement address, which always helps set me straight. Main message: you can choose what to think, what to pay attention to, to be aware, to be compassionate, to not be automatic, and it’s not easy, but you can. Perfect thing to listen to while I’m trying to reset myself in the poconos.

 

Git Shit

Git Repository

Bumbled through some git carnage. Set up git tracking for the project. Set up a remote repository on my web host. Had to go back and look at some documentation for how I normally set this stuff up. Questions:

  • I have access to my web host as a single user, can’t create another. Can I only then use git (via ssh) as that single user? Can I add another public key that will allow someone else to access the repository, but won’t allow them to log in as me? Or must every git user also have the full access of the web host user?
  • If that limitation exists, is this the wrong way to do it. Should this be done with GitHub instead; is that non-free if this is a private repository?
  • Is it more sensible to try to set up direct connections between development machines? Seems…shitty.
  • Should I look into a different protocol?
  • Given how much mental overhead git is, is it even sensible to use it at all?

I always hate dealing with this shit. Just want to build stuff, don’t want to deal with the intricate idiosyncrasies of some auxiliary tool. As a sub-note, it took me about 2 minutes of testing, deleting and retesting to figure out the correct spelling of “auxiliary.”

Time spent: Let’s call it an inconsistent 1h

You Stunk my Babbleshit

WordPress Spam

Within, no joke, 2 minutes of the christening of this brand new blog – which is not linked, as far as I know, anywhere on the internet – with a sparkly, bitter and tart first post, the opening spam salvo was launched across the bowels of the internet landing squarely on the poop deck. Then another within a few minutes. Around the fifth spam I rushed to the computer and rage unclicked the “email me when a new comment is received” option, cursing mightily and also ineffectually. I made a note to sort it out tomorrow.

Which day came and I awoke to 60 comments awaiting moderation, all of them total garbage, needless to say. Only two people know about this blog right now: me, and every goddamn spammer in the world. (Yeah, 60 is a small number, believe me, I know from the days of managing the DS email).

First step was to disable commenting for all but logged in users. Second step was to research some shit. So, really, we probably only want logged in users to be able to comment (so, two commentators, wow), but it’s the principle of the thing, so I looked at some WP best practices and checked out Akismet, which I signed up for like I need another online account somewhere. We’ll see how that works out.

Time spent: roughly 0.5h

The Endginning of the Begend

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.