)
Development of a Phaser and SvelteKit-Based Racing Game
Currently working on a project that combines the power of Phaser with SvelteKit
Johan
2025 | 2 | 15
Ok, so i stopped trying to sync two games with websockets. I dont know if my approach was wrong, but anyway. im still interesting in Phaser so i decided that I needed to make a car racing game.
Current Features
Tracks and Obstacles: The game features dynamically loaded tracks defined in SVG format, converted into physical objects using
Matter.js
for realistic physics.Background and Foreground: Parallax effects add depth and dynamism, with background and foreground layers moving at different speeds based on player movement.
Game Mechanics: Players control a car that can accelerate, brake, and jump. The vehicle’s suspension and wheels react to terrain, creating a realistic driving experience.
Time Tracking: A stopwatch records lap times, allowing players to compare results and compete for the best score. Ive chosen to use supabase to store the results since ive used it for other projects before and find it fun and easy to use!
Key Learnings
SVG to Game Objects: Converting SVG paths into game physics objects has been a rewarding challenge.
Parallax Effects: Implementing layered movement enhances depth and immersion.
Physics-Based Gameplay: Using
Matter.js
has deepened my understanding of physics engines in gaming.SvelteKit and Phaser Integration: Combining SvelteKit’s reactivity with Phaser’s game engine has proven to be a powerful setup for modern web-based games.
Future Plans
I plan to expand the game with additional tracks, refined mechanics, and the ability for players to upload their own tracks. Excited to share more updates soon!
The game is very much a wip, but its live here for anyone to test: drive.johandigital.com
** Note! Since currently working on this, the controls are cranked up to be really powerful, so i can reach the end of tracks really fast.. Will fine tune it later..🚀
Loading posts...