Comments (39)
The branch name is engine-rewrite
from sadconsole.
AFAIK there shouldn't be much to do to support UWP, it should just be new projects that build out UWP libraries that use the nuget package for monogame uwp. Possibly some of the file loading routines would need to change, unsure though.
However, I'm in the middle of a refactor (that is 90% complete) over in this branch https://github.com/Thraka/SadConsole/tree/engine-rewrite
This will actually be moving around projects and files to try and sort things better. If you could wait a few days, I'll have that structure locked down and committed to that branch, then if you wanted to contribute, you could take a crack at creating new libraries to support it
from sadconsole.
And thanks for the praise
from sadconsole.
Sounds great! I'll follow your progress.
BTW, I start porting trunk (i.e. "master") yesterday; got almost compiled but now have an issues with serializer and file loading, need to dig a little inside the issue.
BTW, most of the code is UWP-compatible except interface IDataContractSurrogate and a few methods and functions but it shouldn't be a problem.
P.S. I do have some plans to release a couple of funny apps for W10/WM10 (and maybe Xbox) :)
from sadconsole.
When I looked at porting to .NET Core, I noticed IDataContractSurrogate was missing and not coming anytime soon. So in the new branch that is removed. I was using it to make sure that when you serialized a type in SadConsole who used MonoGame, you could then load it into SadConsole using SFML. But I removed SFML support.
It would be neat to see something released with SadConsole.
from sadconsole.
My copy of Visual Studio is being dumb. Can you test something for me? Apparently..... unknown to me... I can actually just compile a single SadConsole no matter the specific graphics system MonoGame targets. Once you have the SadConsole.dll, you use SadConsole in your game, and choose whatever MonoGame version (like UWP) you want, and it will work....
I just tried locally with OpenGL, DirectX, and Android with the same SadConsole DLL and it was fine. However, UWP projects are complaining when I try to create them. Can you try without using your version of SadConosle?
from sadconsole.
Definitely will do! Can get my hands on code today (was busy) but yesterday I've got stuck on rendering issues :( Standard template creates SwapChainPanel and using it as a MonoGame "screen" (for rendering). But current MonoGame code have a bug (or I don't know how to properly use it) and SwapChainPanel component reference isn't available during graphics driver initialization. I made some "hardcoded" fixes but issue just moved from one code line to another.
from sadconsole.
Is this pre-sadconsole init?
from sadconsole.
So please send me your version for test, whole solution (zipped) to [email protected]
from sadconsole.
I'm just using the master branch for these tests
from sadconsole.
I've modified MonoGame :) Yeah, I know it's not good but it was done just for test purposes. Actually, MonoGame has some issues with W10 UWP. Actually, sources from master branch didn't work at all, from develop is working with some fixes. BTW, NuGet package is working fine with template-based W10 UWP.
from sadconsole.
BTW, Andy, you may contact me via instant messenger (if you want) or skype chat (sens.boston at gmail.com or sens_boston). Also, it's a midnight in Boston now ;)
from sadconsole.
I checkout both branches, master & develop. For some reasons, master branch don't work for me (by generating empty app by using template).
from sadconsole.
No worries, sync tomorrow
from sadconsole.
Updated the engine-rewrite branch. Folder structure is complete and there is a single DLL for each library. In the solution there are two starter projects, one targeting DX and another GL. Both work fine.
Few things I still need until this branch is merged and takes over master
- Asset loading for fonts - Not totally sure how yet, I have an idea.
- Automatic Window Centering needed to be removed, Need tutorial added on how you can do that per platform
- sample games need updates
- Rewrite mouse input (not related to this multiplatform effort
- Add gamepad input system
from sadconsole.
I'm kinda get stuck :(
MonoGame standard XAML template creates instance of the XamlGame with the type of your descendant of Microsoft.Xna.Framework.Game, and point render device to the SwapChainPanel control surface, provided in the constructor.
public sealed partial class GamePage : Page
{
readonly Game1 _game;
public GamePage()
{
this.InitializeComponent();
// Create the game.
var launchArguments = string.Empty;
_game = MonoGame.Framework.XamlGame<Game1>.Create(launchArguments, Window.Current.CoreWindow, swapChainPanel);
}
}
But SadConsole.Engine creates own Microsoft.Xna.Framework.Game (SadConsoleGame); I can't re-use previously created GraphicsDevice & GraphicsDeviceManager in the SadConsoleGame. Tried many things but without success :(
from sadconsole.
Are you using the engine-rewrite branch?
from sadconsole.
No, I still working with master. Should I switch to engine-rewrite? Will try now...
from sadconsole.
I've done changes to how the Game class is loaded and how the GraphicsDevice/DeviceManager are created. this may be more compatible with these types of scenarios. Let me look at my code base and see if I have anything to upload to github
from sadconsole.
OK, I'll try and let you know.
from sadconsole.
If you look at src/SadConsole.Root/Graphics.MonoGame/Game.cs you can see that I sort of hide the constructor and use a static Create method. But, the way I've reimplemented the MonoGame stuff, all the logic for rendering/input/etc are all handled by the src/SadConsole.Root/Graphics.MonoGame/SadConsoleGameComponent.cs class. So it's easy for you to create your own Game class now. You can inherit from the game class provided by SadConsole instead, or just in your own game class, make sure you do what is done in the Initialize method.
from sadconsole.
I pushed a commit to engine-rewrite so make sure you sync
from sadconsole.
Hmm, the very first issue: I can't re-use your refactored libraries :( In the master branch, I created Windows Universal Class libraries and added shared code; here (at engine-rewrite) I should remove your libraries and create new UWP versions.
from sadconsole.
Oh yes, lol. I got rid of the shared system because it was overhead for 0 gain.
from sadconsole.
Yeah, but if I've got somehow W10 UWP working, it will be huge overhead :)
from sadconsole.
you should be able to reference my libraries without any problem
from sadconsole.
No, VS 2015 don't let me to add these libraries :(
from sadconsole.
let me try and repair my visual studio and see what i can figure out
from sadconsole.
These tags
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.14393.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.10586.0</TargetPlatformMinVersion>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
are missing.
from sadconsole.
Actually, it's possible to do some "magic" with conditional defines in the .csproj files but I'm unsure...
from sadconsole.
visual studio is slow
from sadconsole.
Yeah, I know! Don't ask my why I know that :(
from sadconsole.
I got things fixed up. I see the odd issues now you're talking about with the projects.. arrggg why cant they make it easy!
from sadconsole.
Yeah, but shared code isn't a problem; my patch for W10 UWP for master branch is perfectly fit your solution architecture (I've added new folder, Projects.UWP and added a few conditional defines to some source code), but real problem is incompatibility between MonoGame.Framework's UWP project template and your architecture.
MonoGame creates new game , descendant of XamlGame, which one correctly initializes GraphicsDeviceManager and GraphicsDevice for usage with SwapChainPanel.
Your solution unconditionally creates a new game (static SadConsoleGame MonoGameInstance), descendant of MonoGame.Framework.Game, and try to create new GraphicsDevice (without reference to SwapChainPanel). Of course, if we already have a GraphicsDevice initialized, second one will fail all the time.
Could you show me a sample, how to avoid re-creation of GraphicsDeviceManager & GraphicsDevice and have your nice console work with the current properly initialized descendant of MonoGame.Framework.Game?
Yes, probably, "Starter project" is too complicated for that refactoring; maybe I can get something very simplified (what I need for my goals, it's just an one console, in XAML UWP, with ANSI codes support etc.)
from sadconsole.
I'm working towards that
from sadconsole.
Okey dokey, great, big thanks! Definitely will try tonight. And take your time, don't worry, it can wait definitely...
P.S. I'm thinking about "programmer's toy", simple app for W10/W10M with editor and console, where user can write C#, or VB, or JS code (i.e. any language supported by .NET runtime) and get immediate results on your console, with Esc-sequences, colors etc. Something like lightweight "Visual Studio" for enthusiasts...
from sadconsole.
yeah that would be cool!
from sadconsole.
Wow, you da man! Terrific work! Here is screenshot from my Lumia-950, arm build for W10M
So, it's enough for me (at least to start my new app programming). Hope, you'll find a time in the future, to release new engine with NuGet UWP support.
Thanks one more time!
from sadconsole.
It will be within the next few weeks for sure
from sadconsole.
Related Issues (20)
- No way to disable creation of defaultStartingConsole. HOT 1
- Setting `SurfaceViewer` scroll values in outside the `FrameUpdate` does not work as expected HOT 2
- m1 mac failed to load library: libSDL2-2.0.0.dylib HOT 2
- Small issue with TextBox and Caret HOT 1
- Surface.SetGlyph does not take .IsVisible into account, and still renders the cell regardless HOT 2
- Reduce Allocation in Mouse Processing HOT 2
- ICellSurface ShiftDown doesn't set the background color of the new row correctly. HOT 4
- Calling InvokeClick() of a button from a keyboard shortcut doesn't change its state. HOT 8
- Cursor pretty printing behaves odd when the string starts with \0 HOT 1
- Add ComboBox control for v10 HOT 1
- Add support for sorting `IScreenObject` in the parents collection HOT 1
- ControlsConsole.Resize method crashes the engine.
- Left click on a TextBox causes both EditModeEnter and EditModeExit events to trigger. HOT 2
- Redesign collection types based on framework guidelines HOT 2
- AnimatedScreenSurface should implement the frames in a more user friendly way
- Replace Point(0, 0) with Point.Zero
- Improvements to Renderer
- ComboBox dropdown doesn't take FontSize of parent in consideration HOT 1
- Replace Algorithms and Shape code with new primitives lib
- Impossible to adjust ProgressBar Color for fill & bar seperately
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sadconsole.