https://vgmaps.de/maps/genesis/contra-hard-corps.php
From looking at all the level maps, it looks like all sloped tiles have the same angle. I wouldn't be surprised if this was a programming shortcut used to make the math easier, considering how complicated slopes are to program.
Were all sloped tiles in Contra Hard Corps the same?
-
- Posts: 3196
- Joined: Wed May 19, 2010 6:12 pm
-
- Posts: 1931
- Joined: Tue Feb 07, 2017 2:03 am
Re: Were all sloped tiles in Contra Hard Corps the same?
I don't think the code is the real issue, handling a slop of 3 angles is the same as handling 1 of for the most part. However when the slope is not 45 it starts to eat tiles very quickly, and if you want more abstract lengths you then need tiles of platforms at different pixel offsets to cap them nicely or you then have a couple of slope lengths to pick from. While 45 lets you use a couple of tiles for the each slope and then you can make it any length you want.
-
- Posts: 3196
- Joined: Wed May 19, 2010 6:12 pm
Re: Were all sloped tiles in Contra Hard Corps the same?
They're not 45 degree angles. They have a slope ratio of 2:1.
I still think this was done to cut corners because it's less work to divide x coordinates by 2 to get the slope height, than it is to look through a bunch of LUTs.
I still think this was done to cut corners because it's less work to divide x coordinates by 2 to get the slope height, than it is to look through a bunch of LUTs.
Re: Were all sloped tiles in Contra Hard Corps the same?
Just watched a longplay of the game; 90% of the time it's just the main character that interacts with the slopes.. except that one boss fight; which is just two objects. I doubt the 68k is going to sweat it over processing 1 or 2 objects with slop interaction. If it was indeed an optimization.. it didn't amount to anything.
Slopes aren't that difficult. I agree with Ozi.. it's a tile/vram issue of why there weren't multiple slopes. Also, 45 degree would also look odd too.. especially if it's 45 degrees on a square PAR and then throwing MD's 0.914 PAR for 320x mode is going to make it even sharper of an angle.
Slopes aren't that difficult. I agree with Ozi.. it's a tile/vram issue of why there weren't multiple slopes. Also, 45 degree would also look odd too.. especially if it's 45 degrees on a square PAR and then throwing MD's 0.914 PAR for 320x mode is going to make it even sharper of an angle.
-
- Posts: 3196
- Joined: Wed May 19, 2010 6:12 pm
Re: Were all sloped tiles in Contra Hard Corps the same?
Doing pass-through-bottom sloped tiles are more complicated than solid sloped tiles, because not only does it need to take into account if the character's feet are below a slope, but also if they were above the slope in the previous frame.
Re: Were all sloped tiles in Contra Hard Corps the same?
If I were implementing it, I'd probably do sloped one-way platforms the same way I do other one-way platforms: If feet are less than 8 pixels below the surface, push up.