Week 3- car

Concept
This will be a generative artwork of a dynamic cityscape in which cars move along a busy street; the colors of buildings will change over time. The rhythmic movement within an urban setting will be simulated using programmed randomness and structured object-oriented programming. It also lets users interact with the scene-for instance, causing the cars to crash by clicking on them. A bright yellow flash to mark the moment of collision adds engagement and surprise.

Development Process.

This project deals with the work of OOP principles on such elements as cars, buildings, and road features.Arrays are used to hold these objects and then manipulated for flexibility in animation. The cars move continuously across the screen, resetting at their edges, and the buildings keep slight variations in height and color to give it a more organic feel as if from a real city. Introduction of clickability on the cars introduces user interaction, an important aspect of making the artwork from a simple, passive, visual display into an active system. Challenges and Refinements Among these, one major problem was getting the cars to glide smoothly across the road, which kept floating above it, out of alignment with the street. Changing some positions and managing more realistic layering helped improve that aspect. The second aspect was embedding the collision effect impressively while managing the aesthetics of the overall scene. The crash effect turned out much better with just fine-tuned timing and changes in opacity of the yellow flash, not to overwhelm it.

Future Improvements
There are several possible ways to take this project even further. One could add in environmental elements such as weather effects, changing times of day, or a richer soundscape for added realism and interaction. Implementing more complex behaviors for the cars, like random stops or variable speeds, would also increase the depth of the simulation. Finally, making the user be able to reset or change the scene dynamically within the artwork will make it far more engaging and replayable.

Code im am proud of is this specially

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
}
crash() {
this.isCrashed = true; // Car stops moving
this.speed = 0; // Set speed to 0 for a realistic stop
}
}
} crash() { this.isCrashed = true; // Car stops moving this.speed = 0; // Set speed to 0 for a realistic stop } }
 }

  crash() {
    this.isCrashed = true; // Car stops moving
    this.speed = 0; // Set speed to 0 for a realistic stop
  }
}

where I figured out how to make the car stop to seem like it crashed

Leave a Reply