Anonymous edits have been disabled on the wiki. If you want to contribute please login or create an account.


Warning for game developers: PCGamingWiki staff members will only ever reach out to you using the official press@pcgamingwiki.com mail address.
Be aware of scammers claiming to be representatives or affiliates of PCGamingWiki who promise a PCGW page for a game key.

Difference between revisions of "Engine:FNA"

From PCGamingWiki, the wiki about fixing PC games
(FNA3D changes)
(Update launch options)
(6 intermediate revisions by 3 users not shown)
Line 9: Line 9:
 
'''FNA''' is an open source reimplementation of the Microsoft XNA Framework, specifically the 4.0 Refresh revision. It started as a branch of MonoGame called "MonoGame-SDL2".
 
'''FNA''' is an open source reimplementation of the Microsoft XNA Framework, specifically the 4.0 Refresh revision. It started as a branch of MonoGame called "MonoGame-SDL2".
  
The goal of the project is to recreate a fast, portable, and accurate XNA4 runtime library that prevents the need for code/content changes on the part of the XNA game developer. The currently supported platforms include Windows, Mac OS X and GNU/Linux, with further platform support including those supported by SDL2.
+
The goal of the project is to recreate a fast, portable, and accurate XNA4 runtime library that prevents the need for code/content changes on the part of the XNA game developer. The currently supported platforms include Windows, GNU/Linux, and macOS, with further platform support including those supported by SDL2.
  
 
==Launch Options==
 
==Launch Options==
Line 18: Line 18:
 
! Parameter !! Description
 
! Parameter !! Description
 
|-
 
|-
|/enablehighdpi:1
+
|{{code|/enablehighdpi:1}}
 
|On macOS and Wayland, attempt to use a Retina-capable window
 
|On macOS and Wayland, attempt to use a Retina-capable window
 
|-
 
|-
|/mojoshaderprofile:...
+
|{{code|/mojoshaderprofile:...}}
 
|Force a specific shader profile. Available options: glsl120, glspirv
 
|Force a specific shader profile. Available options: glsl120, glspirv
 
|-
 
|-
|/backbufferscalenearest:1
+
|{{code|/backbufferscalenearest:1}}
 
|When scaling the game resolution, use a nearest-neighbor filter. Useful for pixel art games.
 
|When scaling the game resolution, use a nearest-neighbor filter. Useful for pixel art games.
 
|-
 
|-
|/usescancodes:1
+
|{{code|/usescancodes:1}}
 
|Use scancodes for keyboard input, ignoring the user's keyboard layout
 
|Use scancodes for keyboard input, ignoring the user's keyboard layout
 
|-
 
|-
|/disablelateswaptear:1
+
|{{code|/disablelateswaptear:1}}
 
|Do not use FIFO_RELAXED or EXT_swap_control_tear extension, disables adaptive VSync
 
|Do not use FIFO_RELAXED or EXT_swap_control_tear extension, disables adaptive VSync
 
|-
 
|-
|/glprofile:...
+
|{{code|/forcemailboxvsync:1}}
 +
|Enables triple-buffer vsync with the Vulkan renderer
 +
|-
 +
|{{code|/glprofile:...}}
 
|Force a specific OpenGL profile. Available options: es3, core, compatibility
 
|Force a specific OpenGL profile. Available options: es3, core, compatibility
 
|-
 
|-
|/gldevice:...
+
|{{code|/gldevice:...}}
|Force a specific renderer. Available options: OpenGL, Vulkan, D3D11, Metal
+
|Force a specific renderer. Available options: OpenGL, Vulkan, D3D11
|-
 
|/angle:1
 
|Attempt to use OpenGL ES 3.0 via ANGLE. Useful for rendering with D3D11, Vulkan, etc.
 
 
|}
 
|}
  
Line 51: Line 51:
  
 
===Automatic Configuration: SDL_GameController===
 
===Automatic Configuration: SDL_GameController===
Since FNA uses SDL2 as its base library, we also get the benefit of SDL_GameController, a new subsystem added by Alfred Reynolds at Valve. This takes configurations for known controllers and automatically configures them for the virtual 360 controller, so if your controller is recognized, manual configuration is not necessary. If you run an FNA title through Steam, your controller will automatically be configured using the Big Picture Mode configuration. Additionally, FNA reads from a gamecontroller.txt file for configurations, when it's found in the game's base directory. You can find a community-sourced database [https://github.com/gabomdq/SDL_GameControllerDB/ here].
+
Since FNA uses SDL2 as its base library, we also get the benefit of SDL_GameController, a new subsystem added by Alfred Reynolds at Valve. This takes configurations for known controllers and automatically configures them for the virtual 360 controller, so if your controller is recognized, manual configuration is not necessary. If you run an FNA title through Steam, your controller will automatically be configured using the Big Picture Mode configuration. Additionally, FNA reads from a {{code|gamecontrollerdb.txt}} file for configurations, when it's found in the game's base directory. You can find a community-sourced database [https://github.com/gabomdq/SDL_GameControllerDB/ here].
  
 
===About GUIDs===
 
===About GUIDs===
Line 68: Line 68:
 
For XInput controllers on Windows, the GUID string is simply 'xinput'.
 
For XInput controllers on Windows, the GUID string is simply 'xinput'.
  
===DualShock 4 Light Bar Support===
+
===Sony Light Bar Support===
{{ii}} Currently only supported on Linux, with kernel 3.15 and higher or SteamOS version 137 and higher.
+
{{ii}} Previously only supported on Linux, FNA 21.01 introduced LED support for all operating systems.
 
 
FNA supports the DualShock 4 light bar, although it requires game developers to make use of the [https://github.com/FNA-XNA/FNA/wiki/5:-FNA-Extensions#setlightbarext SetLightBarEXT] extension to set the color of the light bar by way of adjusting the brightness of the RGB LEDs. Users also needs to allow write permission to brightness files per the below instructions before the game can make use of the light bar.
 
 
 
{{Fixbox|description=For users: Enable light bar support for FNA games that supports it|fix=
 
# Open a terminal window and obtain root access using e.g. <code>su root</code> or appropriate alternative.
 
# Allow write permission to the brightness files for the red/blue/green LEDs via /sys/class/leds/. For example:
 
 
 
cd /sys/class/leds/
 
chmod 777 0003:054C:05C4.0021:red/brightness
 
chmod 777 0003:054C:05C4.0021:green/brightness
 
chmod 777 0003:054C:05C4.0021:blue/brightness
 
  
'''Notes'''
+
FNA supports the DualShock 4 and DualSense light bar, although it requires game developers to make use of the [https://github.com/FNA-XNA/FNA/wiki/5:-FNA-Extensions#setlightbarext SetLightBarEXT] extension to set the color of the light bar by way of adjusting the brightness of the RGB LEDs.
{{ii}} The folder noted above can change per instance, but the constant value is 054C:05C4, the hardware ID for the DualShock 4. For the DualShock 4 Slim, the constant value is 054C:09CC.
 
}}
 
  
{{Infobox engine/ask}}
+
{{Infobox engine/query}}
  
 
{{References}}
 
{{References}}

Revision as of 19:23, 27 October 2021

FNA
Engine - FNA - logo.svg
Developers
Website
First release date
Predecessor

FNA is an open source reimplementation of the Microsoft XNA Framework, specifically the 4.0 Refresh revision. It started as a branch of MonoGame called "MonoGame-SDL2".

The goal of the project is to recreate a fast, portable, and accurate XNA4 runtime library that prevents the need for code/content changes on the part of the XNA game developer. The currently supported platforms include Windows, GNU/Linux, and macOS, with further platform support including those supported by SDL2.

Launch Options

As of FNA 20.01, a handful of command line arguments are supported automatically by games using FNA:

Parameter Description
/enablehighdpi:1 On macOS and Wayland, attempt to use a Retina-capable window
/mojoshaderprofile:... Force a specific shader profile. Available options: glsl120, glspirv
/backbufferscalenearest:1 When scaling the game resolution, use a nearest-neighbor filter. Useful for pixel art games.
/usescancodes:1 Use scancodes for keyboard input, ignoring the user's keyboard layout
/disablelateswaptear:1 Do not use FIFO_RELAXED or EXT_swap_control_tear extension, disables adaptive VSync
/forcemailboxvsync:1 Enables triple-buffer vsync with the Vulkan renderer
/glprofile:... Force a specific OpenGL profile. Available options: es3, core, compatibility
/gldevice:... Force a specific renderer. Available options: OpenGL, Vulkan, D3D11

More detailed information about these options can be found on the FNA Developer Wiki.

Joysticks

About XNA Joystick Support

XNA, being a Microsoft technology, centered its controller input around the Xbox 360 Controller. Because of this, the XNA API is not cleanly compatible with custom controllers, including the Xbox 360 Controller when not being read by XInput. However, a config format was developed to allow binding of joystick input values to a virtual 360 controller, which then gets read by XNA games.

Automatic Configuration: SDL_GameController

Since FNA uses SDL2 as its base library, we also get the benefit of SDL_GameController, a new subsystem added by Alfred Reynolds at Valve. This takes configurations for known controllers and automatically configures them for the virtual 360 controller, so if your controller is recognized, manual configuration is not necessary. If you run an FNA title through Steam, your controller will automatically be configured using the Big Picture Mode configuration. Additionally, FNA reads from a gamecontrollerdb.txt file for configurations, when it's found in the game's base directory. You can find a community-sourced database here.

About GUIDs

In addition to expanded configuration support, FNA provides the GetGUIDEXT extension that allows XNA devs to pull in a trimmed/standardized GUID string to determine the controller hardware and react accordingly. TowerFall Ascension uses this for button icon support, for example.

Consider this GUID from the PlayStation 4 controller:

// This is the string reported by SDL2's SDL_JoystickGetGUIDString:
// https://wiki.libsdl.org/SDL_JoystickGetGUIDString
// Note characters 9-12 and 17-20.
030000004c050000c405000011010000
// This is the GUID string returned by FNA. Get it? 
4c05c405

For XInput controllers on Windows, the GUID string is simply 'xinput'.

Sony Light Bar Support

Previously only supported on Linux, FNA 21.01 introduced LED support for all operating systems.

FNA supports the DualShock 4 and DualSense light bar, although it requires game developers to make use of the SetLightBarEXT extension to set the color of the light bar by way of adjusting the brightness of the RGB LEDs.


Game Developer Publisher First release
A Virus Named TOM Misfits Attic August 1, 2012
Amorous Team Amorous Snaggletooth Studios April 13, 2018
Apotheon Alientrap Games February 3, 2015
Axiom Verge Thomas Happ Games May 14, 2015
Bastion Supergiant Games Warner Bros. Interactive Entertainment, Supergiant Games August 16, 2011
Before the Echo Iridium Studios October 20, 2011
Bleed Bootdisk Revolution November 28, 2012
Bleed 2 Bootdisk Revolution February 8, 2017
Blueberry Garden Erik Svedäng June 10, 2009
Brushwood Buddies Steven Colling February 17, 2016
Capsized Alientrap Games April 29, 2011
Celeste Extremely OK Games January 25, 2018
Charlie Murder Ska Studios May 12, 2017
Chasm Bit Kid July 31, 2018
CometStriker DX Iced Lizard Games January 1, 2018
Cryptark Alientrap Games June 20, 2017
Crystal Project Andrew Willman March 31, 2022
Curse of the Crescent Isle DX Adam Mowery August 21, 2015
Dust: An Elysian Tail Humble Hearts Microsoft Studios May 24, 2013
Escape Goat Magical Time Bean June 14, 2012
Escape Goat 2 Magical Time Bean Double Fine Productions March 24, 2014
Fez Polytron Corporation, BlitWorks Trapdoor May 1, 2013
Fist Puncher Team2Bit Adult Swim Games June 21, 2013
Flinthook Tribute Games April 18, 2017
Flotilla Blendo Games, Ethan Lee February 27, 2010
Fossil Echo Awaceb July 8, 2016
Full Metal Furies Cellar Door Games January 17, 2018
Gateways Smudged Cat Games June 22, 2012
Gnomoria Robotronic Games February 23, 2016
Growing Pains Smudged Cat Games May 28, 2014
Hacknet Team Fractal Alligator Surprise Attack Games August 12, 2015
Hidden in Plain Sight Adam Spragg July 16, 2014
Hive BlueLine Games November 15, 2013
Hyphen FarSpace Studios February 12, 2015
Jon Shafer's At the Gates Conifer Games January 23, 2019
Khet 2.0 BlueLine Games October 1, 2014
Little Racers Street Milkstone Studios September 27, 2012
Melody's Escape Icetesy May 20, 2016
Mercenary Kings Tribute Games March 25, 2014
MidBoss Kitsune Games May 25, 2017
Murder Miners JForce Games July 25, 2014
Overdriven Reloaded TOMAGameStudio October 7, 2016
Owlboy D-Pad Studio IndieBox November 1, 2016
Paladin Pumpkin Games March 20, 2017
Panzer Paladin Tribute Games July 21, 2020
Poöf Arkedo Studio Neko Entertainment, Plug In Digital November 8, 2013
Press X to Not Die All Seeing Eye Games October 6, 2017
Quadrilateral Cowboy Blendo Games July 25, 2016
Reus Abbey Games May 16, 2013
Rex Rocket Castle Pixel August 5, 2014
River City Ransom: Underground Conatus Creative February 27, 2017
Rogue Legacy Cellar Door Games June 27, 2013
Salt and Sanctuary Ska Studios May 17, 2016
Shipwreck Brushfire Games February 25, 2014
Skulls of the Shogun 17-BIT July 29, 2013
Slipstream ansdor May 21, 2018
Solaroids: Prologue DynF/X Digital
Soulcaster Magical Time Bean February 10, 2012
Soulcaster II Magical Time Bean February 10, 2012
SpeedRunners DoubleDutch Games, tinyBuild tinyBuild April 19, 2016
Star-Twine Eric Billingsley April 29, 2011
Staxel Plukit Humble Games April 11, 2019
Streets of Rage 4 Lizardcube, Guard Crush Games, DotEmu, BlitWorks DotEmu, Yooreka Studio April 30, 2020
Sumico - The Numbers Game Ludomotion July 3, 2015
Super Bernie World Gamedevs for Bernie Kitsune Games March 9, 2020
Super Rad Raygun TRU FUN Entertainment Rooster Teeth Games November 8, 2016
Teenage Mutant Ninja Turtles: Shredder's Revenge Tribute Games, Seaven Studio DotEmu, GameraGame June 16, 2022
Terraria Re-Logic May 16, 2011
The Adventures of Shuggy Smudged Cat Games June 13, 2012
The Dishwasher: Vampire Smile Ska Studios May 12, 2017
Timespinner Lunar Ray Games Chucklefish Games September 25, 2018
Tooth and Tail Pocketwatch Games September 12, 2017
TowerFall Ascension Extremely OK Games March 11, 2014
Transistor Supergiant Games May 20, 2014
Unexplored Ludomotion February 22, 2017
Unrailed! Indoor Astronaut Daedalic Entertainment, bilibili September 23, 2020
Wizorb Tribute Games November 7, 2011
Wyv and Keep: The Temple of the Lost Idol A Jolly Corpse August 14, 2013


References