Not sure what kind of simulation your attempting but if its 3D then some other tips regarding implementing a 3d world to show in your window look into RayCasting which is actually very easy to do and...