On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
A jam submission

M-CameraView project page

A flexible camera system for GMS 2.3+, focused on quick setup and ease of use.
Submitted by Mapledev (@mos_mystery) — 4 hours, 54 minutes before the deadline

Play library

M-Camera's itch.io page

Link to public repository (Github, Bitbucket, etc)
https://github.com/mosmystery/M-Camera/

Instructions for setting up your library/tool
If running the project file:
Control with R (reset), D (toggle debug), Z/X (rotate) and Mouse: left (place block), right (remove block), middle (pan), scroll (zoom).

If setting up the package in your own project:

1. Download the latest release of the M-Camera package.
2. Import it into your GMS 2.3+ project via "Tools"->"Import Local Package".
3. In the create event of the first room, create and set up the camera:

```gml
global.camera = new MCamera(320, 180, 4, 1);

// optionally define other camera settings here
global.camera.set_target(objPlayer);
global.camera.set_interpolation_values(1/8, 1/4, 1/16);
```

4. During the game, translate the camera or access any other methods like so:

```gml
// example settings
global.camera.set_start_values(room_width/2, room_height/2, 0, 1);
global.camera.set_interpolation_values(1/8, 1/4, 1);
global.camera.set_debug_mode(true);

// example translation
global.camera.move_to(x, y);
global.camera.rotate_by(90);
global.camera.zoom_by(2);
global.camera.reset();

// example anchoring
global.camera.set_target(undefined);
global.camera.set_rotation_anchor({x: room_width/2, y: room_height/2});
global.camera.set_zoom_anchor(objMouse);
global.camera.set_position_boundary(0, 0, room_width, room_height);
global.camera.unset_position_boundary();
```

See the full list of methods and their documentation in MCamera.gml

Thanks for checking out my camera system!

Leave a comment

Log in with itch.io to leave a comment.

Comments

(+1)

This looks amazing. Just downloaded it, excited to check it out.