Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

HardWomen

25
Posts
6
Topics
A member registered May 08, 2020

Recent community posts

So should we use:

ct.camera.moveTo

or

ct.camera.drift = whatever and then
ct.camera.targetX = whatever ?

(1 edit)

Does the CatMod touch module have a build in trigger for swipe left and right since they are kind common for navigation and game play ?   

Thank you.

Direct Assignment using ct.camera.x/y doesn't work but ct.camera.teleportTo(x, y) do.

ct.camera.x = 0 doesn't work.
ct.camera.y = 0 doesn't work.

ct.camera.teleportTo(0, 0)
So the question now is...is ct.camera.x and ct.camera.y a read-only parameter ?

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 ?

(1 edit)

I am confused over ct.camera.borderX & ct.camera.shiftX, it's like these two concepts are crossing each other's path/fighting each other.

(1 edit)

Straight from the documentation:    

https://docs.ctjs.rocks/ct.types.html#working-with-copies


ct.types

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.

# Working with Copies

# Moving Copies Around

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.

# Manipulating Copies' look

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.
(6 edits)

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:      

Manipulating Copies' look

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).

The manual says "To align basic interfaces automagically".

Since ct.js already do a good job of rescaling everything to fitscreen proportionately, what is this ct.camera.realign(room); doing and under what condition would we ever call it then ?


What does it actually do ?

(1 edit)

ct.camera.scale.x = ct.camera.scale.y = 2 works.

you cannot:
ct.camera.scale = 2;

but yet you can:
this.scale = 2;
and you don't have to:
this.scale.x - this.scale.y = 2;