Improving the ability of autonomous vehicles to accurately identify and follow lanes in various contexts is crucial. This project aims to provide a novel framework for optimizing a self-driving vehicle that can detect lanes and steer accordingly. A virtual sandbox environment was developed in Unity3D that provides a semi-automated procedural road and driving generation framework for a variety of road scenarios. Four types of segments replicate actual driving situations by directing the car using strategically positioned waypoints. A training dataset thus generated was used to train a behavioral driving model that employs a convolutional neural network to detect the lane and ensure that the car steers autonomously to remain within lane boundaries. The model was evaluated on real-world driving footage from Comma.ai, exhibiting an autonomy of 77% in low challenge road conditions and of 66% on roads with sharper turns.