Good evening! I am developing a 2D game on Delphi + OpenGl. There is a map in the size, for example, 40x40, and on the monitor some part of the 20x20 map is displayed. The output of the map makes a two-dimensional array, which actually should increase the FPS of the game. Everything works fine, but when I switch to full-screen mode when driving, some "flicker" appears on the map, as if the output does not have time for movement. But it only seems at first glance.

If you put the size of the form is not in full screen mode, and for example:

Frmgl.Height:=Screen.Height; Frmgl.Width:=Screen.Width-1; 

then everything works flawlessly! The whole problem is that I put the application in full screen mode. Mikhail Flenov wrote about this bug and found a way out of it, we just write in form creation:

 WindowState := wsMaximized; 

He threw off the game to one person and he, as he told me, didn’t flicker, but the other one has ... Although he tested it on 3 computers with different configurations and nothing has changed, flicker remains, because of what - the second I can not understand the day.

So that you understand what's the matter, I uploaded the link: http://narod.ru/disk/38902687001/0.0.1BA.zip.html

PS in the Options file in the first line we write: BorderStyle = BsSingle , if we want to not full-screen mode, but if vice versa, then BorderStyle = BsNone

  • one
    The program must determine the resolution in which it is running (or set the permission itself). Depending on this, the coordinates of the interface elements and others are already counted. The worst option is to make the game support a single resolution, for example 1024x768. - insolor
  • The old problem was solved and now a new one has appeared. - LapinioZX
  • Does no one know how to solve this problem? I would not believe it. Please answer people. - LapinioZX
  • I do not flicker. And what is the new problem? - angry
  • Yes, actually flickering - there is my problem. Well, no way I can not understand why my flickers, and others everything is OK? - LapinioZX

1 answer 1

The whole problem was incorrect double buffering. It seems to be true, but it did not work ... And it worked without flickering in people with double buffering enabled in the settings of the video card. Maybe someone in the future will help)