Author [EN] [PL] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [ID] Topic: Deleted enemy attack in CV3, or am I missing something?  (Read 2074 times)

0 Members and 1 Guest are viewing this topic.

Offline TheouAegis

  • Amateur Auteur of GMvania
  • Master Hunter
  • *****
  • Posts: 1860
  • Gender: Male
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. The Great Defender will always defend the object of his or her fandom. Hack Master makes creations out of CV parts. (S)he makes Dr. Frankenstein proud.
    • GMvania Developer's Blog
    • Awards
  • Likes:
Deleted enemy attack in CV3, or am I missing something?
« on: July 04, 2021, 03:23:30 AM »
0
Yeah, yeah; I'm still studying CV3 after all these years. I've already found a few typos and bugs which add to the fun. Anyway, I looked into how the enemy state machines were actually set up in CV3.

Some states were inexplicably different between versions. Changes due to how graphics and audio were stored in CV3u were logical enough, but sometimes they added a state that could never run. For example, that spark that appears when you kill an enemy destroys itself in state 4, but CV3u added a fifth state which sets the state back to 0, even though there was never any code to allow it to even run the fifth state. It's an odd junk state, but whatever.

Anyway, Konami's code felt a bit convoluted to me, since you not only had an enemy's "object", but each object also had a "class" set in the 0x05EF-0x0605 range. Except for a few exceptions, pretty much each enemy object had its own corresponding class, although the values weren't one-to-one, since bosses weren't assigned classes. So this class variable was what determined which state machine dictated the enemy's behavior. Aside from the minor discrepancies noted above, both CV3j and CV3u had the same first 106 classes, then CV3u added 8 more. Of those 8, one appears to be junk code (it just points back to the aforementioned enemy death spark and I haven't seen it set anywhere), two are for enemies included in hard mode, and three are the new enemies added to CV3u (skulls, ghouls, and spear knight). Which leaves me with the two I am bringing up here.

Class 0x6B itself is an oddball. State 0 is a timer countdown state, which is odd because it's the first state -- there's no state setting the timer like there is in most other classes. I can't remember, but I think the ghosts are like this (I could be wrong), so I wrote it off as a possible ghost class. Then I looked at the rest of the states and noticed it has a ground collision state -- that is, a state which detects a collision with ground before moving to another state. Ghosts don't have that. That next state appeared to create a splash effect, complete with the *splash* audio, except it appears it's using the rock shard sprite, ruling out mermen, frogs, and spores. The splash effect used the wrong palette even. On top of it all, it occurred to me that the "enemy" in question couldn't even move despite having its VSPD altered in one of the states, because the attribute flag that allows it to move never gets set within the state machine. Furthermore, the collision check for the ground is a single-point collision at relative coordinates (0,-8); typically only small enemies and projectiles have checks at y-8 due to how Konami set their sprite origins. That led me to believe class 0x6B belongs to a projectile, which could have its timer and attribute flags set by the enemy creating it. Hooray for deductive reasoning!

But what non-boss enemy would be throwing "rocks" that *splash* when they hit solid ground? The only enemy I know of that would be throwing anything that splashes or shatters is The Creature, but that's a boss, which means none of its attacks follow the standard class system -- they follow the boss class system.

If anyone wants to play the game through on hard mode over and over, playing through each and every stage, check if addresses 0x5EF through 0x605 ever get set to 0x6B (the projectile) or 0x6C (the shard), excluding moving platforms which utilize that variable range for movement (beats me why they would do that), then let me know where it happened. Because I've been playing the game for at least an hour and I haven't come across any enemies or projectiles with class 0x6B or 0x6C yet. The states are customized, too, so at some point in the development of CV3u they were intended to get used.

EDIT: I forgot to mention, it uses the player's sprite and palette in state 1. So if you change characters, the sprite will also change. The glitched palette is also present with the falling blocks in the mountain stage, which further leads me to believe this class was attributed to a brick. The timer countdown in state 0 would thus be set when the spawner has picked a random location to create the block at. It's obviously not those blocks, though, because: this code only appears in CV3u (as far as I am aware); terrain, like bosses, do not operate on the same system as normal enemies; and the "block" shatters upon hitting the ground instead of stacking up.
« Last Edit: July 04, 2021, 02:02:47 PM by TheouAegis »
Your mom has had more floppies put in her than a Commodore 64!


Follow my lack of progress on my game at my blog:
http://gmvania.blogspot.com

Offline Inccubus

  • Wannabe Great Old One
  • Master Hunter
  • *****
  • Posts: 3265
  • Gender: Male
  • Warrior
  • Awards The Retro Gamer: Has a heated passion for the oldschool VG Titles. SuperOld Dungeonite: Members who have been around since the oldOLD days. Permanent Resident: Seems to always be around to post/reply.
    • Awards
  • Favorite Game: Vampire Killer (MSX)
  • Likes:
Re: Deleted enemy attack in CV3, or am I missing something?
« Reply #1 on: July 08, 2021, 07:06:24 AM »
0
Yeah, yeah; I'm still studying CV3 after all these years.

And I'm still intrigued to read about your findings!
"Stuff and things."

Tags: