Does car lose kinetic energy when turning? I am writing simple car simulation.
Assume non friction, then in straight line the car doesn't lose speed. But what if the car is turning, there should be some kinetic energy loses to change the direction of the car, so I should subtract some speed based on changing direction, isn't it right?
Deeper explanation is welcome.
 A: Assuming non friction, we must assume the car turns because it is held by a rope or chain to a point.  The turning itself will not take energy from the system, what you have now is a constant speed that is tangent to the circle the car is following at the current car position.
A: If you assume there is no friction, the car can not turn. Why? Refer to Newton's first law: 

The velocity of an object does not change, unless acted upon by an external force, when viewed from an inertial frame of reference.

Notice we say velocity, not speed. Since velocity includes direction, turning the car means changing the velocity. Since the only external force can be provided by friction of the tires with the road (obviously, I'm assuming you don't use the exhaust as a rocket), a car can not turn without friction. 
If you're okay with friction being there, then an ideal turn requires only a force perpendicular to the direction of motion to make the car turn, which by definition, will not change the magnitude of the velocity. Unfortunately, we live in a non-ideal world, and there is always some slipping between the tires and the road, so some energy is lost, which reduces the speed of the car.
A: Lets ride the car!  
If we were in car, we observe two things; friction due to road or friction due to air drag. When our automobile takes a bend on a level road the centripetal force is supplied only by friction between the wheels and the road. This force is small. So, we drive the vehicle slowly; otherwise it may skid. The other thing we need to notice is that, we have air drag, it may add or subtract kinetic energy of the car. Note here, we have decreased the speed to overcome skidding and even friction has reduced kinetic energy.

If there is no friction due to road or air drag, we will not have the source for centripetal force, we need to decrease the speed more while turning and thus, kinetic energy will reduce. This is the reality case.     
If we speak about hypothetical case (if we don't worry even if car skids), i.e keeping the speed constant and drive, due to friction there will be chances of kinetic energy getting reduced at the turns. If we have no friction, car will not loss kinetic energy at turns, but it will skid and will be thrown horizontally. So, get ready to fasten your seat belts!
A: This question is a duplicate of Does turning sharply on a bicycle conserve more energy than a wide turn?, but the accepted answer to that question is somewhat incorrect, so it's probably safe for now. In general, in the absence of friction, the force of turning applied to something like a bike curving through a turn is approximately perpendicular to the path, and hence does no work, and the magnitude of the velocity of the object will be unchanged.
However, realistically, friction losses will probably play a decent part in it. So, if I were you I'd try setting up the simulation so that the loss in speed is governed by
$$\frac{d|v|}{dt}=-\alpha\left|v\frac{d\theta}{dt}\right|$$
or something of the sort, where $\alpha$ is a constant of proportionality which encodes the frictional energy loss associated with turning around the car and $\frac{d\theta}{dt}=\omega$ is the angular velocity of the car. 
This is a model differential equation which states that the speed-damping coefficient is $\alpha\left|\omega(t)\right|$, ie, the sharper you turn, the more speed you lose due to friction. This way, when you take a sharp turn, you lose a lot of speed from inefficiency and friction, but when you take a slow, soft turn, you don't lose as much speed.
Try various values of $\alpha$, and if possible run tests. Which ones look realistic, and which ones look goofy? Testing and debugging to find something which looks "right" is probably the most important part.
