Created on 30th March 2025
•
This project recreates the nostalgic Snake Game experience, providing a fun way to test reflexes and coordination. It also serves as a great learning resource for beginners in Java, demonstrating event-driven programming, graphics rendering, and basic game mechanics using Swing and AWT.
Handling smooth movement: Initially, the snake's movement felt sluggish and unresponsive. I optimized the event handling by using a Timer and controlling key inputs efficiently.
Collision detection: Detecting when the snake collides with itself or the wall required precise boundary checks, which I fixed by refining coordinate calculations.
JAR File Issues: Encountered missing jar.exe while packaging the game. I resolved it by reinstalling a proper JDK version with full tools.
Image loading errors: Faced issues loading images inside the Board class due to incorrect resource paths. Fixed by using ClassLoader.getSystemResource().