I've moved the map loading routine over and also wrote a new routine to load the nametable view. Previously I was using a routine from my multi-directional map scroller, which while works just fine, is unnecessarily generic/bloated for this project.
The remaining stuff (object handlers, sprite renderer etc) should be fairly straightforward to adapt to the new mapper.
Thanks, I will!infiniteneslives wrote:Nice to hear you're back at it, keep it up!
The project is advancing nicely. I've moved most of the stuff over now. I've also added some new stuff like better state handler (for different game states like menu, game itself, HUD display etc) and more manageable banking (using CA65's .bank pseudo-op).
For those who don't know what .bank is, it basically allows one to assign a bank number to each segment in the linker config, then retrieve said number based on a symbol. So stuff like this is possible:
Code: Select all
lda #<.bank( someFunction ) jsr mapPRG jsr someFunction
Right now I have the level loading working again, with ability to scroll the levels horizontally and move up and down between screens using the controller.
One module that still desperately needs refactoring is objects.s: the object handlers. It has a bunch of references to some obsolete stuff which I've temporarily replaced with placeholders. But after that's all cleaned up I should be able to start working on some actual new stuff.
Mostly I've been working on the "HUD", i.e. the textbox. It shows up properly, updates the nametable and the attributes, and uses sprite 0 hit to restore the level scroll afterwards. It can also display text already and as a quick mockup also displays Joe's face with some sprites. The only thing that remains to be implemented is restoring the level graphics (nametable + attributes) when the HUD closes (uploading stuff piece by piece when rendering is enabled is somewhat annoying...). I also need to implement some smaller stuff, like waiting for button press when text segment ends.
It's kind of ridiculous how it has taken me several days to implement something that probably took no more than 5 minutes on the original Flash game.
Oh yeah, I also did clean up most of the object handlers, so I have all the objects showing up in the levels once again.
The HUD faces will probably be what I'll be tackling next.
And so I did. I have Joe's and Command's face animations converted, and wrote some code to upload the CHR tiles etc when the speaker changes. Still to be done are the palette updates and restoring the level sprite CHR tiles when the HUD closes. Restoring the tiles is once again kind of a bitch because it needs to be done over multiple frames in the NMI because rendering is enabled. I guess I should write some kind of generic routine to transfer a chunk of memory to PPU while rendering is enabled.thefox wrote:The HUD faces will probably be what I'll be tackling next.
I also need to convert the rest of the face animations, but that's fairly straightforward manual(ish) work that I'm probably going to postpone for now and use the existing animations as placeholders for other characters.
I think I'll start working on the player next. First thing to do would be to dynamically upload the sprite tiles as the player animation changes. Then from there I'll do the player movement: walking, and of course, "streeming".
Did this today. I'm really glad to get this finally done because I've been putting it off for a long time. It has a nice and simple interface, I simply tell it the frame number that I want to display and it takes care of the rest. Currently it uploads 8 tiles per frame and splits the upload to multiple frames if needed. Naturally the animation will lag behind if an upload takes more than 1 frame, but all sprite frames use less than 16 tiles so hopefully it will not be too noticeable.thefox wrote:First thing to do would be to dynamically upload the sprite tiles as the player animation changes.
Yup. I have 64 tiles free in the sprite bank right now so there's plenty of space for that. I just hope I haven't forgotten about anything. I'm still kind of undecided whether I want to display score and deaths like in the original.tokumaru wrote:Are you double buffering the player's tiles?thefox wrote:Currently it uploads 8 tiles per frame and splits the upload to multiple frames if needed.
Yes, I'll definitely consider it. I've been using version control for the entire duration of this project so I can actually go back and build any revision of the project at any time. So if need be, I could even show the intermediate builds after the project has been completed.Denine wrote:Nope.Banshaku wrote:Am I the only one to think that way?
So, thefox, any chances for some kind of "0.5"(half finished) version?