It is currently Wed Sep 19, 2018 7:42 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Mar 29, 2018 7:55 pm 
Offline

Joined: Tue Jul 01, 2014 4:02 pm
Posts: 313
Just futzing around making malleable HUD tables/pop up menus/etc. Of course, getting the att's to behave right for a truly malleable table on an 8x8 grid has been fun. But even constraining to full attribute grid, I noticed something, and I wondered what all of your favorite solutions for this sort of thing would be.

Essentially, I throw all the new nametable reads into a buffer and fire it out during the NMI, 8 tiles per frame, leaving me plenty of room in the NMI. The trick though, is, when is the lesser distracting time to load new attributes.

Do you guys think I should essentially flash the attributes to the entire to-be-affected area first, so that for a frame or two, the *color* changes before the pop up box is drawn? Or do you like having the box drawn for a frame or two with the wrong attributes, and then after a pickup frame get the right new nametable tiles in place? Or do you guys do it sort of procedurally - load a metaTile to coincide with a new attribute and sort of do it metaTile by metaTile rather than a run of nametable data then a run of attribute data/vice versa? Or maybe even something I haven't thought of?

I have played around with all of these to see which method I like more. They all have pros and cons. Curious what you guys would think of this.


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 8:17 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10812
Location: Rio de Janeiro - Brazil
I always go with the least glitchy-looking option, so I'd probably always do AT-aligned updates (e.g. metatiles).


Top
 Profile  
 
PostPosted: Thu Mar 29, 2018 8:23 pm 
Offline
User avatar

Joined: Wed Apr 02, 2008 2:09 pm
Posts: 1243
Image
I did it per tile both ways above. Which... wasn't easy.

Edit: For more clarity, my strategy there was when the textbox was appearing it should win. (Level is the wrong color when the boundaries aren't aligned.) And when the textbox is disappearing, the level should win. (Textbox is the wrong color when the boundaries aren't aligned.)

If you're locked to the metatile grid (which may even look better than the above) absolutely update the attributes and tiles at the same time so nothing is ever colored wrong.

_________________
https://kasumi.itch.io/indivisible


Top
 Profile  
 
PostPosted: Fri Mar 30, 2018 12:07 am 
Offline
User avatar

Joined: Sun Jan 22, 2012 12:03 pm
Posts: 6807
Location: Canada
If you do it in two passes, you can use a clean looking "black box" as an intermediate step.

1. Fill the overlay area with black (or color 0) tiles, line by line.
2. Replace the attributes in the overlay area.
3. Draw the finished overlay line by line.

When it's done, do the reverse.


Top
 Profile  
 
PostPosted: Fri Mar 30, 2018 3:49 am 
Offline

Joined: Tue Jul 01, 2014 4:02 pm
Posts: 313
Great advice, both of you! Kasumi...buzarre that I remember a time long ago now that I think you were walking me through how you werw having this exact problem while patiently giving me some great ‘beginners’ tutelage! Seems like a lifetime ago now.

Rainwarrior - brilliant. I already have a routine that fills said box area with *blanks*, so that’s a brilliant way to handle it! Hadn’t even thought of extending it to two steps like this, but sure, that makes sense. Would completely solve the problem. Thanks for the thought!

EDIT - Like this :-)

Image


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 7 hours


Who is online

Users browsing this forum: koitsu 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