startworld¶
Start the 2D-evolution environment and populate it with sprites.
This can be run by both itself and simulate, for multiple tests.
Almost all of the GUI functionality is abstracted away either by PyGame or gui,
leaving space for all of the project-specific logic.
Almost all of the runtime behaviour for this module and all others are made unique by the config.
-
startworld.main()¶ Main function containing the event loop.
All of the
spriteobjects and its groups are instantiated here.The main event loop is set to run at a constant pace of 60 frames per second by default but because of bottlenecks (mainly rendering), the actual game speed will slow down as more
sprite.Entityobjects become active.“Actions” of the
sprite.Entity(such assprite.Entity.move()) and otherspritesubclasses are carried out by calling their respective group’sloopmethod, which in their turn call each of the individual sprite’supdatemethod.See also