ninjamuffin99 / canabalt-hf

A HaxeFlixel port of classic flash game, canabalt!
Other
86 stars 14 forks source link

No collapsing building? #9

Closed sheepo99 closed 7 months ago

sheepo99 commented 7 months ago

Not sure if it's just me, but the original classic flash Canabalt had occasional buildings that collapsed when you jumped on them. Why are they absent from this version?

ninjamuffin99 commented 7 months ago

https://github.com/ninjamuffin99/canabalt-hf/blob/main/source/DemoMgr.hx

this class should be the one that handles collapsing buildings! one thing i noticed going thru the old source code is that i believe it doesn't generate collapsing building sections unless you're going fast enough. there could be discrepancies with flash version and mine, i havent run full 1:1 comparison tests in too much depth!

sheepo99 commented 7 months ago

Collapsing buildings were pretty common in the OG even at relatively lower speeds. I would recommend doing a side-by-side comparison!

Thank you for the reply!

sheepo99 commented 7 months ago

Nevermind, I just did a comparison myself, and it seems you are right. One thing I recall is that when i played the game back in the day, I was mostly using a legacy machine that could cause some slowdowns; maybe that was affecting how the game interpreted speed, or maybe the game has had multiple updates that changed the setting overtime.

Still for the sake of confirmation, it's always good to double check :)

ninjamuffin99 commented 7 months ago

haha, yeah if your machine is running it at slower framerate, it might seem like you're moving slower than you actually are!

this version runs it's logic a bit "unlocked", so 1 second of gameplay at 10fps vs 120fps, it will make the physics / math equivalent so that you'd end up in generally the same place after that 1 second. So definitely wanna make sure that various framerates run the game in the same way/manner. That's one of the new "features" of this version, so it definitely should be kept an eye on for any discrepancies that may come from that!

ninjamuffin99 commented 7 months ago

I will close this issue for now, however if you end up poking through the code and noticing anything that makes collapsible buildings not occur as frequent as they should, feel free to ping here and I'll re-open and investigate !