"A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

For other topics related to the FreeBASIC project or its community.
Landeel
Posts: 751
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Landeel » Feb 09, 2019 21:04

Tourist Trap wrote:Hello Landeel,

I tried to figure out how to get rid of the high dpi bug on win10. Here is my find so far. If not compiled as a project on winfbe, but rather as a standalone application without any special features (manifest is guilty I guess) you can set the dpi compatibility by hand by a right click on the exe.
Then how to detect the dpi at first? Maybe try GetSystemMeyricsForDpi(int, uint) as int , lib user32, alias same name, in short! I don't know how to use it anyway and may fail under other os than win10.
Ok, afterwards, if dpi high, shellexecute the compatible version from your main program?

Those are my 2 cents, this is a quite bigger issue than it seemed first. Good luck for the challenge. Last few hours :)


Hey,
thanks for the tips.
I have tried the game in a few Windows setups and could not reproduce this.
Until I have access to a machine that actually manifests this problem, it's very hard to fix.
There are a few options in the ini and command-line that can work around this. According to Lachie, running it windowed at a resolution smaller than the desktop works.
Argh, why can't Windows just set the screen mode I asked? Looks like a bug to me.
For now I'll just concentrate on the game itself and leave this issue unsolved until I can see it for myself and run a few tests.

If not compiled as a project on winfbe, but rather as a standalone application without any special features (manifest is guilty I guess)

I'm cross compiling from Linux, so I have no idea what this is. Maybe I can write a manifest that says "no scaling, damn!" and add it to the executable?
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Lachie Dazdarian » Feb 09, 2019 21:21

Boromir wrote:Here's the indiedb page where I'll be putting the download link. I'm working on a few last minute things.
https://www.indiedb.com/games/basic-warfare


Erm, single player mode?
fxm
Posts: 9981
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby fxm » Feb 09, 2019 21:22

For a high resolution screen the recommended size of text, icons and apps by Win 10 is 125% (or even 150% depending on screen resolution) for a better readability in the Win screens.
If I set this Win 10 setting to 100%, a simplest code and your fbshoot properly work (with 125%, both visualizes only a part of the normal image).
But staying 100% (instead of returning to 125%) induces a bad readability for the Win screens on my PC (1920x1080).
Last edited by fxm on Feb 09, 2019 21:35, edited 2 times in total.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Tourist Trap » Feb 09, 2019 21:31

fxm wrote:For a high resolution screen the recommended size of text, icons and apps by Win 10 is 125% (or even 150% depending on screen resolution) for a better readability in the Win screens.
If I set this Win 10 setting to 100%, a simplest code and your fbshoot properly work (with 125%, both visualizes only a part of the normal image).
But staying 100% (instead of returning to 125%) induces a bad readability for Win screens on my PC (1920x1080).

Yes, as soon as we use higher dpi than 96 things will overscale (to compensate downscaling of a higher dpI?). UEZ just posted a method to detect the scale ration in Gdi+:
viewtopic.php?p=258160#p258160
I'll try to see if we can use this to be able to correct the scale ratio accordingly. If you try first let me know. I also use the desktop size to set the app window size, and some fix will be needed sooner or later...
fxm
Posts: 9981
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby fxm » Feb 09, 2019 21:36

For my case, setting the ScreenRes instruction to 1680x1050 is sufficient (in fullscreen mode) to ensure a properly display with a desktop 1920x1080 / 125%.
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Tourist Trap » Feb 09, 2019 21:46

fxm wrote:For my case, setting the ScreenRes instruction to 1680x1050 is sufficient (in fullscreen mode) to ensure a properly display with a desktop 1920x1080 / 125%.

Same here. Still, some people has now monitors reaching a lot higher dpi rate so I think I'll keep trying to find an automated solution. The article here is giving many useful hints:
https://blogs.windows.com/buildingapps/ ... ktop-apps/
fxm
Posts: 9981
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby fxm » Feb 09, 2019 21:53

fxm wrote:For my case, setting the ScreenRes instruction to 1680x1050 is sufficient (in fullscreen mode) to ensure a properly display with a desktop 1920x1080 / 125%.

But I did not check until the last pixel on the bottom right.
Boromir
Posts: 451
Joined: Apr 30, 2015 19:28
Location: Texas,U.S., Earth,Solar System
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Boromir » Feb 09, 2019 21:55

Lachie Dazdarian wrote:
Boromir wrote:Here's the indiedb page where I'll be putting the download link. I'm working on a few last minute things.
https://www.indiedb.com/games/basic-warfare


Erm, single player mode?

It's not really a single player game though you can host a game with only one player slot and add a bot.
Landeel
Posts: 751
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Landeel » Feb 09, 2019 22:28

https://stackoverflow.com/questions/23551112/how-can-i-set-the-dpiaware-property-in-a-windows-application-manifest-to-per-mo
I think this is the answer.

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>

  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
      <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
    </application>
  </compatibility>

  <asmv3:application xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
    <asmv3:windowsSettings
         xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">
      <dpiAware>True/PM</dpiAware>
    </asmv3:windowsSettings>
  </asmv3:application>

</asmv1:assembly>

I'll try to cross compile from Linux and include this manifest in the executable using a .rc file:

Code: Select all

1 24 "fbshoot.exe.manifest"

Fingers crossed.
Landeel
Posts: 751
Joined: Jan 25, 2007 10:32
Location: Brazil
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Landeel » Feb 09, 2019 23:50

FB Shooter Force 2019 update (UNTESTED):
https://drive.google.com/open?id=1Alx6zsW3vZ_4eWf53IKYBHpih1AUEuZH
-Many minor fixes and improvements;
-Some gameplay and level design changes;
-Added robotic voice;

I have added a manifest to the windows executable, so display should not scale in windows 8/10. Can anyone check if this works?
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Lachie Dazdarian » Feb 10, 2019 0:16

Tourist Trap wrote:Hi all,

I have not gone quite far due to lack of time and many troubles those days. However, I tried to push my current state on github. I still compete for the second round. Chances are very low that I could submit anything named a game for the 1st round. Then ok, here is my repo on github:
https://github.com/trapmania/bones/tree/master

The file to build is bonemademandemo.bas. It's still a mess overall but it shows how this pretends to be working as a character motion engine for a game.


The compiled source crashes at the get go.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Lachie Dazdarian » Feb 10, 2019 2:05

Pitto, you might wanna have a confirmation for exiting the game. I wanted to pause at level 4 and...yeah...
Pitto
Posts: 119
Joined: Nov 19, 2012 19:58

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby Pitto » Feb 10, 2019 8:46

Lachie Dazdarian wrote:Pitto, you might wanna have a confirmation for exiting the game. I wanted to pause at level 4 and...yeah...

Hi Lachie,
this feature is now implemented (0.5.8 release now on Github), press "P" key while playing to pause the game. I haven't yet tested it, but it should work fine.

Thank you for your tips
maachal
Posts: 33
Joined: Jul 21, 2017 21:11
Location: czech

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby maachal » Feb 10, 2019 11:03

ssjx wrote:@Maachal: Great fun game! I like the presentation, are you able to add a little sound? I think some simple bleeps and bloops would really add to it!

http://www.hsgi.cz/dokumenty/sctank-zip/
New version add ON/OFF sound effects. ;-)
Please test, thank you very much.
maachal
Posts: 33
Joined: Jul 21, 2017 21:11
Location: czech

Re: "A Love Letter To FreeBASIC" Game Dev Competition (Oct 2018 – Feb 2019), 1000 $ 1st prize

Postby maachal » Feb 10, 2019 11:21

Tourist Trap wrote:Hi all,

I have not gone quite far due to lack of time and many troubles those days. However, I tried to push my current state on github. I still compete for the second round. Chances are very low that I could submit anything named a game for the 1st round. Then ok, here is my repo on github:
https://github.com/trapmania/bones/tree/master

The file to build is bonemademandemo.bas. It's still a mess overall but it shows how this pretends to be working as a character motion engine for a game.

Compile OK but crash at startup. :-( WIN 7, 64bit system

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 3 guests