It is currently Tue Sep 19, 2017 12:02 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Attribute / Tile
PostPosted: Sun Sep 03, 2017 8:04 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10008
Location: Rio de Janeiro - Brazil
gauauu wrote:
Well, I am using 4x4 metatiles. But doing free all-directional scrolling - it's not obvious to me why I need to read the attribute tables for that, am I missing something?
(I'm using 4 name tables, if that makes a difference)

Even if you do have the off-screen space for updates in all directions (which you do because you're using 4 name tables), you still have to deal with the fact each name table is 30 tiles tall, and that number is not divisible by 4, so in every other vertical name table the attributes of your 4x4 metatiles will be misaligned with the attribute table, meaning you'll have to shift and mix attributes from different metatiles (or a buffer in RAM) to form the final attribute bytes.

That is, unless you take the easy way out, which's truncating the bottommost row of metatiles in every screen, using only the top half, so that attributes never misalign. That's as easy as 8-way scrolling gets, but I think it's weird to pretend that sections of your level maps don't exist.


Top
 Profile  
 
 Post subject: Re: Attribute / Tile
PostPosted: Sun Sep 03, 2017 8:27 pm 
Offline
User avatar

Joined: Sat Jan 09, 2016 9:21 pm
Posts: 200
Location: Central Illinois, USA
tokumaru wrote:
That is, unless you take the easy way out, which's truncating the bottommost row of metatiles in every screen, using only the top half, so that attributes never misalign. That's as easy as 8-way scrolling gets, but I think it's weird to pretend that sections of your level maps don't exist.


Heh, after a lot of thought and internal debate, that's exactly what I'm doing. I started writing the routines to do the mis-aligned metatiles, and said "forget this" -- so yeah, sections of my level maps won't actually exist :-/

_________________
My games: http://www.bitethechili.com


Top
 Profile  
 
 Post subject: Re: Attribute / Tile
PostPosted: Sun Sep 03, 2017 8:42 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10008
Location: Rio de Janeiro - Brazil
Yeah, that simplifies the rendering code a lot, but slightly complicates the logic side, since now you'll also need to skip those rows when testing for collisions, meaning you'll probably need a few Y >= 240? checks here and there.


Top
 Profile  
 
 Post subject: Re: Attribute / Tile
PostPosted: Mon Sep 04, 2017 6:56 am 
Offline
User avatar

Joined: Sat Jan 09, 2016 9:21 pm
Posts: 200
Location: Central Illinois, USA
Yup. Most of the checks are pretty simple so far. The only annoying ones I've hit at this point are checking for characters that span the 240-px boundary. Might be worth tracking y2 for each character just to avoid having to recompute that at each collision check.

_________________
My games: http://www.bitethechili.com


Top
 Profile  
 
 Post subject: Re: Attribute / Tile
PostPosted: Tue Sep 05, 2017 10:10 pm 
Offline
User avatar

Joined: Sat Jul 12, 2014 3:04 pm
Posts: 936
Use the hidden data to label your maps, mayhap~

Or use it to spell out another message.

I asked this question, or close to it.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page Previous  1, 2

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 6 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