World Wrap Startup Kit Project with Defender Demo as example
Supports horizontal, vertical or both and cornered wrapping
The project was designed to help you understand and code for games that require seamless world wrapping from left to right; also know as Defender Loop screen. Though support is there for all side wrapping.
The problems with looping the screen seamlessly is two fold:
To resolve the first problem, the API includes a drawing function which you can clone the code from to make your own world wrap compatible draw. The system also includes a world wrap move function similar to GM's native function which detects if instances are at the edge and require moving from room edge to room edge.
For the second problem, the AI world wrap awareness the API include a world wrap aware instance_nearest() and a coordinate conversion function so that you can convert any coordinates to a coordinate off screen to force the AIs to use the alternative coordinate (using standard GM functions) to aim for and move to the coordinate.
The API is minimalist in nature as it includes only the things that you will require. Anything more and you would be confounded.
The demo includes a Defender clone which shows a few things:
Had to move the parent of objects up the resource tree to fix asset distribution bug