Oh, right. I remember that.
It had nothing to do with offscreen tiles. If you have a look at the minimap, you'll notice that every "solid" is represented as 2x2 quad. A great way to assfuck any hardware.
That minimap was more of a "conceptual" thing at that point in time. We weren't sure how we wanted to handle it, so I just kind of threw it together. As you said, it ran fine on a PC, but I had literally put the thing in #ifdef #ifndef blocks to make sure the thing wasn't running on Dreamcast... that wouldn't have been pretty.
K-Bal wrote:According to some forum posts they consider even ASM optimization. I don't think they've missed the easy way.
There are plenty of areas for improvement with assembly once I get around to it. Not even "optimization" necessarily either. The PSP's vector unit is only accessible via straight assembly. The Dreamcast also has 4x4 Matrix and 4x1 Vector registers that allow for ultra-fast calculations. Both of these really SHOULD be happening in assembly to take a load off of the CPUs.
In the past, we had simply made sure 1) to only iterate through onscreen tiles to render and 2) to check if an entity is onscreen before rendering. Once we introduced uniform zoom/scale, it got QUITE a goddamn bit more messy to determine what was and was not onscreen. We haven't really decided on any one algorithm.
Ginto wrote:Well for a rotated/zoomed camera, you can do something like this.
calculate coords of rot/zoomed camera rect
create an AABB around it (so you don't have to deal with all the crazy collision stuff)
use RyanPridgeon's method, treating the AABB as the camera
That's a great temporary fix, but as the camera zooms farther and farther out, and you look at rotating your viewport something like 45 degrees, you're still going to be potentially overdrawing a FUCKLOAD.