MonoGame / MonoGame.Samples

A few cross-platform game samples using MonoGame.
www.monogame.net
Other
570 stars 298 forks source link

should update to net 6 libs , for 3.81 since netstandard 2.0 isnt supported for MG game code, people might be confused. #60

Closed damian-666 closed 1 year ago

damian-666 commented 2 years ago

because netstandard 2.0 was supported wiht net6 before, people might expect a straighforward nuget update which isnt gonna work. But if you run the upgrade-assistant too it will analyse if you / can should do it, and on this is will say yea, and might do all the work, as in 100% , possibly, not sure how clean tho.. even updating the MG to the latest net 6 compatible. for everything and the netstandard to net6 libs. , im trying it on my stuff first. wiht vs 2022 .its nearly all orking , and im using a wpf..embedded so i got to ditch 4.8. wpf level editor.. whic can be done with ths assistant its doing amazing things with legacy modules ,i didnt expect it to work all all but its 99.... E_DIT it makes a mess... DONT DO THIS.. rebuild the projects. and the used the guild.. share the Content. mgcb by link to each EXE and put the assets near it... try and configure just by configuration not target or ur will get permuations... jsut do x64, ARM 64, and ANYCPU on the libs.. .. Debug, Release and leave teh defualts._ __my windowing is compex because im not using dhe develop branch windows sizing and postion might work for Gl and DX desktop. Android is fine wht all defaults..

damian-666 commented 2 years ago

Just a comment.. the templates that do android stilll use xamarin.. i cant get my old stuff to update..wth the upgrade assistant and its not doing maui for me.. i want to ditch xamarin....so i think i need more preview features or wait this out. the desktop , core , and DX, and GL all updated fine.

lilo-san commented 1 year ago

I'm personally pretty confused. I have spend already a few hours trying to build the Neon Shooter example on both Mac and Windows without success. I opened an issue that I believe is related with this one, feel free to close if is a duplicate.

damian-666 commented 1 year ago

i made this https://github.com/damian-666/MGShadersXPlatform but I dont know if anyone else build it and go no sensible feedback if it works.. on ios , linux , and it theoretically should work. i tested only windows and Android hardware and on emulators. . i dont have time to make it super tidy or and a canonical sample buts its the same strategy as those old samples you mentioned. , my code base took- weeks- to get to mg3.81 and all net6 adn and drop netstandard, and 4.8 but the performace boost is worth all the effort. then to go to net7, is a bit faster too and that only took ten min, just change all the 6 to 7s , im using vs 2022 preview latest update. onlly tested consoleGL.. directX windows core exe, and android.. all sharing as much code as possible, and at least the clipshader shows changes it you touch the one fx and build. and run. its a huge reorganization of the msbuild but if you get though it net 7 is easy and shoul not change that much for 2 years....

damian-666 commented 1 year ago

wint net7 u get intrinsics and SIMD hardware intricis that uses individual devices at JIT time, and up to 20x speedups with one code path on Vector and vector2 and matrix and vector3 for complex science code or neural network or image processing if u ever need that.. ..I cant speak for the graphics because its not my bottleneck.. i hope it helps someone save the time i suffered.

damian-666 commented 1 year ago

anohther way is too look the shared code template.. it will build the mg code in a shared sort of folder that is compile along w to each target. not as a lib/ dlll wiht openGL as a sort of proxy... it depends on if you can organize your code tha way.. i use ANY CPU on the libs, X64, and ARM64 only on the targets...

SimonDarksideJ commented 1 year ago

All the samples have been updated to 3.8.1 and .NET 6.

As for the shared libs, I hit the same issues as use, currently:

It's not ideal, but all the samples are now updated and working for 3.8.1