So should we use:
ct.camera.moveTo
or
ct.camera.drift = whatever and then
ct.camera.targetX = whatever ?
What does the "Support High Pixel Density" checkbox do ?
The FitToScreen(Scaling with Letterboxing) already does a good job scaling it up.
If you want a high resolution game, you would naturally create a game at a higher resolution.
So what is that checkbox for ? To upscale it beyond the powers of FitToScreen(Scaling with Letterboxing) using artificial intelligence ?
What exactly does it do ?
Straight from the documentation:
https://docs.ctjs.rocks/ct.types.html#working-with-copies
This object allows you to create new Copies and manipulate them. Each copy is an instance of Pixi's AnimatedSprite class, so you can find much more parameters
at their docs site.
Each Copy has these parameters for movement:
x
, y
— its location;xprev
, yprev
— location of a Copy in a previous frame;xstart
, ystart
— coordinates at which a copy was created;speed
— movement speed (or the length of vector [hspeed; vspeed]);hspeed
and vspeed
— horizontal and vertical speed;direction
— movement direction (from 0 to 360);gravity
— gravity force;gravityDir
— gravity direction (from 0 to 360, default is 270).You can also call this.addSpeed
to add speed vector to a Copy in a given direction.
this.addSpeed(speed, dir);
To actually move a copy, you should call this.move();
in your copy's OnStep code (it is included in each Type by default). Default movement system already takes ct.delta
into account, so it will move with the same speed at every frame rate.
There are a number of parameters that can be changed:
animationSpeed
— animation speed. Higher is faster, lower is slower;depth
— the drawing layer;tex
— the name of a texture to use;rotation
— the rotation of the copy in degrees;scale
— the scale factor of the object. You can either assign a simple value (this.scale = 0.5;
) for uniform scaling or access its x
and y
compounds (this.scale.x = 0.5;
).tint
— the tint applied to the sprite. This is a hex value. A value of 0xFFFFFF
will remove any tint effect. The colors are the same as in CSS, e.g. 0xFF0000
is red, 0x00FFFF
is cyan, ect;alpha
— the opacity of the copy. 0 makes a copy invisible, 1 is the default (fully opaque) mode. All in between will make a gradual transparency change;visible
— the visibility of the object (true
or false
).Read-only variables:
currentFrame
— current drawing frame index. You should change it with gotoAndPlay
, gotoAndStop
methods;totalFrames
— the total number of frames in the Copy.Oh I see it now, ct.camera.realign is AMAZING !!!
Thank you for taking the time to show the screenshot, this should be in the documentation, this is SO AMAZING !!!!!!
Now...what do you do to tell ct.camera.realign which element should be pulled towards the left or the right (or top or bottom for that matter).
How does ct.camera.realign "know" which element are to go towards the left or right ?
How do you inform it ?
PS: Wait I just saw that this magic is required only for Scaling without letterboxing, since all my game will be played with cropping on because things can get real complicated real fast catering to all the resolutions, it looks like ct.camera.realign would not be ultilized by me at all.
Thanks for the explanation !
That is not true, I am not a lier:
There are a number of parameters that can be changed:
animationSpeed
— animation speed. Higher is faster, lower is slower;depth
— the drawing layer;tex
— the name of a texture to use;rotation
— the rotation of the copy in degrees;scale
— the scale factor of the object. You can either assign a simple value (this.scale = 0.5;
) for uniform scaling or access its x
and y
compounds (this.scale.x = 0.5;
).tint
— the tint applied to the sprite. This is a hex value. A value of 0xFFFFFF
will remove any tint effect. The colors are the same as in CSS, e.g. 0xFF0000
is red, 0x00FFFF
is cyan, ect;alpha
— the opacity of the copy. 0 makes a copy invisible, 1 is the default (fully opaque) mode. All in between will make a gradual transparency change;visible
— the visibility of the object (true
or false
).