User talk:Nightmareci: Difference between revisions

From TetrisWiki
Jump to navigation Jump to search
No edit summary
*>Lardarse
Does row -1 mean anything in your definitions?
Line 3: Line 3:


:The issue I see with using row 0 as bottom in an implementation is that it involves a lot of decrementing, be it line-number from gravity/soft drop or row dropping from line clear, and I personally prefer using increments for the common cases and decrements for the less common cases, when writing software. Also, often a graphics coordinate system operates similarly to my row numbering scheme, with the Y axis going from 0 to larger positive values, top to bottom; an example [http://www.sdltutorials.com/sdl-coordinates-and-blitting/ here]. --[[User:Nightmareci|Nightmareci]] 04:23, 3 March 2009 (UTC)
:The issue I see with using row 0 as bottom in an implementation is that it involves a lot of decrementing, be it line-number from gravity/soft drop or row dropping from line clear, and I personally prefer using increments for the common cases and decrements for the less common cases, when writing software. Also, often a graphics coordinate system operates similarly to my row numbering scheme, with the Y axis going from 0 to larger positive values, top to bottom; an example [http://www.sdltutorials.com/sdl-coordinates-and-blitting/ here]. --[[User:Nightmareci|Nightmareci]] 04:23, 3 March 2009 (UTC)
::I know the theory of top-left being (0,0) when screen drawing. It's just that if you're always assuming that your coordinates are positive, then starting from the top only gives you a limited number of offscreen rows. --[[User:Lardarse|Lardarse]] 01:44, 10 March 2009 (UTC)

Revision as of 01:44, 10 March 2009

Any reason why you aren't using row 0 as the bottom row? --Lardarse 11:24, 2 March 2009 (UTC)

Mainly so that it more closely matches the way in which it'd be implemented in some programming languages.
The issue I see with using row 0 as bottom in an implementation is that it involves a lot of decrementing, be it line-number from gravity/soft drop or row dropping from line clear, and I personally prefer using increments for the common cases and decrements for the less common cases, when writing software. Also, often a graphics coordinate system operates similarly to my row numbering scheme, with the Y axis going from 0 to larger positive values, top to bottom; an example here. --Nightmareci 04:23, 3 March 2009 (UTC)
I know the theory of top-left being (0,0) when screen drawing. It's just that if you're always assuming that your coordinates are positive, then starting from the top only gives you a limited number of offscreen rows. --Lardarse 01:44, 10 March 2009 (UTC)