Posted: 28th Nov 2021 19:38
Hi,

I'm having a issue with an image I created for my splash screen. It shows up fine in Gimp latest version. The ball looks round, but when I run the program it looks oval shaped. The image was 4000x4000 and my original display setting in the program was 1024x768 and it showed up oval looking. So, I decided to change display settings in the program to give it a even ratio so when I resized the image from 4000x4000 to 1024x1024 it should show up fine or so I thought. Like I said I tried the original settings as such:

+ Code Snippet
// set window properties
SetWindowTitle( "Ultimate Football Manager" )
SetWindowSize( 1024, 768, 1 )
SetWindowAllowResize( 0 ) // allow the user to resize the window

// set display properties
SetVirtualResolution( 1024, 768 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 )     // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 )    // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )  // USE THE NEW DEFAULT FONTS


To no avail. It showed up oval shaped. That is when I thought of resizing the image from 4000x4000 to 1024x1024. Still to no avail with 1024x768. So then I tried to change the settings as such:

+ Code Snippet
// set window properties
SetWindowTitle( "Ultimate Football Manager" )
SetWindowSize( 1024, 1024, 1 )
SetWindowAllowResize( 0 ) // allow the user to resize the window

// set display properties
SetVirtualResolution( 1024, 1024 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 )     // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 )    // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 )  // USE THE NEW DEFAULT FONTS


And it still shows up oval shaped. I do have a curved MSI 27" gaming monitor, but I don't think that should make a difference, should it? The program should still see it correctly I would think? Again reguardless of the monitor the image looks perfect in Gimp. I have uploaded the correct image and an image I got from a screen shot from a video. Alt+PrtSc was giving me issues so I had to do it that way. Anyway you can still see the difference. I have Windows 10 64 bit.

Any ideas?
Posted: 28th Nov 2021 23:16
Can you post the LoadImage()/CreateSprite() code please?
Posted: 29th Nov 2021 1:57
Can you post the LoadImage()/CreateSprite() code please?


Yes, but before I posted this I figured the problem out. I forgot I was setting the image to an object and the object was too small. Only 400x300, so I created an object same size as the image and repositioned it. I was doing it that way to get a certain effect. Here is the corrected code:

+ Code Snippet
SetCameraRange(1, 1, 2400)            //SET CAMERA VIEWING RANGE
			LoadImage(1, "soccer-ball.png")               // lOAD SPLASH SCREEN IMAGE
				CreateObjectPlane(1, 1024, 1024)        // CREATE FLAT OBJECT TO PASTE SPLASH SCREEN IMAGE TO
			SetObjectImage(1, 1, 0)                        // PASTE SPLASH SCREEN IMAGE TO OBJECT AND SET TEXTURE MODE
		SetObjectPosition(1, 0, -700, 1330)        // POSITION OBJECT IN 3D SPACE
	RotateObjectLocalX(1, 26.5)                   // ROTATE THE OBJECT TO FACE THE CAMERA STRAIGHT


Thank you blink0k, I have it working now