Recent

Author Topic: Gameboard for my game displaying differently on different computers  (Read 2433 times)

rwebb616

  • Full Member
  • ***
  • Posts: 133
Hello,

I'm not really sure how to handle this issue - In my game I set up a 1920x1080 gameboard that is supposed to be displayed on a secondary HD monitor (or HD TV) and the plan was really only to support 1920x1080 but I'm having some issues and I'm not sure why.  The gameboard is set up as follows:

base form with a Timage component set up as alClient so it takes up the whole base form.
Then base form is set to start maximized and is placed at 0,0 of the selected monitor (from my options and it uses screen.monitors
  • .left and .top to position)

it has a border style of bsNone so there is no title bar etc. 
The Timage has a picture that gets loaded and changed at various points throughout the program.  The images that are swapped out are 1920x1080 made in photoshop.  If you look at the details on the images they are in fact 1920x1080. 

On my test system and test monitor everything displays properly.  If I run it on my laptop even though the display settings show that it's 1920x1080 it shows up in the upper left corner taking up only about 2/3s display.  I assume that this has to do with Windows scaling settings as if I set it to 125% it will be very close but things still don't line up as they do on my desktop development machine.

There is probably a better way to handle this by scaling the images etc.  but there are also text labels that are being positioned taking 1920x1080 into consideration - don't remember if I hard coded that anywhere, but I think I did something like screens.monitors
  • .width div 2 to get the center and then went from there.


Any ideas as to what might be going on with maybe the scaling?  Or also any ideas on maybe a better way to set this up? 

Rich

Handoko

  • Hero Member
  • *****
  • Posts: 4292
  • My goal: build my own game engine using Lazarus

rwebb616

  • Full Member
  • ***
  • Posts: 133
Thanks man you're good!  That was it.  I didn't even know that was an option but now I do - learning something new every day.
Rich

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 1122
    • Burdjia
Anyway, you should use a game library or a game engine instead of LCL.  Game libraries deal with that (and much more) so you don't need to worry.
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

rwebb616

  • Full Member
  • ***
  • Posts: 133
Anyway, you should use a game library or a game engine instead of LCL.  Game libraries deal with that (and much more) so you don't need to worry.

Yeah I understand the function of a game library / engine but my "game" is so simple in it's operation that I don't know that it would have been worth the investment of time to learn what I needed to for that.  It has no animation (except for one place where animation could have been nice), no custom drawn graphics or sprites, no movement of characters etc.. It's just a remake of a mobile application to make it work in a team play environment.

It would be interesting to see how to rebuild it using something like that now that I have a version 1 that is usable.

Rich

 

TinyPortal © 2005-2018