![I'M SO HAPPY I COULD SHIT A RAINBOW RIGHT NOW :awesome:](./images/smilies/ms-awesome.png)
I'm making this game called XAN its an arcade game about destroying rocks. I've run into a few programming issues and I want to your opinion on the best route to take going forward.
Currently the player can Walk, Crouch, Jump and Grab(play a grab animation). You can jump by pressing LMB and grab by Pressing RMB. I'm trying to keep the control scheme simple so I can port the logic to a touch device.
Moving forward requires some functionality that I'm not sure how to approach so i'm going to give you the abstract of how I want it to work. If you lovely folks could give me some suggestions toward those goals that would be awesome.
(1 )Collision and Objects
Right now I'm using a 'world' table and I'm inserting tables from external files like "player" and "rock". Early on I found that this is sort of a singleton pattern. I need a way to check collision between the player and however many rocks are spawned in the level.
(2 ) Grabbing and slamming rocks.
The player (XAN) should not be able to walk through rocks. If Xan is grabbing while he is blocked by a rock then the animation mode should change to 'once' or seek to the last frame of the grab animation where xan appears to be holding the rock. If you 'Jump' while you are holding the rock then Xan should play the slam animation or... execute the Slam Procedure where the rock is attached to Xan until xan returns to the ground and destroys the rock.
-- When a rock is destroyed all I want to do is create a new rock. ( and score points and modify other game variables but for now I just want to create a new rock )
(3) Animation effects
How can I implement a class of behaviors that are code driven animations. Things that I can use to give more visual feedback the same way that we use sound effects. A good example is if I want to shake the player and play a noise to signify that Xan cannot lift the rock . Or if I want the rock to flash when the Xan grabs it. Or shaking the BG assets so the slam appears to have impact. How can I start building these mechanisms?
I really do want to build these things myself. Any tips on the implementation of the behaviors listed above would be much appreciated.