Were all sloped tiles in Contra Hard Corps the same?

Discussion of development of software for any "obsolete" computer or video game system. See the WSdev wiki and ObscureDev wiki for more information on certain platforms.
Post Reply
psycopathicteen
Posts: 3196
Joined: Wed May 19, 2010 6:12 pm

Were all sloped tiles in Contra Hard Corps the same?

Post by psycopathicteen »

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.
Oziphantom
Posts: 1931
Joined: Tue Feb 07, 2017 2:03 am

Re: Were all sloped tiles in Contra Hard Corps the same?

Post by Oziphantom »

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.
psycopathicteen
Posts: 3196
Joined: Wed May 19, 2010 6:12 pm

Re: Were all sloped tiles in Contra Hard Corps the same?

Post by psycopathicteen »

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.
turboxray
Posts: 369
Joined: Thu Oct 31, 2019 12:56 am

Re: Were all sloped tiles in Contra Hard Corps the same?

Post by turboxray »

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.
psycopathicteen
Posts: 3196
Joined: Wed May 19, 2010 6:12 pm

Re: Were all sloped tiles in Contra Hard Corps the same?

Post by psycopathicteen »

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.
tepples
Posts: 22913
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Re: Were all sloped tiles in Contra Hard Corps the same?

Post by tepples »

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.
Post Reply