sefer

Posts tagged with “game”

 

more October 24

Ok gotta get to work. I need objects & I need them done. Then work on a couple different kinds of enemies, maybe, make it so enemies can't hurt one another...


I'm getting there... Lots to change. I'm not 100% sure even the code I've changed thus far is valid. We'll see.


Completed the switch to objective C. This'll be far better. Deleting objects is a little clunky right now... And I don't want to have to include the display.h in the object files. That's not such a big deal, though.


And... made the switch to Obj-C work in Windows. A couple minor changes.


 

short coalesce notes October 24

Any file that refers to ships needs to be compiled w/the Obj-C compiler (so .c → .m) Any way I can cut down on the # of includes is good, too – more modular.


 

more coalesce notes October 24

Anyways, yes. Enemies. And improving the imput. God damn this timer's giving me grief. What am I doing wrong? Yay! Fixed! Now to enemies. And the killing / dying thing.


Hmm: how reasonable wd it be for the speed of objects to dictate how often they're updated, rather than how far they move per update? Alright. Vectors. Now I can keep track of where the enemy ships are (rather, what direction they're moving in) All going relatively well. I'm thinking maybe I should look into some sort of OO, though. I'm doing too much reusing code. I guess I can do much of this w/nested functions, however. Ahh – except the case statements. I have to check every time what kind of structure it is. That's not something I know a good way around.


Objective C is a go. I'll have to do low-level(ish) memory management, but I can do objects. So that's the next thing to work on.


 

coalesce notes September 22

So my linked list code is broken, somehow. I guess this is a time for Unit Testing. This'd be a whole lot easier if I was using objects. And why isn't the timer working at all? Or am I doing something (else) wrong?


Organize & streamline code. Is MVC something that really applies to games? I don't see why it wouldn't be. Every now & again I'm still getting crashes. Pointers to addresses that aren't ships. But the speed is much better, now. Should look into timing routines some more. I think there's something I don't quite understand about how they work. Objects need to be erased before they're deleted. Let's start w/a Space-Invader type enemy. One that moves across the screen horizontally, moves closer, then goes back in the other direction, slowly (or not so slowly) getting closer. Something simple. Oh, and I suppose that whole "dying" and "killing things" thing. Weapon attrs: .multishot .spread (rapidfire) .laser .seeker .flock .power .spread Bosses will drop lots of powerups. Should also be special weapons. Vampire ship?


 

coalesce notes #4 September 22

|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|