TomHarte / Isometric-Ray-Cast

Zero-overdraw isometric graphics for the ZX Spectrum, featuring the Ant Attack map.
28 stars 0 forks source link

Very cool!!! #1

Closed santiontanon closed 3 years ago

santiontanon commented 3 years ago

Very cool Tom!!

A couple of simple optimizations if you are still looking for additional speed (only took a quick peek at the code, so, not much yet :)):

Again, very cool work :)

TomHarte commented 3 years ago

On JR vs JP I guess I'd need to make an estimate of how likely each branch is? Like JR is preferable whenever the probability of the branch being taken is less than 60%*?

* in that I think it'd be x such that x*7 + (1-x)*12 < 10?

santiontanon commented 3 years ago

Ah, yes, the conditional ones definitively need some thinking about! Sorry about not being specific enough, I was just referring to the unconditional ones. Not sure what tools do the Spectrum emulators have for profiling, in openMSX, I'd just write a quick TCL script to count the the number of times the jump is or not taken. Not sure if it's easy/hard in Spectrum emulators. But in any case, I read you were planning some refactoring, so, maybe my comment will not apply after the refactor anyway :)

Really cool idea btw! Amazing work!

TomHarte commented 3 years ago

Refactoring affected your second bullet point because I just started using IX throughout rather than doing a complicated ex/pull/push dance; everything else I have factored in!

I was actually thinking about this from the MSX's point of view: for this approach on an MSX you could upload the 128 tiles ahead of time, in full colour since there are never more than two colours per 8x1 slice, then do the full output step by just pushing the new tile map. So a 768-byte transfer to the VDP and that's it — full colour, and faster.

I don't really think I'm actually going anywhere with this project though, so that's probably just idle observation.

santiontanon commented 3 years ago

Interesting!! I think this could power a scrolling isometric game! Head over Heels with large scrollable screens. Could be pretty cool! Sprites do not play well with isometric, so maybe reserve a few tiles in each bank for moving characters/enemies, and use sprites only for visual effects. Could be very cool! The only isometric games with scrolling have very simple room structure (probably for easy redrawing)