Jump to content

Photo

zelda classic tile array limit?

tile limit

  • Please log in to reply
5 replies to this topic

#1 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 11 July 2016 - 01:47 AM

I was just wondering what the zelda classic tile limit is?

I know tiles are stored in a array.

I was just wondering what the max array length is?

I thought I heard it was 0-65535 so 65536 and the tile horizontal wrap is 16 right?

so a single tile batch is 128x128 or 256? 

I aslo know that the nes used 8x8 tiles and not 16x16 so I was just wondering the limits and how ZC worked


Edited by Shadowblitz16, 11 July 2016 - 01:48 AM.


#2 Mani Kanina

Mani Kanina

    Rabbits!

  • Members

Posted 11 July 2016 - 05:26 AM

I don't think there is any limit on how much graphics is loaded into the RAM at the same time given the PC nature of the engine. The only real graphical limitation you have is that ZQ only supports, hmm, 256 pages of tiles? I forgot exactly how many tiles there are per page but, maybe around 200 or so?

This is in general a non-problem though, even if you're super wasteful with tiles you'd be hard pressed to run out.

#3 Lüt

Lüt

    Germanize

  • Members
  • Real Name:Steve
  • Location:Chicago

Posted 11 July 2016 - 06:42 AM

Tile pages are 20 wide and 13 high, so 260 per page, and there's 252 pages (0 - 251), so 65,520 total tile spaces available.

 

I don't know about the NES 8x8 tiles, but they don't seem relevant to ZC. Walkability is done on an 8x8 grid though, so each 16x16 tile has a 2x2 grid you click to make open/solid when you make a combo out of it.



#4 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 11 July 2016 - 06:56 AM

I was just wondering what the zelda classic tile limit is?

I know tiles are stored in a array.

I was just wondering what the max array length is?

I thought I heard it was 0-65535 so 65536 and the tile horizontal wrap is 16 right?

so a single tile batch is 128x128 or 256? 

I aslo know that the nes used 8x8 tiles and not 16x16 so I was just wondering the limits and how ZC worked

 

Are you asking this in relation to working on the ZC engine (source), or for using ZQuest?

 

For the source, you'll want to look at tiles.cpp and zq_tiles.cpp along with the related .h files.

 

None of that has any bearing on using ZQuest (or ZScript) though. In any event, the tile IDs are just an unsigned int, and their internal structure is not available on the user-end. ZC tile organisation has pretty much nothing to do with NES CHR/PRG layout, and in the end, the tiles are bound to combos, to use on-screen, or linked to other objects.

 

Screen combos are indexed from 0 to 175, from a combo bank, are drawn from the combo pages, a structure that is not truly transparent to the user. ( That has its own, separate limitation set, and is not directly linked to the tile page datum. )

 

The visual tile pages are just that: visual. Tiles aren't referenced by row/column; but only by ID. The sheet organisation is set up to be convenient to the user, and is mathematically unbalanced.

 

Max array size for ZScript programming is 214747--having nothing to do with tiles, but you asked--which is the hard system limit for numeric literals (214747.9999, or in some instances, 214748.3648, for 'floating point' decimal places). The Screen->Combo*[] arrays all have a size of 176. ZScript values are stored in signed fixeds, and floating point decimal positions are faked by artificial shifting. There's a wide list of (occasionally somewhat arbitrary) limits, too.

 

See: http://www.shardstor...alues_(ZScript)

 

I'm not sure what you're trying to accomplish with the tile pages, so it may be good to clarify your intentions.


Edited by ZoriaRPG, 11 July 2016 - 07:00 AM.


#5 Orithan

Orithan

    Studying Scientist - Commission from Silvixen

  • Members
  • Location:Australia

Posted 11 July 2016 - 07:04 AM

ZC supports up to 65520 tiles being loaded into the quest file. Each tile page has 260 tiles (arranged in a 20x13 formation) and there are 251 tile pages in total. ZC's tiles are 16x16 instead of 8x8.

As for Array Sizes, I think the maximum size of an array is like 200,000 indicies (eg. int arr[200000]), but I don't have any experience with dealing with arrays that are that huge so idk what would happen if you did that.


Edited by Orithan, 11 July 2016 - 07:05 AM.


#6 Shadowblitz16

Shadowblitz16

    Illustrious

  • Members

Posted 11 July 2016 - 05:11 PM

I meant just the array that holds the tiles not arrays in general

 

I asked that because If I recall correctly the nes used and array to hold the tiles which were 8x8 pixels

so for example one tile would be a single index in the tile array





Also tagged with one or more of these keywords: tile, limit

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users