Prep the Base: Preheat oven to 350°F (175°C). Prepare the yellow cake mix according to package instructions and pour into a greased 9×13 inch baking pan. Bake as directed and allow to cool.
Pineapple Layer: In a saucepan, combine crushed pineapple and sugar. Bring to a boil over medium heat and simmer for 5 minutes. Spread over the cooled cake.
Cream Layer: In a bowl, mix the vanilla pudding mix with cream cheese until smooth. Spread over the pineapple layer.
Top It Off: Cover the cream layer with a layer of whipped topping. Sprinkle with shredded coconut and chopped nuts if using.
Chill: Refrigerate the cake for at least 2 hours before serving.