I've released a teaser demo, for more information see the post near the end of the thread.
This is still a very early work in progress, no enemies or real gameplay yet.
Zelda2.hex
(Edit by Uze) .UZE file
----------------------------------------------------------
I talked about this project in my introductory post already, but I decided to put up a small update and start a progress thread in the proper sub-forum. Some of this is copied from my original post, to keep it all in one place. Below that is my update.
The project - Zelda 2 remake/port on Uzebox. The idea is to mimic the original game as much as possible and then use the engine to build two additional Zelda 2 styles games (basically fan sequels) to form a Zelda 2 "trilogy."
On the NES title, the tiles are 2bpp where index 0 is the background color or transparency (if a sprite). Each tile is then assigned to a "CSet" which is part of a 16 color level palette (there are 5 CSets + 1 background color -> 5x3 colors + 1 background). Different levels can use different palettes and tiles can be assigned to different CSets in order to get a lot of re-use and variety. So in program memory, 512 tiles at 2bpp can be compressed to about 8Kb and each level can store a list of used tiles (and CSets) which can be decompressed into "video memory." So at runtime, the tile engine doesn't have to do paletted lookups but gets compressed at 2bpp in program memory. Since it only decompresses the necessary tiles for a given set of screens then the runtime memory usage is minimized.
Obviously I've just started out (a few hours total at most), so most of this is just planned at the moment. However I do have some stuff working, such as basic input, tile rendering (mode 3) - just decompressed 8 bit tiles right now, and part of the initial palace map built. I got some scrolling working, though I'm still having some issues there. Scrolling right works perfectly but I'm having some issues when scrolling left. Basically when I load columns for the left side, I seem to be loading the wrong data. From what I understand tiles are arranged in "vram" in a fixed 32x32 (or whatever v tiles is set to, 28 in my case I think), and when the scroll value is modified the visible "window" to these tiles is shifted and wraps. The ScrollX value wraps at 256, which is exactly the distance needed for 32 tiles in memory. So when the screen scrolls to the next tile boundary I calculate the column in vram to write to and write the next column of data from the master map array. For scrolling right this works perfectly and scrolling left is still acting funny. Anyway once this works I'll change the monolithic map to multiple maps and eventually include repeating patterns like Platz to save memory. Once scrolling is worked out, the next task will be to get the character to work properly.
Here is some very early test screenshots from the emulator, remember this is very early. On a few tiles have been made so far, I'm making them by hand at the moment. Click on the images to see full size.
After this I worked on getting sprites to work. I downloaded the beta5 code in order to make use of horizontal sprite flipping (a necessity for this project) as well as getting some animations working. So Link can turn left or right and plays a walking animation as he moves. Link takes 8 sprites, which is a lot, but I think I can implement many of the projectiles and enemies using tiles due to simple patterns and backgrounds (kind of like the platforms for Platz). In addition the number of complex multi-tile enemies on screen should be limited, though this will be a challenge to deal with.
Link sprite in action:
Any comments are welcome.
