Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong spring collision in Deserto2 #62

Open
progwolff opened this issue May 5, 2019 · 3 comments
Open

Wrong spring collision in Deserto2 #62

progwolff opened this issue May 5, 2019 · 3 comments
Labels

Comments

@progwolff
Copy link

spring

The spring's animation changes (levelPlayer->overlap(x, y - height, width, height) is true)
The event is not triggered though (levelPlayer->overlap(drawnX + F2, drawnY + F2, width - F4, height - F4) is false).

@carstene1ns
Copy link
Collaborator

Might be another wrong offset (like #50).

@progwolff
Copy link
Author

You're right. It is drawn 2px too low.

@synchronleuchter
Copy link

Could it be that all springs, maybe even all sprites are misplaced in some capacity? I checked the first spring in Diamondus and it seems this way:
image

Compare to the GOG version:
image

It looks 3 pixels too low and one pixel too far right to me. I seemed to remember the level ending graphics to have the same problem, so I played through Diamondus to check it out. On my way, I also found these:

image

which are supposed to look like this:

image

So the large ammo pickups seem misplaced, too. I didn't check the small ammo and score pickups (as they move), but see here:

image

Apart from the junk around the smoke, to the bottom right, there are a few stray green pixels. I haven't looked at the codebase enough to judge if that's also a sprite, but if all sprites consistently were offset, I don't know, maybe this has to do with that.

I also can't put my finger on it, but score pickups sometimes seem slightly misplaced compared to how I remember them from playing the game in the 90's. Some can't be picked up, too.

Playing around with the codebase, I found a place where I could change the offset sprites are drawn at:
image

But now Jazz is drawn at a wrong height, too, so I doubt it's the drawing itself, but the placement.

If I change the placement of masked sprites to be 3 pixels higher, the enemies seem to float:
image

So I guess it's not all sprites and not all masked sprites. Seeing as how different sprites are offset differently, there's probably not a constant offset, but some loop that adds a progressive error, I think.

Anyway, the following dirty hack ruins a lot of offsets and makes the lizards on Deserto run deep inside the sands, but it makes the spring in question trigger:

image

Certainly not a fix, but maybe a starting point? I don't know, it seems like that "-3" needs to be dependent on the sprite type. It fixes springs but ruins other things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants