Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(2 edits)

GENERAL UI COMPONENTS


ScalingUtil

Contains static method that is used globally.

Wherever an x or y coordinate is needed to define a location, the object that requires so, calls on the static scaling method to scale the value to the current screens ratio.

There is an option to scale by the height or width.


Assets

Holds all game assets.

The way i designed my scaling system, is that each asset has an option to be scaled by height, or width. Once decided, that value is then applied to the Sprite's width and height.

For example the earth image in the middle of the screen is scaled by width because i don't ever want it exceeding the boundaries of the screen's width.

Also has a dispose method which is called when the game is disposed.