It is currently Fri Aug 23, 2019 5:05 am

All times are UTC - 7 hours





Post new topic Reply to topic  [ 174 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 12  Next
Author Message
 Post subject:
PostPosted: Sun Mar 11, 2012 2:54 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
32K is probably within the realm of possibilities, assuming no additional content is added, but like I've said in the past, now is not the time to worry about that. The main goal is to get it finished, if it comes out close enough to the NROM limitations, then we can see if it's possible to squeeze it in.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 11, 2012 4:29 pm 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21560
Location: NE Indiana, USA (NTSC)
Yeah, premature optimization is up there with love of money as a root of all kinds of evil. But even if it takes 64 or 128 KiB, I think I can still figure out how to include a bigger mapper 34 game in a multicart.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 13, 2012 12:25 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
The level converter now generates a background color layer (the game has a per screen modifiable background color, in this case brown):

Image

The background color modification is also used for the thunder effect (screen flashes red momentarily). Some of the levels have black silhouettes/shadows in some parts with thunder, so they show through during the red flash:

Image

This can't really be done by changing the background color on the NES, because it makes more sense to reserve it for black since it's used by most tiles. I could reserve 2 colors out of a palette set for it, but not sure if it's worth it given how hard it is to fit the palette limitations as it is... Or I could try just changing the background color (changing the outlines of tiles etc at the same time), it wouldn't look perfect but might be OK.

Need to start thinking about the palette next. I may write a tool to help in figuring out all the color combos used in every screen and try to go from there...


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 15, 2012 7:43 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
I wrote a tool to generate a complete, merged tileset out of all the layers of all the maps, here's the result:

Image

Some of the entities have also been merged with the background (balls, hooks and deflectors (the vertical lines)). Pure red is for areas with thunder.

Balls currently have a transparent background, but because of palette limitations on the NES I'm going to have to make their background black. Same goes for hooks and deflectors. There are also two similar blueish palette sets that the game uses (one with grey, the other with light blue) that I'm going to merge. Should be able to get it down to 4 background palettes then with some minor changes.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 17, 2012 4:23 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
I think I have the palette pretty much figured out. Had to make some compromises but nothing too drastic. Only bigger problem right now is that the balls and hooks look quite ugly with black background when they're on top of green wall. There are a bunch of possible solutions for this but I'm going to leave that for later.

I wrote a (yet another) small tool to check that all the screens of all the levels comply with the palette limitations. They seem to be OK.

There are 100 metatiles in the tileset right now. Next I need to figure out which one of them each screen uses, how to divide them to sensible groups and how many unique 8x8 tiles there are.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 18, 2012 12:50 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
thefox wrote:
how many unique 8x8 tiles there are.

Comes down to around 291 tiles:

Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 18, 2012 7:45 am 
Online

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 21560
Location: NE Indiana, USA (NTSC)
There are a few ways to go about working around this:
  • What happens if you try to make two tilesets, one with just those tiles used in communication rooms and another with tiles used outside communication rooms? You'll need a full alphabet in the communication rooms anyway.
  • Use CHR RAM, and allow only a couple of the floor number tiles (roughly $C9 through $F3 in the tile set you posted) to show through.
  • Find a way to rearrange palettes to eliminate the nearly duplicate tiles with dots in the corners.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 18, 2012 1:01 pm 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
tepples wrote:
There are a few ways to go about working around this:
  • What happens if you try to make two tilesets, one with just those tiles used in communication rooms and another with tiles used outside communication rooms? You'll need a full alphabet in the communication rooms anyway.
  • Use CHR RAM, and allow only a couple of the floor number tiles (roughly $C9 through $F3 in the tile set you posted) to show through.
  • Find a way to rearrange palettes to eliminate the nearly duplicate tiles with dots in the corners.

Yeah I think I'm going to use CHR-RAM. I could do 2-3 different metatile sets, switch based on the screen and upload a different tileset each time the screen changes. I also need couple of tiles for the textbox font and borders, but I might be able to fit those in the other CHR bank and switch the background bank on the fly. We'll see, but everything's looking pretty good so far.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 20, 2012 6:56 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
I wrote some C (CC65) code to test the screen loading -- it works! I now have all the data I need to load all of the screens in the original game. No objects or collision data yet, though.

Here's a pointless screenshot of a level loaded from the (more or less) automatically generated data:

Image
(Palette may still change.)

Soon it'll be the time to start writing some 6502 asm. :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 24, 2012 8:58 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
I extended the screen loader test to make it possible to flip between different screens and scroll horizontally using the controller, everything seems to be working as it should. Next I'll probably export the collision data, as well as a "grappleable"/death/etc flags for each metatile.

Map data currently takes 44KB (metatile data not included). ZIP brings it down to about 7KB (16%), but this is for a binary file containing all the screens, in the actual game I need to access them individually. It seems that screen by screen the compression ratio with ZIP tends to be around 33%.

Can anybody recommend some solution for packing and unpacking the data (preferably with the unpacker already implemented in 6502)? Has anybody used pucrunch on an NES project?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 24, 2012 10:23 am 
Offline

Joined: Thu Oct 05, 2006 6:29 am
Posts: 917
Quote:
Can anybody recommend some solution for packing and unpacking the data (preferably with the unpacker already implemented in 6502)?


I've got an apLib decruncher for the 6502: http://jiggawatt.org/badc0de/decrunch/aplib_decrunch_6502.asm


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 24, 2012 10:57 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
mic_ wrote:
Quote:
Can anybody recommend some solution for packing and unpacking the data (preferably with the unpacker already implemented in 6502)?


I've got an apLib decruncher for the 6502: http://jiggawatt.org/badc0de/decrunch/aplib_decrunch_6502.asm

I'll keep that in mind. I tried using the aPLib packer on all the levels (individually) and got a total compression ratio of 38.6%. That should do.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 25, 2012 7:34 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
thefox wrote:
Next I'll probably export the collision data, as well as a "grappleable"/death/etc flags for each metatile.

Done. I also changed the palette around a bit.

I'm getting sick of tool coding. It's pretty ridiculous that even the simplest things take hours upon hours to implement. Oh well, NES happens. :)

Now I can start moving the level stuff over to the asm engine. Then I'll start on the object/entity/sprite stuff.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 25, 2012 10:09 am 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 11399
Location: Rio de Janeiro - Brazil
I guess that coding tools really is a part of making NES games, unless you are making simple games where data doesn't need to be encoded in very specific ways. This case in particular is a bit different though, since you need to do a lot of conversions from the formats that were used in the original game.

Anyway, it's cool that this game will finally be playable in the console where it belongs! =)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 27, 2012 6:10 am 
Offline
User avatar

Joined: Mon Jan 03, 2005 10:36 am
Posts: 3141
Location: Tampere, Finland
Anybody know of a (free) Flash decompiler that could be used to get the ActionScript files from the SWF? The program I'm currently using, Sothink SWF Decompiler, seems to work pretty well, but the trial version doesn't allow saving the script files (or copying the text from them), and my trial is up in 10 days. The decompiled scripts will be very useful in fine tuning the physics and stuff.

I moved the level stuff over to my asm engine, it went surprisingly smoothly. I have the sprite from Shatterhand bouncing around the screens, collisions also work as expected.

Next I need to write a routine to load an arbitrary screen (I think I'm going to use banking for now and keep the ~40K of levels uncompressed), as well as make sure that the collision against the screen above the current one works correctly. Then I have to export the levels (each of which are just a list of screens that the level uses), and then also generate a list of levels for the different game modes.

After that it's time to start thinking about how to export the objects. Some of the objects I'll convert to level/screen properties.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 174 posts ]  Go to page Previous  1, 2, 3, 4, 5 ... 12  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group