You can play the game on https://farmar.io/cars/ If you are playing on mobile play horizontally
The game was created with some prompt engeneering.
Pseudocode
- Act as a professional HTML5 game developer, I need help preparing an HTML5 game.
- It is a pseudo-3D graphics race game.
- Make it a dynamic 2D canvas.
- Tha game takes 100% of the players viewport
- The sky takes 15% os the screen
- The game has a centre point in the middle of the horizon, from which all the elements originate.
- From centre comes the grey road in shape of the triangle
- It has two green roadsides
- Every object in the game comes from the centre of horizon and gets bigger as it is moving for the pseudo 3D effect
- Below, you will find the game objects and their graphics:
- Incoming cars: 🚘🚖🚍🚔
- Trees that can appear on both sides (roadSideObjects) of the road: 🌲 🌳 🪨
- Player car: 🚗
- the cars should appear in the centre of the game where the road meets the horizon. they should be bigger as they approach the player. they should move from the horizon towards the player at random so player have to constantly avoid them
- The roadSideObjects can not enter the grey road. They also grow bigger as they move. They should appear in the centre of horizon and move outside the screen simulating moving sideroad objects
- Think first, then write the code. Start with the most basic and essential fundamentals for the game first.
- First, please provide me with a partial code, and in further responses, I will ask for the rest of the game code.