Jump to content
  • 0

How to make graphics overlay adapt to the screen size?


Guest

Question

I'm trying to make a mini map system by overlay, however I made images with 1920x1080 resolution, but when opening the game, it is only possible to see this resolution, I wanted the image to adapt to the size of the screen, even if it may lose resolution in the image

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

You will need to have two different types of resolutions:  client resolution and a virtual resolution.

 

The client resolution is responsible for changing the resolution of the client window by assigning its width and height and determining if the client is full screen or not. The virtual resolution is responsible for how your game content is drawn inside of the game client. Therefore, you could set your client resolution to 800x600 and still be able to draw content that is 1920x1080 or whatever your graphics are set for.

 

If you would like assistance with implementing something like this then let me know.

Link to comment
Share on other sites

  • 0

For example, I want to create minimap with 256x256 resolution
And I want them to be on the top left side of the screen, but when using it as an overlay it stays in full screen, regardless of the resolution, I wanted the image to be the original size, regardless of the resolution

 

Like: 1920x1080 resolut

https://ascensiongamedev.com/resources/filehost/43ece541a24bd4224f7128d839ee8fbe.png
 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...