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

General discussion for topics related to the FreeBASIC project or its community.
Post Reply
Landeel
Posts: 777
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

Post by Landeel »

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

Post by Lachie Dazdarian »

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
Moderator
Posts: 12082
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

Post by fxm »

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

Post by Tourist Trap »

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
Moderator
Posts: 12082
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

Post by fxm »

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

Post by Tourist Trap »

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
Moderator
Posts: 12082
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

Post by fxm »

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: 463
Joined: Apr 30, 2015 19:28
Location: Oklahoma,U.S., Earth,Solar System
Contact:

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

Post by Boromir »

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: 777
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

Post by Landeel »

https://stackoverflow.com/questions/235 ... -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: 777
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

Post by Landeel »

FB Shooter Force 2019 update (UNTESTED):
https://drive.google.com/open?id=1Alx6z ... pih1AUEuZH
-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

Post by Lachie Dazdarian »

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

Post by Lachie Dazdarian »

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

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

Post by Pitto »

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

Post by maachal »

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

Post by maachal »

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
Post Reply