How to make a little window showing an enemy

Hi everybody

My intention is to do a maze game with scroll and i have a doubt about how to implement a little square in my game showing an enemy moving around the maze.Can i place this square wherever i want in the screen?

Can i do it in the same layer, defining another camera following the enemy? can i place that camera, with small size, wherever i want in the screen showing me the enemy walking in the map?

Do i have to do it in another layer? that second layer has to be as small as the square where i want to show the enemy or has to be as big as the game view?

Cameras in layers are independent? camera 0 of layer 0 is different from camera 0 of layer 1?


Hi, and great questions:

Yes, you can, in each layer you can add multiple cameras, with specific render zones, and independent size. Here is an example:
DoubleCamera.rar (22.4 KB)

Note: First camera is drawed first, the entire map is drawed with camera 0, then a little zone [from (0.8; 0) to (1; 0.2)] is drawed with camera 1 over the previous camera render.

As you can see in the example, yes, you can :wink:

Yes, totally different, camera 0,1 and 2 of layer 0 looks at layer 0, cameras of layer 1 looks at layer 1.

Lizard amazing as always…

Another questions…as i see in the examples in some games you have in the scene an object camera and in others you do not have any object camera in the scene…what is the difference between having an object camera as an object in the scene and not?

thanks again

I was checking your example…so custom size is going to be the size of the “square” where i am going to see the enemy and viweport is where i am going to situate that “square” right? what happens if i place a viewport bigger or smallet than custom size defined?

In your example the enemy appears like zoomed…ho can i see him at the same size of the player?


First of all, you have to feel free to modify the file, be curious, change the numbers, des/activate events, crash the game into a strange bug :smiley:

The custom size = the camera’s zone to look at, if you set custom size = 1x1: the camera only will look 1 pixel or something like that :confused:

Custom viewpoint = the camera’s zone to show it’s render, if only look 1 pixel (custom size = 1x1), and the custom viewpoint = from (0.5; 0) to (1; 1): you will see something like this:

(a big pixel, streched to fill the zone)

To make you enemy non-zoomed… you will have to do some maths:
In my first example, the camera’s viewpoint = (0.8; 0) to (1; 0.2), the render zone = 0.2 x 0.2 at right-top of the window
So, this show 0.2 of the width, and 0.2 of the height:
8000.2 = 160
0.2 = 120
The camera’s custom size needs to be 160 x 120 (if game’s window = 800x600), your camera shows everything that looks in the same size it looks ==> non-zoomed

If you set the camera’s viewpoint size = 0.2 x 0.5 the camera’s custom size should be 160 x 300.

Thanks thanks thanks Lizard…thanks to you i am understanding better this amazing program due to the lack of tutorials like other programs like Construct Classic and Game Maker…

Because of you i am going to focus in learning this and forget the others 2 ( I hope i am doinf right :cry: ).

Lizard, which ones do you thinks that are pros and cons with construct classic?


I’ll try to add more tutorials soon.
But remember that if you or anyone write a tutorial, just let me know and I’ll add it to the wiki :slight_smile:

A platform tutorial would be perfect…physics,walls,platforms,lights,tiled baackground, particles and guns…