A universe simulator