Assignment Chef icon Assignment Chef

[Solved] CS2261 LAB9-Complex Movement & Collision Maps

5.0 1 customer review Digital download

Digital download

$25.00

Availability
In stock
Checkout
One item

Need a hand?

Message us on WhatsApp for payment or download support.

WhatsApp QR code
In this lab, you will be completing several different TODOs, which will, piece by piece, add complex sprite movement. Your code may not compile until you complete an entire TODO block, at which point the game should compile with a new component of the final outcome (unless otherwise specified).

TODO 1 Complex Camera Movement

We want our jigglypuff to walk only on the screen, and have the camera follow it without showing something outside of the world. CS 2261 Spring 2021 In game.c, in the updatePlayer() function, add in the sprite and camera movement. In game.c in the drawPlayer() function, set jigglypuffs screen row and column in the shadowOAM Hint: the screen row is the world row minus the background vertical offset; the screen col is the world col minus the background horizontal offset Your jigglypuff should now be able to walk around and see the entire map, but not off of the edge. The jigglypuff should always be in the middle of the screen unless at the edge of the map (see the example.gba).

TODO 2.0 Collision Map

Now we want our jigglypuff to treat the visuals of the map as if they were actual barriers to movement. Include collisionmap.h in game.c. You will know if it runs correctly if you:

Tips

Complex movement Collision maps