Editing Fio:Iterators
From Fio
Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Current revision | Your text | ||
Line 118: | Line 118: | ||
====drawing==== | ====drawing==== | ||
- | Drawing starts from the left top corner of the screen. We can easily map that corner from screen coords to a cell in the layer using the [[Fio:Isometric#Mapping|mapping formula]]. From this cell, we step to right. And when the right bound of screen reaches, we step to the next line of cells - '''compensate''' for each line(again check [http://www.gamedev.net/reference/articles/article744.asp Jim Adams' article]). While the itor marchs along, the cells far from the player got painted first and the nearer ones may cover on those further ones - the [http://en.wikipedia.org/wiki/Painter's_algorithm Painter's algorithm] is implemented. When the lines of cells fills the whole screen, we stops. An illustrate of the drawing order of the cells | + | Drawing starts from the left top corner of the screen. We can easily map that corner from screen coords to a cell in the layer using the [[Fio:Isometric#Mapping|mapping formula]]. From this cell, we step to right. And when the right bound of screen reaches, we step to the next line of cells - '''compensate''' for each line(again check [http://www.gamedev.net/reference/articles/article744.asp Jim Adams' article]). While the itor marchs along, the cells far from the player got painted first and the nearer ones may cover on those further ones - the [http://en.wikipedia.org/wiki/Painter's_algorithm Painter's algorithm] is implemented. When the lines of cells fills the whole screen, we stops. An illustrate of the drawing order of the cells: |
[[Image:Fio-Isometric-Drawing.png]] | [[Image:Fio-Isometric-Drawing.png]] |