Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics

All-in-One Camera for Gamemaker 2

Gamemaker Studio 2 Camera and visual editor: Follow objects, screen shake, view scaling, screen effects, etc · By jasontomlee

Documentation of minimal usage

A topic by Thomas Haaks (Right Angle Games) created Feb 02, 2019 Views: 235 Replies: 1
Viewing posts 1 to 2

Hi Jason, bought your asset over on YoYoGame's Marketplace and I think it's awesome ;-)

But it seems to contain quite some stuff that is not yet used (like the particle scripts or the time_set stuff).

I'm also not quite sure if I need the PRE CONTROLLER object in my own games when I just want to use the camera scripts. The CONTROLLER object includes a lot of debugging stuff I might have to strip down for my own game if I have to have it.

If it IS required I would suggest you clean it up and just keep the absolutely necessary stuff required for the camera asset. You should extend the CONTROLLER when you start to add more features and they require some more functionality inside the CONTROLLER.

Another issue are naming conventions across your asset:

  • some script names are all UPPER_CASE (most of the Particle scripts)
  • some script names are lower_case (in the General and ASSET_Cam folder)
  • some script names use some mixture of Camel_Case but with "_"
  • Global variables use all different upper/lower case mixtures (debug_lerp_alpha, WINDOW, TIME, font, ...)

Then there are areas I think you should improve design/code wise:

  • The CAM object contains functionality only used for the demo (much code in the step event of the camera object) like starting the screen shake on right mouse click, dealing with the Shift key and such. This does not belong there. You should create a separate controller object for the demo room which handles all that stuff. The CAM object should stay clear of that and just deal with camera stuff that is set via scripts.
  • Also dealing with the debug buttons in the demo does not belong into the CAM object (begin step, alarm 1, draw gui) but should be moved into this separate controller or debug object.

As you see, for now my only complaints are just code cleanups and once more: the overall functionality is great and just what I wanted!




Got it Thomas!
Can't thank you enough for these points- I'm a bit of a messy fellow so staying organized & neat was tough haha!

So I'll make sure to apply these changes very soon:
-It doesn't make sense for the debug buttons to be in the same object. All debug controls in a separate object.
-Uncessessary scripts should be removed
-Scripts should have a consistent letter case

A random note: The PRE Object will always be there in my projects to initialize fonts, window-sizes, controls, global particles, etc once.
It makes initializing that data through separate ( ini ) files much easier. 

Again, thank you Thomas for your kind & constructive words. Happy coding mate !