First off, Rogue Legacy was originally made with XNA, a game development toolkit Microsoft released in the mid-00's to enable independent developers to make games for Windows + Xbox 360.pic.twitter.com/tNw9UIMrfH
U tweetove putem weba ili aplikacija drugih proizvođača možete dodati podatke o lokaciji, kao što su grad ili točna lokacija. Povijest lokacija tweetova uvijek možete izbrisati. Saznajte više
First off, Rogue Legacy was originally made with XNA, a game development toolkit Microsoft released in the mid-00's to enable independent developers to make games for Windows + Xbox 360.pic.twitter.com/tNw9UIMrfH
A lot of other great games were made with XNA, including FEZ, Celeste, Stardew Valley, Axiom Verge, Owlboy, and many many more!pic.twitter.com/8MjAw9NjPi
Problem is, XNA only works on Windows, Xbox360, and Windows Phone. You may notice that 2/3 of those platforms are dead, and XNA isn't even officially supported on Windows anymore (as of 2013)…https://www.gamasutra.com/view/news/185894/Its_official_XNA_is_dead.php …
Even worse, XNA was closed-source and based entirely on proprietary Microsoft technologies like DirectX. So there was no easy way to port an XNA game to other platforms (macOS, Linux, consoles, etc). 
Enter FNA. FNA is an open-source, drop-in replacement for XNA. You can take your XNA game, link it to use FNA instead of XNA, and it should "just work" exactly as it did before. Except now it also works on macOS, Linux, Xbox One, and Switch! https://fna-xna.github.io/
(FNA began life as a fork of MonoGame, a similar XNA replacement project, but it has a very different development philosophy. FNA is focused on XNA accuracy and elegance, while MG...uh...doesn't really have a focus? Long story.)https://github.com/FNA-XNA/FNA/wiki/Appendix-C:-MonoGame-Compatibility …
So anyway, one major portion of the XNA Framework that no one ever bothered to implement in FNA was the Touch API. Handling multi-touch, detecting gestures like drags, pinches, etc. (Maybe because in XNA, touch was exclusive to WP7...)pic.twitter.com/S9pNKvHuHl
But then I show up on the scene back in October 2018 and decide to tackle this challenge, just for fun. I spent about two weeks reimplementing the entire XNA Touch API in FNA, using this beautiful cat-flicking program for testing:pic.twitter.com/NnVoSogUbt
Since FNA didn't support any mobile platforms at the time, I was doing all the touch work on my Windows laptop. Poking at a laptop screen doesn't make for great ergonomics. I really wanted to try out this stuff on mobile...
My next self-imposed challenge was to write iOS support for FNA, so I could run the touch tests on my iPhone. Much easier said than done, of course. Since FNA is written in C#, I had to make it work with Xamarin.iOS.https://docs.microsoft.com/en-us/xamarin/ios/ …
If you're unfamiliar with Xamarin, it's 1) the official way to run C# on mobile 2) a binding library for native iOS APIs 3) a giant pain to work with I have nothing good to say about it, other than it made this project possible. Not fun, but possible...
After a few weeks of debugging black screens and troubleshooting obscure Xamarin / Visual Studio Mac bugs, I finally saw the Cornflower Blue screen of life!pic.twitter.com/np4dkg2TH2
From there it was smooth sailing. Due to the incredible portability of FNA, I was able to test the cat touch demo within minutes. And it worked great! But a tech demo is kinda boring. Could FNA iOS run something more exotic?pic.twitter.com/S5sK8PHLF7
With some help from master hack-porter @0x0ade, I was able to get Celeste, Chasm, and TowerFall running on my iPhone! Without even having access to their source code!
(These are unofficial and will never be released, so please don't ask.
)https://www.youtube.com/watch?v=37ijtega1fo …
That little magic trick was made possible thanks to FNA's "single-assembly portability". That means that with FNA, you can build a single .exe for your game that can run on any supported platform. Build once, run anywhere!https://github.com/FNA-XNA/FNA/wiki/2:-Building-with-FNA#4-running-the-fna-output …
All the platform-specific stuff (like window management, audio, input, etc.) is handled by a set of five native libraries, which are compiled for each platform. These "fnalibs" are the only dependencies for FNA, and we'll look at them now.
FNALIB #1: SDL2 This is the meat and potatoes of FNA's cross platform support. An incredibly popular and time-tested library used by all kinds of projects, it handles window creation, input, app lifecycles, OpenGL context creation, etc. https://www.libsdl.org/
FNALIB #2: SDL2_image A companion library for SDL2 that provides a simple API for loading images. PNG, JPG, you name it, this library can handle it. Pretty handy, right? https://www.libsdl.org/projects/SDL_image/ …
FNALIB #3: FAudio An open-source reimplementation of Microsoft's proprietary XAudio API. Used for all audio playback in FNA, and also a major component of the WINE and Proton projects!https://github.com/FNA-XNA/FAudio
FNALIB #4: Theorafile Used for playing Ogg Theora video files, sometimes used for cutscenes. Very optional for FNA projects. Rogue Legacy doesn't have any prerecorded videos, so this went unused.https://github.com/FNA-XNA/Theorafile …
FNALIB #5: MojoShader Translates precompiled DirectX shader code (required by XNA for visual effects) into other shader languages like GLSL and MSL (and soon SPIR-V!). This is required for any and all rendering in FNA. https://icculus.org/mojoshader/
Beyond the fnalibs, there's one other library (that I wrote) that we use in RL iOS: TinyKVS -- a simple C# wrapper for Apple's iCloud Key-Value Storage API. This is how iCloud saves are handled in the game!https://github.com/TheSpydog/TinyKVS …
And that's it for the tech stack!
FNA + Xamarin.iOS + SDL2 + SDL_image + FAudio + MojoShader + TinyKVS :)
Of course, there's also the Rogue Legacy layer, but that's closed source and full of secrets 
In all seriousness though, all the code that I wrote for RL's touch interface is just using the plain old touch APIs in FNA. No special secret sauce. Just a lot of time and experimentation!https://twitter.com/CellarDoorGames/status/1159889273438527493?s=20 …
And because of the *cross-platform magic* of FNA, all the code changes made for the mobile port of the game live in the same codebase as the mac/linux versions of the game. No special fork or anything! The game determines what OS it's running on at runtime.
So that about wraps it up! Let me know if you have any questions or anything. I love talking about this stuff, obviously.
And I'm still actively contributing to FNA and its libraries. More cool stuff is on the way!
Also, go follow @flibitijibibo, the lead developer of FNA and FAudio. He's a freaking wizard genius and has been super helpful throughout the whole porting process. He also ports games to Mac and Linux so hit him up if that's something you're into!
Also also, if you're interested in a mobile/console port of your game (XNA-based or not), let me know! I'm actively looking for new projects and I'd love to chat with you about bringing your game to new audiences! 
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.