Old NA Blog - 2010

Welcome to a archive of the most prolific blog ever to grace the pages of NintendoAGE written exclusively by Mario’s Right Nut.

12/15/10 - More Programming Stuff...Finally!

So, everyone is out at a meeting today, so being the dedicated employee that I am, I chose to program for a bit.

If you read my last blog entry, I talked about the re-vamping of the overworld. Re read it now…it’s okay, I’ll wait.

Fine, don’t read it.

First step was to figure out how big the program is now:

Then I set about modifying my overworld meta tiles to prune out all the crap that I didn’t need any more. I had to make some nasty cuts, but here is the end result:

You can see how much crap I had in there from not knowing what I was doing when I did the overworld. I also programmed/tore out the crap from tile molestor to make it a little more user frendly when I program the new meta tiles into the works. I don’t think that I’ll spend much time going over this crap, cause I’m sure you already know where this is going next.

11/22/10 - Travels: Vernal, UT

Well, I got back at about 1am on Friday night from Vernal, UT. I went there on Wednesday morning for a job showing for work. It was a nice little town that was completely dominated by the oil field peeps.

It was really depressing to commit that much time and effort to a job that we don’t have a very good chance of actually winning. There were just too many bidders there and, I’m sorry to say, that a non-union company will most likely win that one. There are just too many crappy parts for us to be efficient. We’ll see what happens, but in my opinion, it was a waste of time.

I met some nice people though. That meeting was more friendlyer than most.

11/15/10 - Nightman?

Well, I’m sure you’ve noticed that I’ve not written about Nightman in some time. I was debating on scrapping the project all together…but that just won’t do. 8==D

Well, here’s the deal. I’ve been procrastanating trying to decide what to do. Other than the fact that I’ve been swamped at work and had no real time to do anything, here’s the problem:

When I programmed Level 1, I knew what I was doing and made an engine for the level that runs like a oiled hooker. However, when I programmed the Nostromo, I was a complete noob and had zero idea what I was doing. I even re-did the overworld and made it a lot more efficient, and it’s still crap. As a result, when I programmed Level 1 in, I had to basically tell the game to run the overworld engine or the Level 1 engine. Sucks.

The overworld has so many issues that I’m just overwhelmed at everything that I’d have to do to integrate multiple levels into the program. And I have a “level selector engine” that is complicated and VERY hard to edit without fucking up…not to mention the difficulty in calling the various levels/graphics/etc.

So, my last version that I sent to the beta testers is V0.34. I think that I will start work on V1.0 with all the go-faster stripes. I’m doing away with the text based level engine, re-vamping the overworld rooms to run off of my collision detection engine (not the freaking hard code), and making a seamless conversion to the various levels. The level engine will now run off of collision detection op codes. Every room will have to be redesigned to fit with the new method. It will look the same to probably everyone but me, but all of them will be slightly different. The graphics will have to be modified slightly to do away with the angled areas, or at least enough to where you won’t notice that they aren’t doing anything. And I’d imagine that this will significantly reduce the size of the game.

Enough rambling. Here’s the current stats. I’m off to work.

11/4/10 - Travels: Marianna, FL

So, I just got back from my 14+ week hitch on a job in Wyoming about a week ago. Then on Monday, my boss hands me a plane ticket and says pack your shit, you leave in a few hours…to Florida…for at least a week, maybe two.

Of course, I was pissed. And what really irratates me is that I showed it when he said that to me. Damnit. I hadn’t even finished unpacking, and the butt is sending me out again? 14 on and 1 off? Not even off, but Houston Office work/travel 2 days of that week “home”? And they didn’t understand why I was irratated.

Anyway, so I’m in Florida ATM. The Project Engineer on this job here’s father in law died on Monday and I’m here to fill in for him. Normally, I wouldn’t care and have been happy to help out, but you’d think that a multi-billion dollar company could find someone else. But hopefully this dude and his cute wife are okay.

Anyway, it’s not even a pretty part of Florida…it’s freaking rainy and dreary here. 🙁 The part that really pisses me off on top of the above is the fact that the guy that I’m replacing has an assistant. They didn’t tell me this little tid bit when I was comming here. I’m like, “Define Incompetence”? The whole point of having an assistant is so that the dude can take over for you if need be and that he helps you out with all the random shit that we have to do. I’ve never had a freaking assistant…or had someone fill in for me while I had to leave for anything. It was just sort through the mound of crap when you got back and hope for the best. This doucher should be able to cover, for only a week, no less, and not screw it up bad enough so that the prime can get it all fixed up when he gets back.

Anyway, so far I’m not too impressed with Florida and I haven’t seen one bikini clad hottie. It’s not fair.

11/1/10 - RANT

You know what really fucking irratates me? When you spend a good long time chatting with someone about a game/lot, go through the trouble of examining pictures (and getting them from the seller), pricing out games, and making an offer (even when you asked the seller “What do you want for them?” and they say “make me an offer”.)

Then you make them an offer, and they just say “pass”…? It’s like, what the fuck? After all that, just pass? No counter offer, or I’ll think it over and see what I think they are worth, or 3rd party apprasial, etc. Seriously? You go through all that trouble and just…pass….

FUCK!!

It’s not like THIS time was anything rare, just a small lot of commons. But still, I invested a significant amount of time and effort into trying to make the deal, and the fucknut just says “pass”. If we were face to face, I would physically bitch-slap this asshole for being such a dumbass. Fuck.

10/27/10 - Halo: Reach

So, I’ve been rather distracted for the past few days. I finally got home (I was on a job in Wyoming from July 12, 2010 to October 20, 2010), Fuck that was a long time. Anyway, my wife got me Halo Reach for my B-day and I’ve been playing it. 🙂

First, someone jaded me a little because it was really hard to open the factory sealed goodness. Bitches.

Second, it’s a pretty fun game. I love the addition of rather than just slapping someone on the back of the head, if you sneak up behind them and melee their ass, your character will either grab their head and break the fucker’s neck or whip out her knife and slit the guy’s throat…or other stuff. 😀 Violent, but awesome. I don’t like that stickies don’t kill Elites any more. 🙁 Gay. But I like the story…even though I’m sure it will end badly. Hopefully I’ll get to play some more tonight. Hopefully it’s longer than ODST…I think the big reason that I liked the original was that it was pretty long…and didn’t get boring.

Wish me luck.

10/19/10 - People

Well, I’m sure that most of the people on this site have had this experience at one time or another. I’m a decently high executive at my company. When I work in the field, I’m second only to the Superintendent. And I just turned 28. My field is predominatly dominated by “good ole boys” that have been doing this stuff most of their life…so who is some kid to tell them that something isn’t right or that there’s a better way to do something?

I’m not saying that I know everything about my field, far from it. The more that I work and the more that I learn, the more I realize that I don’t know dick…however, I am licensed to professionally practice the design of moving parts, practice the analysis of materials, design HVAC systems, design and troubleshoot hydraulic systems, and know more about math, physics, and material properties than most. I even managed to pull off a 3.6 GPA in college for Mechanical Engineering while drinking a fifth+ of vodka every day and barely trying when most of my fellow students were flunking out. Point is, I might know a thing or two about some things.

It frustrates me to no end that some of the “old” people that I work with don’t understand things that I learned as a freshman. Example, when I lay out mathematical proof that they are wrong and don’t know what they are talking about, they don’t care and brush me off because they don’t understand.

Basically I feel like I don’t get any respect because I’m only 28, not gray haired (or bald), and (seriously) have made it through college. It’s like with a woman. At some point you just have to wave your hands in the air, say fuck it, and tell her she’s right. Remind me not to be like this to people my age when I get old.

10/16/10 - Collection Lists and Beads

Well, I went through yesterday and re-formatted my NES licensed colleciton list. Before I had my dupes listed on a second line, but since I’ve decided to see how far I can get on my second set before I finish my first one, I basically just moved them so that they were side by side. I also noticed that on a bunch of games I have 3 and 5 copies of each one, so I highlighted the extras for pruning whenever I get time.

This jives pretty well with my shelving scheme that I’m going to fix up (again, whenever I get the time). The Billy Bookcases are deep enough to have 2 NES boxes deep with only a 1-2″ overhang. That will allow me to put about 35% more games in the same space. And right now space is the key.

I also want to order some beads to complete some of the projects that I’ve put together recently. I got Yuna together, it wasn’t too bad. I asked the callahan13 or whatever her name is for a list of the colors that she has. That made it a lot easier to figure it out. Not too big of a deal, but makes ordering easier.

10/14/10 - Yuna 3

Well, here she is, all finished. Not a bad rendering, if I do say so myself. I’ll likely consolidate a few colors just to make life easier. And I even finished her skirt where some doucher cut it off. 🙂 Well, hopefully I’ll get to build her before long. It would be so awesome.

10/13/10 - Yuna 2

Well, here she is in all her false color glory. Just need to go through and change the colors back to actual and my pattern is done! 8==D

10/12/10 - Yuna

Well, I started thinking the other day, “What could I make out of beads that would be freaking epic and piss my wife off at the same time? Well, i searched around a little and I found something: a 6′ tall Yuna from FF. 😀 Yuna and I have a bit of a special relationship. She helped me through some shit and, well, we’ll leave it at that.

Anyway, I searched around and found this image:

I thought that she looked very nice in that pic, so I decided to start with it. Next would be cropping the image and then resizing it so that she is 6′ tall when built. Well, beads measure about 3/16″ (or ~5/inch) when finished. So, you do the math and come up with this size of an image:

Well, there obvoiusly aren’t a billion colors of beads, so we have to do a little creative changes to “dumb her down” a little bit so that she can be built from the colors avalable. I usually do something like this:

You can see the false color that I use to keep track of what’s what and that after I pixilize her, she has smooth curves that will work good with beads. She’s not complete, obvoiusly, but I’m making good progress. I’ll post updates when I get finished and when she’s built, but for now, just sit and drool.

Peace.

10/11/10 - 10 Left

So, I now have 10 to go to my loose licensed set. Just put a bid on another cart that ends in like 4 days. We’ll see what happens.

I wish there was a “bitch slap” button on NA. Some of the younger users just need a little STFU notification every now and again. But, alas!, we are mods and bitch slapping is not cool.

I found this completed bead art project on gamergrrlz.com. So, I spent some time and made a pattern for it because I love RE. I think that the pattern turned out pretty good considering how big of a pain in the ass this “reverse engineering” crap is. I also did this on a yoda black and white image that I got off brickworx.com or something. It was a bitch.

10/8/10 - Anal Beads

http://www.etsy.com/listing/58316436/mario-nintendo-costume-for-dogs?ref=sr_gallery_34&ga_search_query=nintendo&ga_search_type=handmade&ga_page=2&order=&includes%5B0%5D=tags&includes%5B1%5D=title

http://www.etsy.com/listing/58322343/luigi-nintendo-costume-for-dogs?ref=sr_gallery_27&ga_search_query=nintendo&ga_search_type=handmade&ga_page=2&order=&includes%5B0%5D=tags&includes%5B1%5D=title

My wife likes these.

Anyway, I’ve not been working on my game too much in the past week or so. I did get all but like 8 tiles entered into tile molestor though. So when I do get back to it, I’ll have a good start.

I have been making bead art patterns in my spare time. I pretty much ran out a while ago, and that blows. I’ve had a little extra time here at work lately, so I’ve been making them. It’s a lot easier to mess around with a text file than it is with a picture, so I’ll probably get back to the game soon. I’ll post pictures when I get them built, it’s more exciting that way.

I also ordered the bricks off Bricklink to make 3 lego mosiacs. They are:

INSERT PIC 1

Well, the others aren’t in my photobucket and I’m too lazy to upload them. But it is the title screen from Zelda 1 and the logo for ST: TE.

But you can see some neat bead shit here:

http://nintendoage.com/forum/messageview.cfm?catid=7&threadid=34953

and lego shit here:

http://nintendoage.com/forum/messageview.cfm?catid=7&threadid=25049

9/28/10 - More on Level 2

Well, I’ve been working on Level 2 for a while now. When I started ripping that picture that I posted before apart into it’s meta tiles and then tiles, I ended up with about twice as many tiles as I could support. 😛 So, I had to go back and simplify stuff somewhat, move stuff around so that tiles were duplicated more, cut a couple things. Still looks okay, just kind of not as busy as before. I’m going to add some CHR-RAM stuff in this level, like twinkling star scapes and maybe counter rotating sections. Hopefully it will look okay. We’ll see. But now I’ve got it all set and organized. I need to:

1. Program shit into Tile Molestor.

2. Set up meta tiles and add in collision stuff.

3. Program the rooms.

4. Fix it to run level 2…if it won’t load it already. It should be a matter of updating the pointer tables, I hope.

5. Add in another climbing code. Pretty much the same as before, but he’ll be facing towards you, not away as before.

I think that’s it. Then on to level 3.

Later:

Well, I thought about it and I remembered that when I set up my PRG-RAM stuff, I must have been having a brain fart because I set it up so that I had to load a complete row of tiles whenever I was loading a BIG (i.e. more than like 4 tiles or when your Y register will wrap around back past zero) section of graphics. A while ago I fixed it so that I didn’t have to load an entire bank of code with each level (based on bunnyboy’s NN about 16 bit math, the carry flag…who knew?) but I could never figure out how to make it load a given number of tiles. Well, about 3 seconds after I looked at it this time, I easily made it work. Makes one feel retarted. For the code savvy:

graphicspointers:
.word OverworldSprites,OverworldBackground,Level1Background

;;;;;;;;;;;;;;;;;;;;;;;;;;

inctileloaderptr:
LDA tile_loader_ptr
CLC
ADC #$01
STA tile_loader_ptr
BCC .next
LDA tile_loader_ptr+1
ADC #$00
STA tile_loader_ptr+1
.next
RTS

;;;;;;;;;;;;;;;;;;;;;;;;;;;

LoadCompleteBank:

LDA #$0D
JSR setPRGBank

LDA #$01
STA updating_background+1

JSR turn_off_graphics

LDA graphicspointers, x
STA tile_loader_ptr
LDA graphicspointers+1, x
STA tile_loader_ptr+1

LDY #$00
LDA $2002
LDA [tile_loader_ptr],y
STA $2006
JSR inctileloaderptr
LDA [tile_loader_ptr],y
STA $2006
JSR inctileloaderptr
LDA [tile_loader_ptr],y
STA tile_loader_stop
JSR inctileloaderptr
LDX #$00
LDY #$00
.LoadBank:
LDA [tile_loader_ptr],y
STA $2007
INY
CPY #$00
BNE .next
INC tile_loader_ptr+1
.next
INX
CPX #$10
BNE .LoadBank
LDX #$00
DEC tile_loader_stop ;# of tiles to stop on
BNE .LoadBank

LDA temp_bank_number
JSR setPRGBank

RTS

Keeps it clean and saves you from having random shit pop up after your CHR file is emptied but before that last row is entered. Just make sure you use $00 (not $FF) when you want an entire bank or you’ll leave off the last tile.

9/25/10 - Taking it To the Next Level!

Well, I “completed” the art for the next level based on concept art I drew a while ago. Note that there will more than likely be some changes like the plain black will change to a starscape, and the “square” climbing blocks will be the orange/green/blue pallett I think. It looks boring like it is. Not a bad job, I think myself, but it compressed the shit out of it when I uploaded the pic. Any thoughts or suggestions are welcome…PM me.

9/21/10 - More on Climbing

Well, I had a thought last night. I had it set where when even one very far side of him hit a climbing block, he posed for climbing. I didn’t really like that cause you could almost float off to the side before he’d let go. I changed it to where both the right and left side of him have to be in contact with the ladder to make him climb. It still floats out to the side, but it looks a lot better.

Another problem I noticed is that when he gets to the top of a ladder, he goes up and falls back down. I may have to add a couple more ladder pieces in to make it a little more “right looking”. Like, rather than going up and stopping the ladder at a platform, make him go up one more meta tile or something. It just looks stupid like it is now.

We’ll see. Now, I need to get to work. 😛

LATER: Well, I added the stuff that I described above. While it looks better, it didn’t solve the flashing problem. So, I basically added a function that would override his graphics if either the upper left and right corners or the bottom left and right corners were on the ladder. Before it was only one corner, then 2 corners. It works good now!

Note to self: You’ll spend hours debugging if you fuck up and delete the “branch back to the front of the loop” part of a loop when fucking with climbing…. I can’t believe that I did that. 😛 I have such a headache.

9/20/10 - Random Shit

Today’s been pretty productive. The dude can now die in levels (kind of a bitch to make work). The whole death routine wasn’t really set up for anything but the overworld. But it works now…and will reload from your death point. After I got this working, it was a simple matter to add an opcode that set your health to 00 and killed you if you hit the wrong thing.

I also got a new Jump Icon from Dr. Robbie. Looks pretty good. I was thinking something like this anyway. He saved me the time of screwing it up a few times. 😛

Next, I will add the climbing stuff. Could be a bitch again cause I’ll have to override gravity and platformer input when he’s climbing….

E: Climbing now works. 😀 It was actually pretty simple. Add a flag set by a climbing op code, tell the up/down directions to start working and not just over riding the “look direction”, disable gravity, disable jumping, and make sure that he can still shoot. Then set the graphics over rides. Works like a champ.

9/18/10 - Finally Back To It (Hopefully)

So, I’ve written about a million write up thingies that no one actually reads and about burnt my self out on them. Then yesterday I went and wrote an ezine article on my design of Level 1 from back whenever. The ezine has been lacking in content lately. Not to say that the articles that are there aren’t good, there’s just not too many of them. You peeps should get off your asses and write an article or something too. Help the site out as it were.

It’s been so long since I had time to sit down and program anything that I can’t remember exactly what I was doing. I think that I was adding in opcodes to my collision routine to make a couple things in some levels work…but I can’t remember. I believe though that I needed to add a climbing the ladder code to use sprites that a buddy sent me, an instant death code for spikes or lava or quick sand or whatever. and then I just noticed that when B is used for jump in the platformer levels, it still has the banhammer in the button spot at the top. I think that’s all I needed before I started adding sprites.

However, I am having a pickel here about how to proceed. The farther I get, the more I realize that I didn’t really set up an engine to run all the different levels, just the overworld. So, now that I have some sort of level switching device set up, I think that I am going to get all the level graphics in there before I start adding in sprites, bosses, music, etc…or at least a couple so that I can make it work right the first time and not have to go back…again.

We’ll see. Wish me luck!!

UPDATE: Well, I added in an “opcode” engine kinda like metalslime’s music op codes. I can use a shit ton of op codes and a shit ton of them in each meta tile. It’s a little more complicated, but it works…and works well. Poweryay. Now I need to add a few more op codes and I’ll be set.

9/10/10 - More Write Ups

Well, I done posted another write up! One of you sons-a-bitches post in there. I feel like no one is reading them!!

9/8/10 - Wow, almost a month.

Holy shit, I’m lazy. It’s been almost a month since I updated this. Ufda.

Anyway, just posted #4 in my Game Engine Series. Sprite Collisions. Nothing too complex, but if you’ve never done it before, it’s a bitch.

Good luck. Hopefully I’ll find time to get back to programming soon. I’m just lazy/busy with work. 🙁

8==D

8/11/10 - Campout

So, I’ve popped out a couple more write ups while I’m procrastanating. I have about 7 more planned, but who knows when I’ll get around to them. It is a very time consuming process.

Anyway, I’m severly bummed about not being able to attend the campout this year. I bet it will be a blast. But, I’m kinda poor and it would be almost impossible to get away from work right now without feeling guilty the whole time at the very least. Oh well. I hope that everyone has fun and all that.

Maybe next time!

8/3/10 - Various Thingies

So, for the past couple days I have been exparamenting with different jump routines and I think that I settled on one. It is just a little longer and he doesn’t take off like a rocket any more. I’m happy with it.

I also went through and made some easy changes to the background in the maps. I had a couple places that were almost impassable so I put some stuff in to make it easier. The bad ass thing is that with the collision engine, all you have to do is change the meta tiles around and it fixes the collision detection. 😀 Bad ass! And I had a couple random meta tiles out of place and a couple solid/hollow settings that needed tweaked.

Looking forward, I already implimented looking up/down with sprites I got from WhatULive4 and I need to make him shoot in that direction. Then I need to make the jumping sprites that he gave me override the walking animation when Nightman is jumping. Then I need to add the instant death deal in my collision routine and then the ladder climbing as well (sprites also from WhatULive4). After that, Nightman should be set. Then I got some sprites from casperdj777 for some enemies…a LOT of sprites. So I’ll have to add them in. Only thing that I’m worried about is running out of processing time….

Oh, and I think that after nightman is finished, but before I add in enemies, I’ll work on sfx and music. I have been procrastanating.

Later: So, bigjt_2 helped a brother out today with a bug that I didn’t even really notice. Reset didn’t work. He helped me reorganize my code to get it to work correctly. And I didn’t even have to fuck with any bank numbering. Just cut and paste, change a couple .org commands, and reset the mapper header (directing it to go from $8000 fixed to $C000 fixed). It works, thanks man!! 😀

Later Still: He now shoots up/down correctly. The jump graphics now over ridden. Instant death shouldn’t be too bad. Basically if whatever bit I use is not zero–>set health to zero…then you dead fucker. The ladder thing might be a little more involved. I’ll have to add an “input processor” to handle the different input. Nothing too complex, just time consuming if I forget another fucking RTS.

7/31/10 - Physics and shit.

Okay, so, after I got my thingie working yesterday, I was so happy that I went home (i.e. splooged all over my keyboard). So, today I worked on expanding my game play.

First, there was the little issue of Jumping/Falling physics. If you just put a constant in there for jump/fall, then it looks pretty fake. You have to make it a variable amount and that requires some creative code. So, I basically set the jump speed to a constant and made the gravity change. The gravity resets back down to one PPF (pixel per frame) when he impacts the ground then through a look up table the values change according to my directions. I’m not all the way happy with it yet. I like the height, but I think that I need to at least double the time it takes to get to height. He like shoots off like a rocket. Anyway, pretty simple:

gravity_values:
.db $01,$01,$01,$01,$01,$02,$02,$02,$03,$03,$03,$04,$04,$04,$05,$05

gravity_set_up: ;adds physics to the jumping and falling
LDA gravity_timer
CMP #$0F
BEQ .done
INC gravity_timer
LDX gravity_timer
LDA gravity_values,x
STA gravity

.done
RTS

Next, I was faced with the problem that the dude was jumping like in SMB3 when you just get to boing boing boing around the coin heaven thing. So, I just installed a quick code byte in the B-Button handling where it won’t go through the jump code if the jump limiter hasn’t been reset by the ground impact.

Finally, I noticed that he always jumped the same height…like if you tapped the button or held it down. So, I added some code to make it so that if you let go of the button, he would stop. Again, pretty simple:

Read_PF_B:

LDA B_timer ;make the jump stop short if you stop pushing the button
BEQ .next
LDA joypad1
AND #%01000000
BNE .next
LDA #$00
STA B_timer
JMP .ReadBDone

.next
LDA joypad1_pressed ; player 1 – B
AND #%01000000 ; only look at bit 0
BEQ .ReadBDone

LDA B_timer ;check and see if the mace is still out
BNE .ReadBDone

LDA Jump_Limiter;check and see if he can jump again
BNE .ReadBDone

LDA #Btimer ;reset the timer if it was not pressed last time, but is this time
STA B_timer
STA Jump_Limiter

.ReadBDone: ; handling this button is done

7/30/10 - PROGRESS!!

So, here’s what I did to get around the little issue that I mentioned in the previous entry. I’m still getting a couple bugs, but we’ll get them worked out. Suffice it to say, he is no longer able to step into walls and hang in mid air and he doesn’t get stuck in one place when walking on solid surfaces.

Basically, I ran through the existing collision info finding routine. Then ran the collision set for the L/R data. After that, I ran the gravity routine then the jump routine. Then I jumped back up to the collision info finding routine and re ran it using the updated L/R and Jump/Gravity numbers. Finally, I ran the Up/Down collision and it worked great. Takes twice as long, but who’s counting.

In the top down view (minus music) I only used about 1/4 of my processing time at the busiest point. So, this uses about 1/8 to run collision and Nightman sprite updates…now if I can work the bugs out. I think that the issue is where it runs the behind background stuff. Time to explore. I’m happy. 😀

UPDATE:

So, all I had to do was move the infront/behind background routine into the second loop and it fixed the problem!!

PEACE!

7/28/10 - Gravity

So, I when I said it worked, I meant for the top down view, i.e. up/down/left/right, only one direction at once. However, when I tried to make it platformer, you have to check the collision for jumping/gravity and right/left walls all in the same frame. I’m having all kinds of problems trying to impliment this. I think that I could figure it out, I just haven’t had any time to sit down and hammer it out.

Basically, if you check the u/d and l/r in the same frame, it makes funny things happen. For example, if you jump into the wall, he technically has to overlap the wall by one pixel before it will detect it and rebound. But in that one frame where it is overlapped, the collision coordinates for the up/down are INSIDE the solid object. As a result, the fucker will stand on the walls or hit his head there.

I think that I just need to mess with my indices. But more than anything, I just need time.

7/1/10 - IT WORKS!!

HA HA! It works. I’ve finally invented something that works!!!!

Seriously, it works. I entered a simple test while walking up. When it hits a solid surface going up, it sets the sprite position to #$80 (a random number)!! It works on like every room!! Hard coding can suck it! Now I just have to come up with some table or something that will set him to the right place rather than the random number.

But it fucking works. I swear, I impress myself. 8==D

e: Well, I got it to work correctly in all four directions. 😀 Hot damn. Now I just have to do some of the fancy add ons and I’ll be in good shape. I also have to set the position loading routine…I forgot to fix that before.

7/1/10 - Continuing on with Collision Detection

Okay, well, I have been successful. Just FYI, if you put a pointer in like this:

LDA [ptr1]

rather than like this:

LDA [ptr1],y

it will assemble, but it will make your program freeze up. There goes 20 minutes I’ll never get back.


Back to it. This may be an iterative process, but this is how I’m starting. If you look at my tutorial in the “Programming Resources” Thread on background compression, you might be less confused with the pointers and variables I’m using. They are more or less the same in my actual game as in that tutorial (except that fucking bug only shows up in the tutorial). So, here’s the code that I added at the bottom of the stuff I posted yesterday:


LDY #$00
LDA [collideptr2],y
AND #%00111111 ;load the correct meta tile bank
ASL A
TAX

LDA #$05 ;load the bank for the meta tiles
JSR setPRGBank

LDA meta_tile_sets,x ;load the meta tile set pointer
STA meta_tile_sets_ptr
LDA meta_tile_sets+1,x
STA meta_tile_sets_ptr+1

LDX #$00 ;start out at zero

.load_collision_data:

LDA collide_metatile,x ;load the meta tile found earlier
ASL A
TAY

LDA [meta_tile_sets_ptr],y ;load the pointer info for that metatile
STA meta_tile_ptr
INY
LDA [meta_tile_sets_ptr],y
STA meta_tile_ptr+1

LDY #$04 ;load the collision data from the meta tile string
LDA [meta_tile_ptr],y
STA collide_data,x ;store it for later use

INX
CPX #$04
BNE .load_collision_data

Pretty simple. Note that this assumes that all meta tiles for that room are in the same meta tile bank!! Well, this all does or the happy little index finder up there won’t work correctly. Basically, we’re finding the collision data that we will use later. You can see from the look up that your meta tile data would look like this:

MetaTile1:
.db $XX,$XX,$XX,$XX,%collision detection info,$op codes(if any)

This means that all the stuff to date can be the same, but we just added a new entry. This saves us more look up tables and lots of space! Spiffy. Anyway, here’s how it goes down. We need:

-Opcodes
-In front/behind background graphics
-Is everything dead flag? (so that you can have some blocks that will be solid while fighting and you can pass through them when you kill shit)
-solid/hollow up
-solid/hollow down
-solid/hollow right
-solid/hollow left

Okay, so everything here is yes/no…1/0. 🙂 Bit testing comes to mind. %00000000 Simply assign, in this order:

-1-opcode/0-none (we’ll deal with this after we get the main program working)
-blank entry
-1-infront/0-behind
-1-check for dead/0-nothing
-1-solid/0-hollow up
-1-solid/0-hollow down
-1-solid/0-hollow right
-1-solid/0-hollow left

This gives us one byte for all this stuff. The above code pulls this byte from the meta tile data using the entries found yesterday!!!

Now, what the hell do we do with it…good question.

6/30/10 - Part 2. New Collision Detection

All right, so far this shit’s working. I won’t go into details now, but I’ll post along as I go so that maybe someone, you know, the one person that reads this, will benefit from it. 😛

I am making a new routine for collision detection cause I don’t have room (or time) to hard code everything. To start, I made a routine that calculates the position of the sprite on the background. It then takes this data and looks up what meta tile that corner is over on the background. It does this with all 4 corners. This will make more sense as we go along, but for now, this was my biggest fear, not being able to make it do this. But it was pretty easy. On to the next step. But, here’s the code:

Blank_Collide:

LDA #$00 ;clear out the indexes
STA upper_left_index
STA upper_right_index
STA lower_left_index
STA lower_right_index

.sprite_transferBGCD:

LDA sprite_vertical ;transfer correct collision box coords
CLC
ADC #$02
STA collide_vertical
STA collide_vertical+1
LDA sprite_vertical
CLC
ADC #$0F
STA collide_vertical+2
STA collide_vertical+3
LDA sprite_horizontal
CLC
ADC #$03
STA collide_horizontal
STA collide_horizontal+2
LDA sprite_horizontal
CLC
ADC #$0C
STA collide_horizontal+1
STA collide_horizontal+3

LDA #$04 ;load the bank for the room data
JSR setPRGBank

LDX #$00

.find_collision_meta_tiles
LDA collide_vertical,x ;find the index for the upper left corner of the sprite intersect
SEC
SBC #$40 ;take off the HUD
.loop
CMP #$10 ;use the vertical position to find the first part
BCC .next
SEC
SBC #$10
TAY
LDA upper_left_index,x
CLC
ADC #$10
STA upper_left_index,x
TYA
JMP .loop

.next ;include the horizontal portion
LDA collide_horizontal,x
.loop2
CMP #$10
BCC .next1
SEC
SBC #$10
INC upper_left_index,x
JMP .loop2

.next1
TAY ;find the opposite corner
LDA upper_left_index,x
STA upper_right_index,x
TYA
CLC
ADC #$09
CMP #$10
BCC .next2
INC upper_left_index+1,x

.next2
INC upper_left_index,x ;include the bank data entries in the table
INC upper_right_index,x
;our index should be correct now
.load_meta_tile_data

LDY upper_left_index,x
LDA [collideptr2],y
STA collide_metatile,x ;store the meta tile info

LDY upper_left_index+1,x
LDA [collideptr2],y
STA collide_metatile+1,x ;store the meta tile info

INX ;repeat for top and bottom
INX
CPX #$04
BNE .find_collision_meta_tiles

RTS

6/30/10 - Random Stuff

Well, I got the HUD in working order for Level 1 and added some text to the black screen that says “level 1”. It takes a long time to do such little updates. I think that my main problem is that it’s been a while and I have to decode my code before I can do anything. It’s all commented, but there’s just getting to be so much of it that it’s hard to find shit. Especally when I can’t remember what the hell it’s called.

Oh well. Nightman is active in the new level. He doesn’t really act like I want him to, but I can change all that later on after I get a little further down the road. Now, I think that I will start exparementing with collision detection. I’m just not exactly sure how to incorperate gravity. 😛

6/29/10 - Small Level 1 Update

Well, not a big update. I posted another update in my demo thread of my progress. All I really did was add a new gamestate for the Level 1. I basically used the movement for the overworld but changed the wall collision/room switch activation for edges rather than the room walls. Not too terribly difficult, but I basically hard coded in the wall collision so basically it checks to see if he is at the edges then jumps to a blank collision detection routine. However, now that the thing loads and life is good, I can start to mess around with collision and stuff. I do need to get the HUD working. Shouldn’t be too hard, just have to figure it out! Enjoy the demo video.

6/28/10 - Super Mario Bros.

So, I just spent an hour and a half going through a disassembled version of SMB. I was looking specifically at the collision detection to see how they did it. I am happy to say that I have no fucking clue how in the fuck they made it work. I really can’t see where they ever call data from a table that specifies solid/open or even where in the fuck they modify the player’s position.

I will say, however, the fact that they were able to stuff that much game into 32KB of PRG space is a testimate to the programmers. Bravo.

Well, I suppose that I should keep trying. However they did it was pretty elegant. I’m really confused by the fact that I don’t see half the table headers or calls for RTS. Whoever dissambled it left about 5% out, but did an amazing job.

Back to it. 8==D

6/16/10 - Slackerdom!

So, I’ve done nothing to further my progress on my game in a long time. I have been busy at work and made the mistake of opening my copy of ODST on Monday night. That game is pretty cool, but then I like all of the Halo series.

In a few weeks here I will be banished to field work for “an indeterminate period of time”. When that happens, I will be either totally swamped or bored shitless. Judging from the job, there won’t really be a need for a Project Engineer, so I’ll likely be licking my nuts the whole time. So, I’ll program.

We’ll see. Depressing, this hold up buisness.

6/8/10 - Free Work For All!!

So, I get this request from a higher up dude at a popular gas company (that ends in ???) yesterday. Homeboy says that he needs an estimate for a 240 mile long crude oil pipeline in Ohio. I get a package in the mail with the route on it…literally one of those $1 fold up maps that you find at a 7-Eleven with a fucking line drawn on it…. Seriously? He says that he needs an estimate of the cost to build this project and says that he needs it in a day or so. I’m like, “wow”. Normally something this big would take us a month or two and cost on the order of 10k. So, I’m in the middle of half-assing it. No site visits, no take offs, no real work except throwing some crews at it and calling it good. We’ll see how he likes that. All this for FREE. But, we can’t piss this dude off cause then he’d throw us off the bid lists for future projects, and in the past few years, they have been pretty active.

The point is, no me time. 🙁

6/7/10 - Time Flys

I haven’t really had any real time to work on anything in a while now. My work comes in waves. For several weeks there I had literally nothing to do. But for the past 2 weeks or so, I have been “swamped”. Therefore, no dev time. 🙁 But, at night I have been steadly working on music. It is a slow process, but I’m comming along.

Oh, and I also recruited a musician to help me. He seemed pretty excited at the prospect, and his past work is pretty impressive, so I look forward to his results.

Hopefully I will have time to work on my game this week. It is depressing to not make progress. And I just can’t seem to find motivation on the weekends.

6/1/10 - Insert Entry Here

Well, the damn thing did it’s reload act in the middle of an entry again. I had even been copying the text as I went along, but it wouldn’t paste it after it reloaded. So, fuck it.

5/25/10 - Level 1 Background Debugging

Well, Level 1 now loads and all that. I input everything in so that it works. I just spent a while debugging each room, and let me tell ya, attribute bugs are the worst. Might just be me, but I have a hard time getting them out.

It doesn’t work yet, more of a push start and it loads one room, but it loads whichever room I tell it to. I inserted a simple modification into my overworld room loading routine, and it seems to work for whatever level I see fit to deposit in it. Before I had it coded to read addresses from a table that would then point to the graphics data for the specified room. I added in another pointer that uses the current “level” (overworld being 0, level 1-1, etc) to point to the right address table, then that table uses the room index to pull the address of the graphics data, then that pointer loads the data. That makes it sound too complex. Basically, I went from this:

LoadbackgroundPalettes:

LDX actual_room_index
LDA bgpalettesptr, X
STA ptr1
LDA bgpalettesptr+1, X
STA ptr1+1

To this:

LoadbackgroundPalettes:

LDA Active_Level+1
ASL A
TAX
LDA Background_Pallette_Sets,x
STA ptr2
LDA Background_Pallette_Sets+1,x
STA ptr2+1

LDY actual_room_index
LDA [ptr2],y
STA ptr1
INY
LDA [ptr2],y
STA ptr1+1

Savvy?

Now I’m faced with the task of writing an engine to run this new background. In the overworld, when Nightman hits the edges of the screen, it triggers a room switch. Here, I think that I can use the same principal, however, this level is a platformer as opposed to a top down overworld. So, it won’t work the same. It will have jumping (& therefore only one weapon button avalable) and a new set of pretty much everything sprite related. I also suppose that I need some up/down shooting views for nightman.

Strive on Bitches.

Later:

Well, the stupidest things cause the most frustrating problems. I had my program set up to go off to Never Never Land, but it wasn’t able to return. So, I set it up to return to the overworld when you pushed start. Problem was, it wouldn’t work. So, I tracked the problem down to the fact that it was resetting the #$2006 settings mid background load, but WHY???? Well, I changed my program to where it would skip the entire NMI routine if it wasn’t done with the main program (i.e. interupt aware). Before, it would only skip if it was in the middle of a subroutine…well, I missed one of the “done updating shit” flags. So…when it was finished reloading the overworld graphics to CHR-RAM, it was telling NMI that it was ready to go…thus resetting all the freaking addresses.

Long story short, after I removed this clearing of the updating shit flag, it works fine. I hate it when I miss simple shit like that.

5/24/10 - Monday 🙁

Well, somehow it is Monday again. Somewhat depressing. I didn’t do anything programming related this weekend. 🙂 I was relaxing and watching movies. I also played “The New Tetris” for N64. I bought that game at K-Mart when it came out however long ago. It has been a long standing goal to get all of the wonders cleared out. Well, I’m about 34000 lines from the 2nd to last one, then I have to clear the last one. Needless to say, the game came out like 13 years ago, so it could take some time. Someday.

On Friday (and this morning) I have been writing the look up tables for the level 1 backgrounds. Fuckin’-z this takes forever. I’d imagine that this is where most people loose motivation. The monotonus repatative crap that goes with setting stuff up. Hopefully once I get it done, it won’t take too long to get it working so that I can see some progress.

8==D

Later:

Christ, I need an intern.

5/21/10 - More on Level 1

Well, I got to trying to incorperate level one into the program…and promptly realized that it would be rather difficult to do without having the freaking data for the thing. So, I’ve got the palletts + pallette table done, the attribute + attribute table done, and now I’m working on the background meta tile tables. After I get them done, I’ll have to make the background table (by table, I mean look up table for setting up pointers) and then I’ll have to get the thing to load the CHR file that programmed in so that I can build the meta tiles into the program.

My only issue is that I’ve envisioned a new collision detection ENGINE that will basically run using the meta tiles and then the background tables (i.e. no seperate tables or hard coding :D) but to make that work, I can’t have any meta tile bank switching throughout (at least within the room) and it pretty much exes out the whole repeated meta tiles in the compression routine. So, this whole programming in the background info is taking me some time.

Also, at night (since I can’t have little 8-bit beeping at work and my fucking headphone on my computer doesn’t work for whatever reason), I am working slowly on music. However, it has been so long since I messed with music stuff at all, it is slow going. But we’ll get there.

5/20/10 - Pissed!

I just typed a nice neat entry and the fucking thing reloaded the page and erased it all!!!!! This is the third time it has done that shit in the past couple weeks. I’m pissed. If I cool down, I will rewrite what I said. God damnit.

Later…..

Okay, still pissed about that, but I think that I will summarize my progress so far.

I have completed the “art” for the Level 1 background. I made individual files of each room and split them back into meta tiles to make “compression” easier. I also put it all into tile molestor and now my head is splitting so I’m not sure what to do next. I have the basic “game engine” in place where it will tell it to switch to the new area, but there are so many steps to getting it to work, I’m at a loss as to where to begin. One step at a time, I suppose.

Later still….

Well, I just remembered that you need attributes and palletts for new rooms. Bah! Well, it has been a while since I did this stuff. 🙂 But I think that I have a plan of attack figured out…somewhat.

5/18/10 - Level 1

Well, I got about shit full of writing for a while and ran out of music tutorials, so I decided that I should stop messing around and do something. So, I started level 1.

Now, this so far is going a hell of a lot quicker than the freaking overworld building went. I have a theory on this. When I did the overworld, I didn’t know what the fuck was going on. 😛 This time, I started “correctly”. I built blocks (meta tiles, for those of you who read my tutorial) and am building the overworld from there. The result: I have like 25 meta tiles and that seems to be all I need. The level is coming along quite nicely. This will also aid (by “aid” I mean allow me to do it correctly) in collision detection.

The basic idea behind this is that it is something fun to do while stoned. Here is a “preview”. 😀

5/17/10 - Another Programming Write-Up

So, I just spent like for-freaking-ever making another small program and writing a narrative for a Programming Write Up. This was on sprite movement, animation, and meta tiles. I don’t know if it will be all that helpful to people, but it was something to procrastanate to anyway.

Well, I’m on number 8, I think, of MetalSlime’s tutorials…best be getting back to it.

5/16/10 - Life

Well, the past couple days have been interesting…. It’s amazing how quickly such little things can be blown completely out of proportion. Hopefully we can get past all this drama and on with life. I can’t tell you how depressing and turning-off-ish it is towards programming to have a public war over something like this.

Okay, let’s put that crap behind us.

I am wandering around on sunday here not knowing what to do. I have another idea for a programming write up that I feel would be beneficial and also I would like to mess around with the sound stuff here at home….decisions decisions. Maybe I’ll just go watch a porno.

5/14/10 - Spit and Polish

Well, today I got a good suggestion on what “special skill” to give the crewman dude in my game. Basically, when Nightman gets close to him, he will speed up and run the other way. 😀 It is pretty funny, actually, especally when there are several of them in a confied room. They bounce off the walls and stuff. It actually looks like they are running away from him. I’ll post another video if I think about it.

But except for the store (which I’m still waiting on graphics from a certain walrus for), the overworld is effectively done. (minus sound)

Also, I just finished MetalSlime’s 4th sound tutorial. Interesting stuff. I understand most of it so far. It is going a lot quicker than when I was lost through the original series. I do, however, now understand the whole “drawing buffer” thing and I might try it. Back up my program and give it a go and see which version runs better and exactly how much…ua…time I save with it. It’s pretty much buffered now, just in different subroutines. We’ll see how motivated I am. Pretty slick though.

I’m trying to be thourough with this sound engine stuff. So it might go slow…and it’s a little tough to mess with sound at work. 😛 Especally since my earphones won’t work for some reason.

5/13/10 - What do I do now...?

Well, I pretty much polished off everything that I wanted to do in the overworld. (With the exception of one thing that I might do and one thing that I’m waiting for art on.) I’m not exactly sure what to do now…. I could start on art for my next level or work on music. I’ll have to think about that one.

5/12/10 - Computers 2

This might be another one of those entries that I update as the day goes on…anyway:

1. I kicked the issue that I was having right in the testicles. I have been trying to set up my program to load stuff for the computers as I stated yesterday. I was having a problem that it would frac out…every freaking time. But I dicked with it for a while and finally humped it into submission. It works, well it will load a blank screen (like it is jumping to a level or a cut screen) then it will reload the screen with nightman still in the same place (like he is returning from a successful completion of a level). Now I need to add the routines for each different computer and I’ll be set.

2. I suppose that I sould explain the term “frac out” that I keep using. AFAIK, I have never heard this used in programming. In Horizontal Directional Drilling of pipelines and cables or whatever, a “frac out” is when your drilling mud (the lube between the drill bit and the material you are drilling through) forces its way to the surface and spill out onto the ground. Not a big deal as it is pretty much just a fancy mixture of water and rock, but it really gets the tree hugger panties in a twist. But, when a program craps on its self, I usually refer to it as a “frac out” cause why not, right?

3. Sivak just said he might start work on BK 2…that…would…be…so…awesome! Can’t wait.

4. Well, I got it to load script like I wanted…and in the place that I wanted. However, I had to more or less write an entire cut screen engine to do it. (Now that I think about it, BunnyBoy put out a script game a short time ago…might have helped to review that before I started…oh well). It wasn’t that difficult. It uses most of the same bit testing and pointer routines that the compression routine uses. If interested, just ask! But now, I have 72 unique computers to write stuff for…crap.

Oh, and I also made a “random” routine. Computers are only “active” at certain times (i.e. certain features are only accessable between level 4 and 5 [for example], when you have a full kill counter, etc.). So, I made a routine that will randomly assign an action to an “inactive” computer based (again) on some random timers in the game (or which way certain enemies are facing when you kill them).

5/11/10 - Computers

Well, I’m sure you’ve noticed the “computers” in my various demos. These are the portals to levels, secrets (;)), required items, and the store. When I finally got to these, I was somewhat perplexed. While the computer rooms are sometimes repeated, the functions of each computer is not…therefore, I have to make a seperate routine for each freaking room. This involves a complete pointer table in the room loading routine (like I talked about before) and instructions on what to do with it’s self if it is impacted by a computer hit. Hmmmm….

Well, I haven’t posted a complete map, but you’ll notice that there are 8 positions that a computer can appear (4 across the top and 4 across the bottom). There are also 8 bits in a byte. It follows that we can analyze Nightman’s position and write to which ever bit he is located at (or zero if he is just chillin’ elsewhere). This will make it easier to analyze the data and instruct it on what to do. It also makes one routine for all rooms so that the unique room routines can be ~short.

I guess I’m procrastanating…this is as far as I currently am…….damnit.

5/11/10 - Nerdy Nights

I just posted my second Nerdy Nights tutorial, Background Compression. As you have read from the blog, I’m a bit of a noob…so we’ll see what people think.

I don’t think that people truly appreciate the time and effort that goes into writing those things. It took me about 6 hours to construct that program and write the essay. However, I had a “request” for it, so hopefully it helps a couple people figure out a little programming.

I think that I forgot to post yesterday, so I’ll make a quick summary…I constructed the remaining HUDs that I will need for my various levels, added a couple tiles, and compressed the HUD. I also reorganized my tile set a little to allow me to have a “10” tile (as opposed to using “A” for 10), moved the A around in the meta tiles and all that. I also reorganized a little so that I can reuse the tiles for the Numbers, alphabet, and the HUD tiles (so I don’t have to have them in the various banks). This involved searching through my meta tiles and changing the entries that went along with the freaking tiles that I moved. Let me tell ya, fucking Notepad needs a “find and replace all” feature. Finding each one and pasting over it is somewhat tedious.

After that, I moved the HUD information out of the main bank and added the appropriate bank switches…then I did the same thing with the sprite graphics data. I should have done this as I went along, as finding all the freaking places to past bank switches (and then which bank to switch to, is a bit of a pain…I guess I should soft code that as well).

I have a couple more things to add…then I’m done with the overworld! I finally get to explore music.

5/8/10 - CUMSHOT!

So, today I got my “cumshot” working. Basically, this is what McBoobins shoots at Nightman. 😀 Somewhat complicated, but not too bad.

I also posted some YouTube demos:

http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=25663
From the thread:

11/12/09
Lookin’ good. Don’t steal it or I won’t post any more as I make progress. Don’t ruin it for everyone. Should work up through the neck of the ship. Still needs some debugging. Use Start or Select to open the doors.

Thanks to all the people who have been helping me along! You guys rock.

12/16/09
UPDATE:
Added randomly moving enemies and collision detection. Still doesn’t do much, but I recently acquired some sprites, new ideas, and animation tips. We’re moving along! It should crap out in the same place as the last one. Don’t want nobody peaking!

5/8/10
UPDATE:
I made some YouTube videos of my progress.

6/29/10
UPDATE:
Another YouTube video of Level 1. VERY beta.

2/1/11
UPDATE:
YouTube vide of Level 2. Still minus sprites:

2/25/11
UPDATE:
Level 3 runs. New ninja wall grab and cealing hang features.

5/7/10 - Nightman Sprites Updates

Well, I was trying to impliment a subroutine that made Nightman flash or change sprites to something else when he was hit. I ran into the problem described yesterday. After I fixed that, I found that the sprites were only being updated when the timer hit the flags for the 4 different animation frames. AND this timer was only changing when he was moving. So…to make this new routine, he needed to be updated every frame. There was nothing wrong with the way I had it, but this way makes it look cleaner.

ALSO, it cut the nightman movement routine down by almost 3/4 of the size…. Before there were 4 animation timers (1 for each direction) and each movement would clear the other timers and incriment the active timer. Then it would load the appropriate graphics (if it was a new frame of animation) and then update the positions (after collision detection). Times 4 different directions. Simple enough for the beginner.

Now, there is only one timer that specifies which frame is active. When you push the d-pad, it incriments the timer and the animation routine changes the frame as needed (and resets the timer after the 4th frame). When it is not moving, it still has the variable that specifys the last direction and the one that specifys the active frame. Then it will update the sprites accordingly. 😀 Kinda long to paste here, if interested, PM me.

Now I might do this to the enemies…they are constantly moving, but I think that this coding scheme is much more efficient.

PEACE.

Edit: 727 I finished adding this routine for the enemies. Overall (since I started soft coding Nightman), I have saved 14 variables and 727 bytes of ROM in the main bank. 🙂

5/6/10 - Hard/Soft Code

I didn’t accomplish much today…in the getting new stuff completed sense. I came across a point where I needed to update nightman in a way that was outside the normal updates (making him do something when he got hit). So I got to trying to do this and I realized that all of his routines are hard coded. I was like, oh fuck. Here we go. So, I spent the next while going back through and changing shit around so that it was soft coded and now other updates are more easy and there are less subroutines. The only problem is that all the look up tables and all that take a “noticibly” longer period to run. Not really a problem when the program is just licking its nuts for 3/4 of each cycle, but still.

It did, however, save me 405 bytes in the main bank. 😀

5/5/10 - More Random Stuff

1. I fixed the counter issue. I believe that it was working correctly before. I think that the problem was that I was messing up the indexes. But now it works for whatever change you make to the actual “ones” place counter (within reason, like up to 120ish).

Basically, I made the 3 digit counter a subroutine capable of supporting however many counters I needed through the creative use of “X”. 😛 So, simply say LDX #$00, JSR counter_update for the arrow counter and LDX #$03, JSR counter_update for the health counter. Pretty simple, just have to make sure that your variables are all in line when you reserve them(<–important!). If you don’t know what I’m talking about here, you need to figure it out. This will allow you to JSR shit rather than having a seperate routine for each thing and save a lot of space. You use this just about everywhere….all right, you twisted my arm. 😀 (note that #$80 is just a random number, you can use whatever, but 80 will allow you to count both ways an equal amount, i.e. +-120ish.)

update_counter: ;this updates the background tiles for the arrow and health counter
LDA arrow_counter+2,x
CMP #$80
BCS .next1
CMP #$0A
BCS .next
BCC .done

.next ;update if the third digit is greater than 9
INC arrow_counter+1,x
SEC
SBC #$0A
STA arrow_counter+2,x
CMP #$0A
BCS .next
BCC .next4

.next1 ;update if the third digit is less than zero
DEC arrow_counter+1,x
CLC
ADC #$0A
STA arrow_counter+2,x
CMP #$80
BCS .next1

.next4
LDA arrow_counter+1,x
CMP #$80
BCS .next3
CMP #$0A
BCS .next2
BCC .done

.next2 ;update if the third digit is greater than 9
INC arrow_counter,x
SEC
SBC #$0A
STA arrow_counter+1,x
CMP #$0A
BCS .next2
BCC .done

.next3 ;update if the third digit is less than zero
DEC arrow_counter,x
CLC
ADC #$0A
STA arrow_counter+1,x
CMP #$80
BCS .next3

.done
RTS

2. Well, I needed something to do when Nightman “died” so I decided that this would be as good a time as any to institute “game states”. I’ve seen this done several ways. The most simple is a bunch of compares, but if you do this with a lot, it will be stupid long. I saw Al Bailey do it via look up tables and indirect jumps…I like this way much better. Just declare an NMI pointer, a Main Program pointer, a GameState variable, and a GameStateOld variable. Then you have a simple compare at the beginning of your main program that decides if the old gs is diffrent from the current one, if so, modify the pointers. The trickest part is the indirect jumps. You can’t use JSR [Main_Pointer] as jsr doesn’t support pointers. You have to use something like:

JSR balls

;————-

balls:

JMP [Main_pointer]

This way you have a RTS flag at the end of all that crap. After that long winded explination, I have a “Pause” function. 😀 Basically it just stops everything but the reading of the start button in the program when you switch from gs 0 to gs 1.

3. I “randomized” the power each enemy hits Nightman with when they collide and “randomized” the enemy health values that are loaded when he enters a new room. Basically, there are 2 or 3 random numbers counting each frame and they reset every so often at variable times or when Nightman runs into various things. I use these counters and verious compairs or overwrites, etc. throughout the game to keep the enemies and other things “randomized”. I didn’t want this to be the same boring crap that you had to go through 100 times till you figured it out exactly right…so I am trying to keep everything as random as possible. Loading of enemy types, random direction changes, direction changes when the enemies hit walls, nightman, or weapons is random, the health and power are now random, and a number of other things all from these 3 counters. 😀

4. I forgot. 😀 Last night I had the tedious task of searching the internet for some “pole dancer” pics. I needed a template to work from for a certain thing that I have comming up pretty soon. Well, long story short, I found a PERFECT set of pics that will do nicely when I get to that point…but, man, there is a lot of porn out there. I got severly side tracked. Let’s just leave it at that.

5. I made a power icon and a kill icon for the enemies to drop (along with arrows). I also added code to support the drop, pick up, and erasure from the screen. I put a request on the forum for help with graphics, cause I suck, but so far no luck. Hopefully someone will help me out.

6. I added upper limits on the health, arrows, and kill counters. The “kills” will be used for money purposes.

7. Regarding the computers….I’m not sure how I want to do this. I think that it would be best to just have to kill everything in the room, walk up to them, and push “select”. I’m thinking about this and what exactly to do with it, but I’m not sure exactly how to do it. I’ll have to think this over. I am going to use this approach for levels, gambling, the store, and buying essential pieces of the game. I didn’t think that I would have to think about this for a while…we’ll see how it goes.

5/4/10 - Sprite Killin'

Well, I got the arrow/bad guy, ban hammer/bad guy, and nightman/bad guy collision detection working…complete with “god timer”. The time when he gets hit by something before he can get hit again. I must say, it’s fuckin’ awesome!!! I’m having a hard time not just going around and kicking the shit out of everything.

I did run into a problem though. I set it to DEC the health counter by 5 every time he got hit…so while the counter updater works when I INC/DEC by 1, 5, not so much. It is just grabbing random tiles and sticking them in there. I’m going to have to spend some time on it and figure out why the FUCK it is not working. Slightly irratating, but I’m so happy that the shit works, I might let it slide.

Now, if you’ll excuse me, I have to go clean out my shorts. 😀

5/4/10 - Brain Fart

Yesterday, I spent an hour staring at my computer screen and drew a complete blank. I mean like 18 year old blonde with fake hooters blank. I was trying to write some sprite/sprite collision detection and for whatever reason, I couldn’t remember how to manipulate the values of the sprite locations. 😛 Ahem, ADC and SEC (or SBC…can’t remember).

So, I spent the next hour searching for this crap on nesdev. I didn’t find what I was looking for, but I did find something interesting. (I remembered the add/sub thing when I got pissed off and quit. It just clicked. It seems to happen a lot. I pound my head against a wall, get pissed, quit, and 5 minutes later, figure out the fucking problem…slightly irratating.) I came across this thread:

http://nesdev.parodius.com/bbs/viewtopic.php?t=6281

As it turns out, I was doing my collision detection “wrong”. Well, not wrong, I was just making it a hell of a lot more difficult than it needed to be. I was “hard coding” everything. Finding this mistake was bittersweet in that:

A. From here on in, it will be substantally easier to code, I’m not dreading it any more, and it won’t be the limiting ROM space factor…hopefully. Also, using bit testing I will be able to have something like bit 7 is solid/empty, bit 6 is sprite behind/in front of the background, bit 5 nothing/instant death…etc. with only 1 collisoin map.

2. My background has just as many curved surfaces as flat ones, so I would have to redesign my background to be able to support a routine like this. So, I think that I’ll save it for future levels. This goes back to desining your background in 16×16 tiles.

D. Hard coding it the way I did for the overworld got me intimately familiar with the way that sprites interact with the background. So, even though it was pretty painful, I think it was beneficial.

The point is, hopefully in the future collision detection won’t be so difficult. I will try the sprite interaction today (or next time I get time) and hopefully work it out.

What stinks in here?

5/3/10 - CHR RAM FTW!

So, I added some CHR RAM stuff to my game. I spent a long time doing it only to find out that:

1. Entering the wrong address into a look up table is rather difficult to track down…don’t make typos.

2. CHR data is BIG.

3. Even setting everything up so that all the program has to do is load the shit at the beginning of NMI, I could only get it to load about 6 tiles before fracing out with the pointers I was using. 🙁 I had it set up at 9, and it worked in PAL, but NTSC, not so much.

So, I had to go back and re-design my MetaTiles, my main background bank, my individual animation files, and the rooms with the meta tiles that I changed…ufda. But, alas! I storve on, control over nature is won, not given. I settled on 3-4 tiles/frame that I would write to my background. This should leave time for all the other updates. For those of us keeping track, I had 18 star tiles and 4 computer tiles to animate. At 8 frames for stars and 3 frames for computers (and 3 tiles/frame for stars and 4 tiles/frame for the computer) this gives a total of 51 frames of animation.

What the hell is he talking about, you ask? Now the computers look like there is shit on the screen and the star scapes through the windows move…. 😀

Who’s got big balls?

5/1/10 - ArseFace and Better Background Loading

First, I finally added this guy:

I christned him the “ArseFace”. 😀 It’s got a good story behind the name, but I can’t give it all away on the first date.

As I illuded to before, I have a much better understanding of look up tables than I did when I first organized my background, so I decided to revamp it cause it was taking up a shit ton of memory. Let me explain what I was doing before. My overworld is shaped like a “star ship”. However, to get shit to look up properly, I had to fill in the empty “rooms” with $00 or $0000 in the look up tables. So, if ER stands for an empty space, a typical table would look like:

backgroundptr:
.word ER,ER,ER,ER,ER,ER,ER,ER,ER,ER
.word Room0,ER,ER,ER,ER,ER,ER,ER,ER,ER,Room10
.word Room11,ER,ER,ER,ER,ER,ER,ER,ER,ER,Room11
.word Room11,ER,ER,ER,ER,ER,ER,ER,ER,ER,Room11
.word Room11,ER,ER,ER,Room37,Room38,Room39,ER,ER,ER,Room11
.word Room11,ER,ER,Room47,Room48,Room49,Room48,Room51,ER,ER,Room11
.word Room55,Room56,Room56,Room58,Room58,Room60,Room58,Room58,Room56,Room56,Room65
.word Room66,Room67,Room67,Room69,Room70,Room71,Room72,Room69,Room67,Room67,Room76
.word Room11,ER,ER,Room80,Room81,Room82,Room83,Room84,ER,ER,Room11
.word Room88,ER,ER,ER,Room92,Room82,Room94,ER,ER,ER,Room98
.word ER,ER,ER,ER,Room92,Room82,Room94,ER,ER,ER,ER

backgroundptr2:
.word ER,ER,ER,ER,ER,ER,ER,ER,ER,ER
.word ER,ER,ER,ER,Room92,Room82,Room94,ER,ER,ER,ER
.word ER,ER,ER,Room37,Room81,Room82,Room83,Room39,ER,ER,ER
.word ER,ER,Room134,Room48,Room81,Room82,Room83,Room48,Room140,ER,ER
.word ER,Room47,Room145,Room146,Room147,Room148,Room149,Room150,Room151,Room51,ER
.word ER,Room155,Room156,Room157,Room158,Room82,Room160,Room161,Room162,Room163,ER
.word ER,Room155,Room156,Room48,Room169,Room170,Room171,Room48,Room162,Room163,ER
.word ER,Room177,Room178,Room178,Room178,Room181,Room178,Room178,Room178,Room185,ER
.word ER,Room188,Room181,Room181,Room181,Room181,Room181,Room181,Room181,Room196,ER
.word ER,Room177,Room178,Room178,Room178,Room181,Room178,Room178,Room178,Room185,ER
.word ER,Room80,Room48,Room181,Room178,Room181,Room178,Room181,Room48,Room84,ER

backgroundptr3:
.word ER,ER,ER,ER,ER,ER,ER,ER,ER,ER
.word ER,ER,Room222,Room181,Room181,Room181,Room181,Room181,Room228,ER,ER
.word ER,ER,ER,Room234,Room235,Room235,Room235,Room238,ER,ER,ER
.word ER,ER,ER,ER,Room246,Room247,Room248

As you can see, it is three tables cause it is so damn big. At present, there are 7 of these tables. However, there are tons of empty spaces and repeated rooms. (as well as a couple rooms that are repeated with just a change in pallette.) I thought that I would make a table of bytes (not words) that would store the look up data for the unique room number stored in a second table. Effectively, this would eliminate the ERs above and condense it down to 1 table. i.e. the background pointer table would become:

backgroundpointer:

.word Room0,Room10
.word Room11,Room37,Room38,Room39,Room47,Room48,Room49,Room51
.word Room55,Room56,Room58,Room60,Room65
.word Room66,Room67,Room69,Room70,Room71,Room72,Room76
.word Room11,Room80,Room81,Room82,Room83,Room84
.word Room88,Room92,Room94,Room98
.word Room134,Room140
.word Room145,Room146,Room147,Room148,Room149,Room150,Room151
.word Room155,Room156,Room157,Room158,Room160,Room161,Room162,Room163
.word Room169,Room170,Room171
.word Room177,Room178,Room181,Room185
.word Room188,Room196
.word Room222,Room228
.word Room234,Room235,Room238
.word Room246,Room247,Room248

As you can see, it cut out a lot of shit. And over 7 some tables, it saves a LOT of room. All this data was saved in “Bank 6” of that picture I posted of the bank space. The old way took 3448 bytes and this new way took 1143 bytes. (or compressed it down to 33% of its original size.) :D:D

The only problem is, I honestly don’t know how my room look up routine functioned before…. When I did this, it didn’t work. After about 5 hours of debugging, I figured out why. First, the background is organized so that when you exit a door, it changes the X or Y cooridnate in the background rooms. I had the X and Y coordinates mixed up…AND they were being INC and DEC the wrong way when you went up or down and right or left. Also, I had the CLC OUTSIDE of the loop that totalled up the room index so it was adding an extra 1 every time it went through the loop…? So, basically when you were in the top row (Y=0) and the third column (X=3), it was taking (0-3)x10+0 = room index. ((0-3)x10+Y) This was totally fucked cause it was adding 10 253 times to the Y? And still comin up with the right answer for the room? Confused? Me too. It should have been (X)*11+Y (or (3)*11+0). So, after I fixed that, lo and behold, the mother fucker worked. 😀

So, now I’m happy. I just can’t believe that it was functioning before. That boggles the mind.

I’m not sure what I want to do next. I think that I might give into peer pressure and buffer my background writes. I just keep comming up with more of them. 😉

4/29/10 - Compression Results

Okay, here is the table that NESASM spits out. The first is the original scheme and the second is the new one:

In the first one, the relevant uncompressed Background info is using banks 26, 27, 28, 29, 30, and 31. This is a total of 44378 bytes. In the new scheme, it is using bank 8 and 9 for background info and bank 10 for the meta tiles and their look up tables. This is a total of 10934 bytes.

Now, I am doing this little analysis for the first time here.

That means that the new background uses 24.8% of the original space required and does the same thing. Put it another way, if you had 100kb of background info uncompressed, using the new way, this would take up 24.8kb…so you would have 76.2kb left over for, you know, more crap.

I suspect that if I had actually designed my overworld to be assembled from 16×16 tiles (rather than 8×8), it would have a much better ratio, maybe in the teens. But as it stands, I have a huge number of metatile bank switches and maybe half the meta tiles are “8 pixel offset repeats” of other tiles. The next time I design a level, it will do much better. 😀

Overall, I am satisfied. I think that it was worth the effort. I have an idea to revamp the look up tables for the background info…this won’t save too much, but you never know! It just seems like it would be much more efficient. I’ll see if I can make it work.

PEACE!

4/28/10 - Compression Successful

Well, I hit it hard the past couple days. I have all of my background compressed. 😀 I haven’t assembled it yet to figure out where the bugs and all that crap are. I’m just pumped to be done with that. When I did it the first time, it took like a month and a half. Two days this time, quite a difference. I guess it’s cause you’re only typing in a fraction of the data.

I will post the compression ratio soon. As soon as I get it all fixed and running again.

4/26/10 - Backgrounds...again.

So, as I was going through my background compression, I got about 6 rooms done before I noticed something rather inconvinent, I had about 310 meta tiles in my overworld. This is bad because I couldn’t really specify more than 256 at once. So…I had to start over and figure some way of using multiple sets.

I went through the whole overworld and picked out all of the metatiles (comming up with the 310) and organized them in a way that would (hopefully) optimize the number of metatile bank switches. If I got too many of them, it would defeat the point of compressing stuff. The reason that there were so many is because I didn’t build the overworld from metatiles. I built it from tiles. So stuff was ofset by 8 rather than 16 pixles so I had a bunch of extra crap. However, I decided it would be easier to just deal with it here and design the rest of the stuff “correctly”.

Anyway, MetalSlime posted that rather than using a $FF flag for metatile repition, you should just use a bit. i.e. %10000011 ($83) rather than $FF,$03. Saving you one byte each time. As I don’t expect to repeat something more than 64 times, I could also hijack the %01000000 bit as a flag for metatile bank switching.

So far I have entered all of the meta tile information, made the meta tile look up tables, and compressed one room in this new format. I need to write the code to run it and hopefully it will work. Then onto the rest of the rooms. I don’t expect that this will take too long…we’ll see!8==D

EDIT: SHE RIDES!!! Now all I have to do is fix the rest of the rooms.

4/20/10 - Updates and Shit

Well, it’s been a while since I updated this. I finally got my test out of the way, so hopefully I can make some more progress quickly. Here’s a quick run down of what I’ve done in the interum.

1. I fully implimented CHR-RAM in my program. This allows me to do a number of things. Mainly, animation of the background, being able to re-use certain CHR data without having to add an entire new bank, and allows the use of SUROM or whatever the alternate MMC1 memory mapper. i.e. 512kb=:) if I get that far. And, moving starscapes and stuff will be just bad ass.

2. I started compression of the background data. Will update this on how much room it saved when I get through. So far, it’s working nicely but I wish I had figured this out both the first and second time I wrote background info for the overworld. For those of you counting, this is the third iteration of the data.

3. I moved the main program code out of NMI. It still only runs once per frame, but it is no longer a do-shit, update graphics, do-shit, update graphics, do-shit, update graphics….all in nmi. This is bad, for the record. Now it runs the updates in the main program then at the beginning of nmi, it updates the graphics. As it should be. This will also keep music running smoothly.

4. I changed the controller reading/writing routines. Much easier to work with and use now.

5. I have organized the steps needed to complete the overworld (FINA-fucking-LY). Just a few more things to go.

6. I got Nightman’s health counter working properly. (and in the right place…der)

7. I spent two days chaseing a bug that somehow got in there after all this. My sprite update routine is coded to only update the metasprites…somehow it was updating these sprites then the sprite offset 2.5 sprites in RAM. Why, who the fuck knows…but with a redundent look up index write, it fixed it. Hopefully it will stay away.

So, I need to finish going back through the background. Until next time…..

Also, note to Beta Testers, this new program, for all intents and purposes, is almost 80% redone since the last update. Enjoy.

CUM SHOT! 8==D

4/5/10 - Program Consolidation

Well, I was going to do more of this consolidation and looping, but I don’t really have time. Last wednesday, I went through my enemy update routines and changed it from where there was one routine for each enemy and looped the code. This involved some look up tables and some slight sprite rearrangements, but worked fine. Thanks to MetalSlime who posted an example program from which I stole the idea. 😀 Thanks duder.

The point is that it saved me some 2260 bytes of data in the fixed bank. This is a freaking lot. As seen in this before/after pic of Bank 1. Poweryay.

I have two more weeks until my exam. I will likely not update any until that is over with. I need to force myself to study so that I can pass. Wish me luck.

3/31/10 - CHR-RAM

I asked around about CHR-RAM today and I have a working program. It’s pretty simple, but it works. The advantage of this is that you can edit the individual background/sprite tiles at will (within NMI). Think the dancing plants and scrolling ? mark blocks on Mario 3 (I don’t think that it uses this technique, but you could do this with that, they use MMC3 maybe). This allows for complex scrolling, animation, and the ability to edit a small number of background tiles without having to switch the whole bank. (Again, just the 4 tiles that make up the plant or the ?).

The disadvantage is that you bring 8kb of data into your PRG space for each full “bank” of data you use. As opposed to the extra chip of CHR information that you would normally have. However, again, if you used this method, it would enable you to use multiple 256 kb PRG data sets in MMC1, so you could theoritically make whatever the hell size of program you wanted to. So the data size becomes irrelevant again.

While the PowerPak will support this technique, it only supports upto 512 kb worth of data…fuckbeans. Are you as confused as I am?

3/22/10 - Concept Art

I haven’t had too much time recently, but I did manage to post this:

http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=30960

What do you think?

From the thread:

I haven’t had much time recently to do anything with my game because I have been taking a referesher course and studying for my upcomming exam. I do, however, have several breaks during these classes and rather than stand in line for the bathroom for 15 minutes, I have taken to bugging PSerge and doodling. I have been trying to get down the visions of some rooms/levels that I have in my head, and they seem to be coming along nicely.

What do you think??

This would be the background when he is flying through an astroid field. There would be various obstacles in the foreground where this view is in the backgound.

This is an idea for one of the levels. Kind of a generic forest level.

This would be some underwater ice caverns. I haven’t given too much thought to this type of level yet as this underwater stuff would come late in the game.

This would be “Level 2”. A shipyard building ships similar to the “Discovery” from 2001. Note the start end path. Not a bad idea, huh?

This would be a close in view of one of the rooms in the above level.

This is an idea for a space station level. I’m not sure where this will come in, but I got my ideas down.

I’d love to see any suggestions that people have or any doodles as well. I hope you enjoy and I will add more as I get them done. Thanks for looking.

8==D

3/15/10 - New Enemy

Well, I haven’t had much of any free time lately, with the studying for my test that is in like a month, but I got so sick of it today, I had to take a break for about an hour and do something else.

I revisited the sprites that Clawful sent me and worked on the final one. I am fresh out of sprite palletts, so I had to make it a duplicate of an existing one. I didn’t want any of the enemies to look too much alike, so I tried Nightman’s pallette. I did numerous iterations of the different colors, and I think that this one looks the best while keeping him so that it looks different than Nightman. I think that I will make this one move faster (1 pixel per frame rather than the 1/2 for the others) to make him a little more intimidating. I didn’t input the new character into the program, I just made it look right, split it into tiles, and cut out all the duplicated tiles. I haven’t named it yet, any suggestions?

3/11/10 - Music

So, up to now I’ve been neglecting the music part of the game. Mostly because it is the APU and from what I’ve seen that is pretty different than the PPU. But, I have been thinking ahead and have gone through the first 3 or 4 of MetalSlime’s tutorials. They are really great. Only problem is that I can’t mess around with the sound stuff at work as easy as the video. 😛 However, I have gotten pretty far with the N64 scans. Now I need to add the Japanese N64 games (so that Shags doesn’t hate me) and after that, I should have some free time in the evening to mess with this.

I did figure that it would be easier to have a pre made song for my first attempt at this stuff before making original music. Yesterday I finally received my book with the music to the song that I think would make a good overworld theme, “Face Down” by Red Jumpsuit. Now I need to make it notes rather than cords for the two guitars (anybody know a simple way to do this?) and figure out the drums from the music. I haven’t done anything like this in like 8 years since high school, so it will be interesting. But I think that with a few tweeks and maybe taking the song from 180 bpm to ~200bpm, it should be pretty bad ass.

However, I have the fucking PE test on April 16th so I won’t get much done until then.

Peace!

3/8/10 - 4th Overworld Enemy

Well, I haven’t got very much (anything) done in the past little while. I am immersed in studying for a professional exam that I have comming up on April 16th. I am taking a class that is from 8am-5pm on March 4,5,6,7,18,19,20,21 and April 1,2,3,4. So, I suppose that I’m 1/3 of the way done with that class, but I have to start studying outside of the thing. My problem is that I am exhausted. I never would have thougth that sitting and re-learning crap for 8 hours a day would take this much out of me, but my back, neck, and freaking eyes hurt. Needless to say, I don’t think that I will have too much free time to work on my game until this test is overwith. Hopefully I will pass. God I hope so.

Anyway, as I hinted to before, I have the enemy routine set up to where it could handle another enemy type in the overworld. I think that I am going to use the forth one that MissClawful gave me cause even though it is not a “humanoid” type, it is in her style and I think that it will look pretty neat. I was going to use it elsewhere, but I think that I will put it here.

Technically it looks like an octopus, but it fits in rather well. I think that I will give it a back story something like it is a genetically engineered being that was made to better perform the hazardous tasks that humans generally get hurt doing. I haven’t decided on a name yet, but hopefully someone will be immortalized.

Back to studying!

3/3/10 - Random Enemies

Well, I haven’t been very motivated to do anything the last few days. Being chased around by a lynch mob will do that to you. But that’s another issue and I won’t get into it here.

I successfully added a routine that randomly changes the enemies chosen for each…enemy (well, for each sprite) as you change rooms. I believe that this will keep the game from getting stale as no two experiences will be exactly alike. Rather than coming into the room and trying a million times aganst the same exact enemies, it will keep you guessing and make the rooms switch around on you. 🙂 If anybody cares, I put the stuff in a look up table during room loading and it will draw the enemy based on whatever number happens to be in the variable at the time. In this case, I used the sprite travel direction. This limited me to 4 choices, so it fit. I may add a forth enemy type later, but I haven’t got a decent sprite that fits with the others yet. I might work on that myself. Then I had to reorder a couple things so that the damn thing would update the sprites before it displayed the first frame of the new room. Sonofabitch was flashing the old sprite before loading the new ones.

Then I started making Nightman’s health meter. I got it to display (currently in the wrong place, and all in one line rather than two) the health meter and then I put the select button as a hit counter. It worked great, but still needs to be moved, split into two lines, and have high and low health limits set. And I guess make sure it will count up.

After that, I will add some sort of shooting routine to the Punishers and make it so that they will shoot at nightman, not just randomly. Then fighting…hopefully.

2/26/10 - Evil Gets an Upgrade

After I put Megan’s crewmen in as my opponents, I realized that Nightman kind of looked like a tampon in a whorehouse. However, when she sent me the sprites for the foes, she also included some unfinished Nightman sprites. So, I spent a few hours completing these sprites, redesigning and upgrading Nightman so he looked sleeker and added a third frame to the animation. Kind of a bitch because not only did this one use different tiles, it used several more. So, not only did I have to go back through and correct Nightman’s metasprite relationships for both regular and weapons shots, I had to go through the rest of the sprites (that were in there prior to the addition of the enemies) and re-tile them. But it’s done now, and it looks pretty good.

Nightman 2.0:

Rev1:

Rev2:

Edit:

Today I also incorperated a routine into my room loading routine that resets the enemies to their starting positions. Doesn’t seem like much, but if you look at hundreds of rooms and you have to start them so that they don’t walk on walls and shit, it’s a big deal. More pointer tables along with metasprite updates. This isn’t too useful now, but when I put the fighting in, and they die, they will move off the screen. This routine will reset them for the next room. It’s a start. Next I guess I will make some of them shoot or actually put in the randomly loading enemy part. Have to see where the fart burns me to.

2/25/10 - Sprites and Setbacks

Today I put the rest of the sprites into the program, so now there are 5 + nightman. They all work great and it looks pretty cool. However, my new problem is that this makes my NMI indicator show up. Bummer. 🙁 I have to figure something out cause it is now updating the last sprite out of NMI when nightman does anything but stand there which isn’t exactly good.

I have an idea on how to fix this, but I want to get the opinions of a couple more experienced programmers before I proceed. Well, that means my program is getting intense…or I have a bunch of crap that doesn’t do anything…balls.

UPDATE! I am retarted. Apparently sprite DMA does this automatically. It doesn’t update the sprite variables until you do this, and this is updated right after NMI is triggered. 😛 Thanks Bunny/Al.

Relief.

2/24/10 - Enemy Animation

I figured out that to make a death scene, I might need to have the enemies, you know, actually do something. So I decided that I needed to animate them. To date, they have just been a skull and crossbones jumping around the screen. I got some sprites from Ms. Clawful a while back and I spent some time on them. I got some good stuff going. She suggested 3 frame animation. Actually it was 4 frame (legs together, right step, legs together, left step, start over), so I had to animate that.

This wouldn’t normally be a big issue, but I don’t want to have to specify the sprite info for each room. I will have ~5 bad guys in each room and I want them to appear at random. i.e. you could have 5 of the hard enemies, 5 of the easy, 5 of the middle, or any combination inbetween just depending on what random number happens to be in the counter at that time. This lead to the problem that when updating the sprite data for each animation frame, each enemy has a set of specific addresses that you have to write to. So how the FUCK do you write the correct data to the correct address when the data generated is random? Pointer tables. 😀

Basically, I made a table of the tiles and attributes for each frame and added a pointer in the room loading routine. Then for each frame I just specify where to start in the table, jump to the update routine for that sprite, and Bob’s your uncle, it works nicely. A little resource intensive, but who cares if it looks cool, right?

Then I had the problem that the sonsabitches were running so fast that they would be really hard to actually kill, so I added a simple speed variation to make them not all the same speed.

Now I need to go through and make sure that the other enemy types work then input the routine for the other 4 beasties.

Peace!

2/23/10 - Arrows

I got the arrows working pretty well last week. He shoots, it continues on till it hits the edge of the screen, then it dissapears. He even motions like he is shooting, in all 4 directions. 😀

This week I put in a counter for the number of arrows in his quiver. It counts both up and down, but technically, there’s nothing to make it count up. I also made it so that he stops shooting when he runs out…then made it so the dumb ass stopped trying to shoot when he ran out.

So, now I am debating on having it to where he can only get a set amount, like 100. Then later on he can find a bigger quiver that holds like 500. Using even hundreds is nice cause I’m lazy and I don’t want to try and figure out how to limit this with more than one variable. (each digit is its own variable, saying if the first digit = 1, stop counting up, would be easier than say 52.) However, as I write this, I realize that this is a question for the finding arrows rountine, so FUCK IT! On to…mace/arrow and enemy collision, I suppose.

Booya!

2/19/10 - The Mace!

So, today I got the mace working. Well, I haven’t added any real enemies to speak of, but the button works. This is really exciting to me as it was a complete pain in the cock to make it work. I went through a number of iterations and about 15 different ways of doing it. In the end, I basically had to move the animation updates for the sprited into their own subroutine so I had something to change the thing back to, then I had to refresh the transfer of the dominate sprites to the sprite location variables for the collision detection, then assemble the sprites with him holding his weapon, then code the b button to start a timer when pressed, then read the timer and over ride the animation updates with the new sprites. Then I had to put stuff back in there so that it would automatically switch back when the timer ran out. Then I had to make it decrement the timer…dua. Now, I can go back and tell it to skip the original graphic updates as it is doing the new mace ones. I better do that before I forget.

Now, onto the firing weapon! i.e. Arrows for want of a better term.

2/17/10 - Optimizing

So, I went back through and reorganized my background data. Before I had each unique room as a seperate set of background tiles. I took each room, split it up into the top door area, the room body, and the bottom door area and added loops for each of the three sections. This allowed me to go from 64 top sections to 12, completely eliminate 10 room bodies, and go from 64 bottom sections to 12. It added a little extra code to the room loading routine, but damn if it didn’t save me 17kb of PRG space. The proof is in the numbers.

2/26/10 - Evil Gets an Upgrade

After I put Megan’s crewmen in as my opponents, I realized that Nightman kind of looked like a tampon in a whorehouse. However, when she sent me the sprites for the foes, she also included some unfinished Nightman sprites. So, I spent a few hours completing these sprites, redesigning and upgrading Nightman so he looked sleeker and added a third frame to the animation. Kind of a bitch because not only did this one use different tiles, it used several more. So, not only did I have to go back through and correct Nightman’s metasprite relationships for both regular and weapons shots, I had to go through the rest of the sprites (that were in there prior to the addition of the enemies) and re-tile them. But it’s done now, and it looks pretty good.

Nightman 2.0:

Rev1:

Rev2:

Edit:

Today I also incorperated a routine into my room loading routine that resets the enemies to their starting positions. Doesn’t seem like much, but if you look at hundreds of rooms and you have to start them so that they don’t walk on walls and shit, it’s a big deal. More pointer tables along with metasprite updates. This isn’t too useful now, but when I put the fighting in, and they die, they will move off the screen. This routine will reset them for the next room. It’s a start. Next I guess I will make some of them shoot or actually put in the randomly loading enemy part. Have to see where the fart burns me to.

2/25/10 - Sprites and Setbacks

Today I put the rest of the sprites into the program, so now there are 5 + nightman. They all work great and it looks pretty cool. However, my new problem is that this makes my NMI indicator show up. Bummer. 🙁 I have to figure something out cause it is now updating the last sprite out of NMI when nightman does anything but stand there which isn’t exactly good.

I have an idea on how to fix this, but I want to get the opinions of a couple more experienced programmers before I proceed. Well, that means my program is getting intense…or I have a bunch of crap that doesn’t do anything…balls.

UPDATE! I am retarted. Apparently sprite DMA does this automatically. It doesn’t update the sprite variables until you do this, and this is updated right after NMI is triggered. 😛 Thanks Bunny/Al.

Relief.

2/24/10 - Enemy Animation

I figured out that to make a death scene, I might need to have the enemies, you know, actually do something. So I decided that I needed to animate them. To date, they have just been a skull and crossbones jumping around the screen. I got some sprites from Ms. Clawful a while back and I spent some time on them. I got some good stuff going. She suggested 3 frame animation. Actually it was 4 frame (legs together, right step, legs together, left step, start over), so I had to animate that.

This wouldn’t normally be a big issue, but I don’t want to have to specify the sprite info for each room. I will have ~5 bad guys in each room and I want them to appear at random. i.e. you could have 5 of the hard enemies, 5 of the easy, 5 of the middle, or any combination inbetween just depending on what random number happens to be in the counter at that time. This lead to the problem that when updating the sprite data for each animation frame, each enemy has a set of specific addresses that you have to write to. So how the FUCK do you write the correct data to the correct address when the data generated is random? Pointer tables. 😀

Basically, I made a table of the tiles and attributes for each frame and added a pointer in the room loading routine. Then for each frame I just specify where to start in the table, jump to the update routine for that sprite, and Bob’s your uncle, it works nicely. A little resource intensive, but who cares if it looks cool, right?

Then I had the problem that the sonsabitches were running so fast that they would be really hard to actually kill, so I added a simple speed variation to make them not all the same speed.

Now I need to go through and make sure that the other enemy types work then input the routine for the other 4 beasties.

Peace!

2/23/10 - Arrows

I got the arrows working pretty well last week. He shoots, it continues on till it hits the edge of the screen, then it dissapears. He even motions like he is shooting, in all 4 directions. 😀

This week I put in a counter for the number of arrows in his quiver. It counts both up and down, but technically, there’s nothing to make it count up. I also made it so that he stops shooting when he runs out…then made it so the dumb ass stopped trying to shoot when he ran out.

So, now I am debating on having it to where he can only get a set amount, like 100. Then later on he can find a bigger quiver that holds like 500. Using even hundreds is nice cause I’m lazy and I don’t want to try and figure out how to limit this with more than one variable. (each digit is its own variable, saying if the first digit = 1, stop counting up, would be easier than say 52.) However, as I write this, I realize that this is a question for the finding arrows rountine, so FUCK IT! On to…mace/arrow and enemy collision, I suppose.

Booya!

2/19/10 - The Mace!

So, today I got the mace working. Well, I haven’t added any real enemies to speak of, but the button works. This is really exciting to me as it was a complete pain in the cock to make it work. I went through a number of iterations and about 15 different ways of doing it. In the end, I basically had to move the animation updates for the sprited into their own subroutine so I had something to change the thing back to, then I had to refresh the transfer of the dominate sprites to the sprite location variables for the collision detection, then assemble the sprites with him holding his weapon, then code the b button to start a timer when pressed, then read the timer and over ride the animation updates with the new sprites. Then I had to put stuff back in there so that it would automatically switch back when the timer ran out. Then I had to make it decrement the timer…dua. Now, I can go back and tell it to skip the original graphic updates as it is doing the new mace ones. I better do that before I forget.

Now, onto the firing weapon! i.e. Arrows for want of a better term.

2/17/10 - Optimizing

So, I went back through and reorganized my background data. Before I had each unique room as a seperate set of background tiles. I took each room, split it up into the top door area, the room body, and the bottom door area and added loops for each of the three sections. This allowed me to go from 64 top sections to 12, completely eliminate 10 room bodies, and go from 64 bottom sections to 12. It added a little extra code to the room loading routine, but damn if it didn’t save me 17kb of PRG space. The proof is in the numbers.

2/15/10 - Qapla!

Today I did my last overworld room collision detection! Holy fuck! I’m so ready to move on.

Time to recruit Beta testers to make sure that I didn’t leave any holes in the game. Then onto adding content. I am thinking of investing in a power pack for my own testing, but I’m broke right now…..

Onward!

2/12/10 - All But One Done!

So, I finished all but one of the background collision detection for my overworld rooms today. I never thought that I’d get finished with it, but after I sat down with it, it went just like that! I should be able to move on to more game content and adding enemies and weapons next week. Booya, Motha Fucka!

Any suggestions? Does anyone even read this?

2/11/10 - Collision Detection

I kicked ass today. I am down to 8 unique rooms left to write collision detection for. It will be about 16kb when I get done. Booya! Moving right along.

I also sat down yesterday and did some more on the story line. I think that I have all the level topics sorted out. I just need to refine them, find more level names, and figure out bosses. It continues!

2/10/10 - Success!

Well, I had to add another look up table in the room loading routine to sort out the multiple collision detection banks, but it seems to be working correctly…and on the first try. Awesome. Just call me badass!

After I got that sorted out, I noticed that my program was infact over 12000 lines long…good grief!! So, I took a look back through MetalSlime’s tutorials and figured out how to include different assembly files into my program while they are stored in seperate places. This keeps me from messing up whan I’ve already done and it shortened the part of the program that I actually have to work with to around 5250 lines. I suppose that I will go back and do this for the background data as well and that will shorten it up quite a bit more. Onto more collision detection. Will it ever end?

Update – I took the Overworld background, attribute, and pallett data and put them into these seperate files as well and it shortened my program to just about 3000 lines. Nice.

2/9/10 - More Collision Detection

So, today I started collision detection in the “engine” parts of my overworld. It’s a bitch. One room is shaping up to be about 725 bytes…that’s a lot, if you’re wondering. I finished one room and have a template for like 7 more ready to go.

I also had to modify a eight backgrounds to make collision detection work better.

My new problem is that I’ve filled up one entire bank with this crap! Now I have to figure out something so that the fucking rooms all know where their detection data is banked!!! This is turning into one giant ass program. Don’t use curved surfaces in your program!

Oh well, after I figure this out, I hopefully won’t have to use a third bank….512kb here we come!

1/27/10 Part 2 - More collision detection!

So, today, after about a month or two off, I did 2 rooms worth of collision detection. They were pretty easy. Note to future programmers: DON’T use curved surfaces in NES games. It makes the collision detection at least twice as difficult.

It is amazing how much you forget so quickly…and how fast it comes back. Pretty cool to see progress. If I could do just one room a day, I would be done by the end of February. Hopefully that will happen.

Today I also did the background for the cut scenes. The picture of Delta and her chips is all laid out. I just need to chop it into tiles and render it in an emulator. It looks pretty bad ass.

I also need to buy a power pack. Had I not just today bought the Stadium Events of SNES, I might just get one to be done with it. Hopefully the fucking thing works on a power pack…I’ll be so pissed if it doesn’t.

1/27/10 - NM vs. JI Back Story

So, recently I have been writing a back story to go along with my game. I got a little bored with the endless collision detection and had to take a break. The story is rather lenghtly and is getting somewhat involved. I posted it in the Mod’s section to ask for feedback. So far, what I have received is quite helpful.

From here, I will write out the details of the levels (like boss, venue, upgrades/items, basic story, etc.) and get that all organized. I think that it will be an epic story when I get finished. Not only in length, but in content.

After I get all of them organized, I think that I will make it into a nice story that I will release either with the LE version, or the first 1-100…we’ll have to see how it goes once I get to the manual stage.

Anyway, stay tuned.

1/12/10 - Manuals!

Over the last couple days I have uploaded about 125 manuals into the N64 database. Now there are only about 25 more to go. Almost there!!! Now I’ll have to fill in holes in my collection to finish off the set. Not too bad, if I do say so myself.

1/5/10 - Welcome to Mod-dom!

So, yesterday I got promoted to moderator. How exciting! Thanks again to Dain and the other admins for this privlege. I’ll try not to screw it up too bad!

1/4/10 - The First Entry


So, I’m sure that I will forget to do this and never get back to it, but I thought about starting a blog about what have you. I think that I will focus on my game development, but we’ll just see where this takes us. I hope you enjoy!

-MRN