# Pokemon Racer :checkered_flag: Choose a Pokemon. Race it to the finish line and avoid the enemies! --- ### User Stories - Type in a username - Type a pokemon name to choose / click a button to generate random pokemon - Use all my arrow keys to move my pokemon across the screen - Avoid enemy pokemons that are moving across the screen - See my health points (decrease if pokemon is hit by enemies) and other API info about my pokemon displayed on a board! --- ### What we learned... - Research how to implement features in the beginning of project - File structure for React App: put all state vars in top level App!!! --- CSS animations are fun! ![](https://i.imgur.com/tz9H2C7.png) --- But accessing CSS animation state in React is tricky...so we used `setInterval` combined with absolute positioning ![](https://i.imgur.com/JPYiEHf.png) --- ...and learned the importance of `[]` in `React.useEffect` with setting intervals and event listeners to prevent compounding effects on every render --- - Re-evaluate priorities as you go, it's not worth being stubborn and trying to solve something that is too time consuming for a short project --- ### What we're proud of... - Powering through when faced with frustrating obstacles - Helping each other out in navigator/driver style pairing - Code-reading FAC22 project to thoroughly understand the similarities in both projects --- ### With more time, we would... - Add a button to generate random pokemon player - Create finish line - Collision within range - Disable pokemon exiting viewport - Player board with hp and relevant pokemon info - Add more pokemon enemies - Allow users to choose the speed of the enemy pokemon - Try to spawn(render) the enemy pokemon randomly and make their movement also random --- Demo time! :sparkles:
{"metaMigratedAt":"2023-06-16T19:27:19.216Z","metaMigratedFrom":"Content","title":"Pokemon Racer :checkered_flag:","breaks":true,"contributors":"[{\"id\":\"3934dd6c-8588-4d47-a23b-ba8c96da8ea7\",\"add\":1886,\"del\":220},{\"id\":\"6efe631b-dc1b-41c9-af3f-fd298e6c280c\",\"add\":155,\"del\":0}]"}
    219 views