Sep 11, 2022

Those parallax clouds in Castlevania III...

The floating clouds in CV3 present halfway through the forest stage and the beginning of Dracula's castle occupy 64 bytes of data: $0782 through $07C1. Each row of clouds occupies 2 bytes, with the first byte being the fractional movement speed of the cloud and the second byte being the actual offset. Thus, there are 32 rows of clouds. Clouds are sorted from bottom to top, so $(0782,0783) corresponds to the lowest row of clouds and $(07C0,07C1) corresponds to the uppermost row. 

Rooms with moving fog have a specific terrain type, so you cannot have flowing water and fog in the same room (or any other animated background, for that matter). Even if that was not the case, the lowest 4 rows of clouds share the same bytes as the calculations for water freezing over when Sypha uses her ice spell, so you would not want to have freezable bodies of water in the same room as fog without first changing the core of the water freezing routine.

The bottom clouds are the slowest, moving at a speed of 1/64pps. Although the speed increases by 1/64 for each row, the rows are not handled sequentially, but rather in steps of 9, wrapped around until attempting to set row 32. You could adjust the skip ratio by editing $0329CB(J) in the the ROM, but the value must be an even number (otherwise it will overflow into the spawner data). This results in different cloud formations. Naturally, a value of #00 will cease movement. A value of #02 will yield uniform acceleration, but the cloud speed increases toward the top of the screen. A value of #20 will restrict movement to only the middle row of clouds. From a value of #22 onward, the results will be the same as values below #20 with the rows reversed, until completing the cycle at #40. In other words, a value of #3E is the same as #02, but with the fastest clouds at the bottom.

Please be aware that, although I'm not currently hungover per se, values of #02, #16, #2A, and #3E give me nausea. As seemingly chaotic as the default pattern of clouds may seem, it has a fairly low nausea factor, especially when moving. Personally, I'm a fan of #06 and #0C derivatives. Granted, I should probably see a doctor about my motion sickness...

No comments:

Post a Comment

©TheouAegis Productions™. Powered by Blogger.