Sure, here is the whole function for context but I'll excise the parts you requested and put them…
Show us more code. How BitmapAccess and BitmapPixelOffset is declared and how values are calculat…
EDIT: Thanks Mmozeiko! Bug found, not nearly as insidious as my ego would have hoped, turns out t…
EDITED: sorry, nevermind! :dry:
Yeah, looking forward to :woohoo:
Lenny —
This is relevant as Casey has worked on this game. Congrats!
http://www.reddit.com/r/AskReddit..…
I think the calculation is like this:
sprite_width_px = sprite_width_meters * screen_width_px / …
It's the focal length that was the surprising thing to me, not the camera distance, but I guess m…
Well, there's just a lot of stuff to talk about here, so I'd rather wait until we go do the final…
elle —
I figured out the problem because I understand it now, thanks in part to you.
The bug wasn't obv…
Yes, the room is several meters wide so viewing it from 20m distance makes sense.
My first thought was that the z value which is 1.0f hardcoded gets multiplied by 1 over some mete…
Could the problem with the scaling calculation could be that you are mixing real-world-meters (di…
elle —
In HH, we only have a notion of x and y coordinates, yet, one 'chunk' spans multiple screens.
I …
We will cross that bridge when we come to it, but in general I suspect we can solve it by just ha…
What do you mean - only use x and y coordinates? Then how will you know where to access screen in…
elle —
This makes sense and I get it now, but I want to be able to access the tile via only the x&y …
I apologize if this has been asked already, I have't watched the Q/A sessions for all the episode…
mmozeiko For bigger matrices do either Gauss elimination which can bet numerically unstable if no…
There is no way "grid[1*tilesY*tilesX + 0*tilesX + 0]" will show tile on 7th row, unless your ren…
elle —
Thank you for your time, but the following doesn't show a tile on the first row of the second scr…
For second screen you do this:
1grid[1*tilesY*tilesX + y*tilesX + x]
For N'th screen you do th…
elle —
But what is the general way to access the first row of the second screen to the right?
By the wa…
1
2grid[0*tilesX+17] = 1;
grid[0*tilesX+18] = 1;
This is same as:
1
2grid[0*tilesX+y*17+0] = 1;
…
My guess would be that he chose Gauss elimination because it is very easy to explain and show how…
Thank you for your reply an the enlightenment :)
So yeah, that was what I thought, but I am also…
elle —
I managed to visualize the issue. My drawing code shows 17x9 tiles every screen.
grid[0*tilesX+1…
For small matrices (2x2, 3x3) you just write equations directly and use it. Cramer's rule will he…
So in day 101 Casey went on great length explaining about Matrix inversion and it seemed is is go…