3
\$\begingroup\$

See here for reference.

For the most part this game is a 2D side scroller with the expected platformer architecture: move left, right, jump, shoot, etc. Enemies move and you jump out of the way or shoot them.

But at 0:50 in the video, a well-timed button press interrupts the game's otherwise predictive behavior. The play does a physical attack that slows down the game, the camera moves in, and a barrage of attacks on the enemy are released.

So, how does the enemy model know how to animate based on being hit? Ok for a better example of a bigger enemy, check out 1:13.

The enemy hangs in the air due to the slow mo, and then the player rushes, grabs the tail, throws the enemy down, and is fired upon all while sort of abiding by the game's mechanics. What I mean by sort of: in the enemy flashes white briefly when getting his as he would in a normal scenario. But what happened to the player model? Does the sequence of the player and the monster become one model as it animates or are there two separate models and they're timed just right to appear as though they are interacting? It also boggles my mind because the enemies appear to slow down while the player proceeds to move at their own pace when when throwing the enemy around. That leads me to think its an animation and not a coded behavior.

How what does the code for counter attacks look like? I've never written a game that has the ability for counter attacks. Imagine if there were multiple enemies attempting to counter attack how does the engine manage a scenario like that?

\$\endgroup\$
  • \$\begingroup\$ I guess it sets the game into a specific state so everything else is halted. The animation you see are fixed but still respecting the world ( like when she throws it on the ground it still collides with the floor ). \$\endgroup\$ – Sidar Jul 10 '17 at 11:46
  • \$\begingroup\$ Just as an additional note, all the camera juddering moving and sweeping - whilst looking good - helps to hide any irregularities you may have noticed otherwise. \$\endgroup\$ – Trotski94 Jul 10 '17 at 14:44
  • \$\begingroup\$ @Sidar yeah that's what gets me. How is it an animation and yet interacting with the world and responding to bullet hits... \$\endgroup\$ – Dan Jul 10 '17 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.