Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics


Create cool 2D games with a free game editor! · By Cosmo Myzrail Gorynych

What does; actually do ?

A topic by HardWomen created 21 days ago Views: 28 Replies: 3
Viewing posts 1 to 3

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; doing and under what condition would we ever call it then ?

What does it actually do ?


It is useful on different screen proportions. Say, you have 16:10 monitor, I have a 16:9 one, and my sister has a 21:9 ratio, and a game runs with ct.fittoscreen’s “Scaling without letterboxing” mode. Your game will cover any screen, fully, but without elements that were supposed to be placed in corners will be in the wrong places if the screen is of different aspect ratio you were designing for.

Here is how it works with the catformer demo and its UI layer — by stretching the window, I can “simulate” screens of different width:

And here is how it works without;:

Though is not perfect, it is better than nothing :D If is not enough, one can always align their UI manually relative to and

(6 edits)

Oh I see it now, 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 which element should be pulled towards the left or the right (or top or bottom for that matter).

How does "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 would not be ultilized by me at all.   

Thanks for the explanation !


How does “know” which element are to go towards the left or right ?

It works based on copies’ xstart and ystart coordinates, and interpolates them based on initial and new camera size.