coalesce notes #4

|0x1|0x2|0x3| |prev: NULL|prev: 0x1|prev: 0x2| |next: 0x2|next: 0x3|next: NULL| (insert 0x4 between 0x2 and 0x3) last = 0x2 last -> next = new last -> next -> prev = new new -> prev = last new -> next = last -> next new = 0x4 last = 0x3 _new -> prev = last -> prev_ _new -> next = last_ last -> prev = new last -> prev -> next = new |0x1|0x2|0x4|0x3| |prev: NULL|prev: 0x1|prev: 0x2|prev: 0x4| |next: 0x2|next: 0x4|next: 0x3|next: NULL|

coalesce notes #3

Can I figure out some way to treat these modules more as objects? Alloc’ing and dealloc’ing space for them like w/ “new()” / “delete()” methods… I’ll need to keep track of what I create & free it all… Hopefully I’m not too tired to get some work done on the shooter when I get home today. And I should get that laptop from Mike, so I can try building it on Windows. So linked lists for the objects. Actually, just one list should be fine — enemies & bullets alike. Alright, so I updated the enemy code so it’ll alloc & free & deal w/any enemy, not just one declared statically in the file itself. The display function now takes a pointer to the enemy struct; modify this so it traverses -the list- a list & optimally checks each object & calls the correct drawing code.


So I’ve almost got it built. One error, redefinition of a symbol. I can’t remember which one. Hunt that down & hopefully I’m good. Then I can get back to coding the game itself. Sweet. It was the cygwin runtime, which actually sorta solves two problems. One: getting it to compile & run on Windows. Two: my worry that it would need the cygwin runtime.

first notes on coalesce

ed note: I don’t know when this was written. None of the entries in my notebook are dated. It’s the first reference I could find to the game. I’ll be going through & adding all my other notes as time goes on. So alright. My task then is to make a very simple prototype. Collision detection & possibly shooting. I have till the weekend or Monday, whichever. This should be pretty easy. I mean, there’s already a pong tutorial that I can work from. What license is Allegro released under? hopefully LGPL, not that I think we’re gonna sell this. Even better — “giftware” — Completely free to do whatever the hell I want w/it.


Ok. Object creation (a ship, a wall, or some other obstacle). Collision detection (maybe some pre-written routines for this?) I’m so used to OO programming now that going back to functional (or “modular”) feels weird. I suppose I could try & learn C++. Or use Ruby objects… Or Obj C…

so far behind

Lots of stuff distracting me. I was offline for the past few days, and two days ago I took home an abandoned kitten. I’ve decided to call him Jackie Chan. So it’s been really hard to write because he’s very little and needs attention. And very cute.
I’m going to keep trying, but who knows if I’ll be able to make the 50K-word mark, now.