Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
10. May 2019


While Unreal Engine doesn’t provide C# support out of the box, it does provide an exceptional plugin system, so it was only a matter of time until C# plugins arrived.  Today we are looking at the open source USharp extension, which is based on the MonoUE plugin project.  Using this plugin, UE4 gains C# functionality with the following features:

  • Write C# using UObject exposed types (AActor, AGameMode, UActorComponent, etc). Define new UObject types and inherit existing ones. Exposed C# types can then be used in (or extended by) Blueprint.
  • Access to Unreal's reflection system (UClass, UFunction, UProperty, etc).
  • Hot-reload
  • Dynamically switch between .NET Framework, .NET Core and Mono for an improved debugging / runtime experience without having to reopen the editor
  • Supports Windows, Mac and Linux

There are however some downsides:

  • This project depends on a lot of PInvoked functions which could potentially behave differently on different C++ compilers. This project may not work on some target platforms.
  • Like mono-ue this project depends on lots of generated code and IL weaving. It probably isn't the best for performance and there is a huge amount of generated code everywhere.
  • The weaved IL currently seems to break edit-and-continue debugging (issue with cecil?)
  • There is currently too much marshaling on structs / collections (list, map, set). Marshaling needs to be redesigned to avoid copies of entire collections / structs on trivial calls between C# / native code. Additionally marshaling of delegates needs to be redesigned (various issues such as being referenced as a copy of the delegate).

If you are interested in checking out USharp, you can find the installation instructions here.  One potential problem to be aware of, the project creator doesn’t seem to have attached a license to the code repository!  While this code is not production ready, if you intend to use it in any capacity, I would make sure the license is suitable.  See the results of the plugin in action in the video below.

GameDev News


8. May 2019


At the MSBuild 2019 developer conference, Microsoft made a pretty huge announcement about the future of .NET.  With the release of .NET 5, there will be one .NET, that is cross platform and open source.  Essentially .NET Core, .NET Framework and Xamarin will all be replaced with a single unified .NET 5 framework.

In this blog post Microsoft discuss the future of .NET 5, as well as how we got here and how it will impact developers.   The core (pun intended) of .NET is:

  • Produce a single .NET runtime and framework that can be used everywhere and that has uniform runtime behaviors and developer experiences.
  • Expand the capabilities of .NET by taking the best of .NET Core, .NET Framework, Xamarin and Mono.
  • Build that product out of a single code-base that developers (Microsoft and the community) can work on and expand together and that improves all scenarios.

This isn’t going to happen overnight however.  Here is the announced timeline of developments:

coresched

This means in November of 2020, there will be just one version of .NET available for all platforms.  With the release today of .NET Core 3.0 Preview 5, that seems to be the ideal platform to develop .NET applications in anticipation of .NET 5.

GameDev News


2. April 2019


Today marked the release of Microsoft’s seminal IDE Visual Studio 2019.  It is available for download right now at https://visualstudio.microsoft.com/downloads/.  The community edition of Visual Studio 2019 is completely free to use so long as your company makes less than $1M USD annually or has > 250 PCs.   Free trials for the Professional and Enterprise versions are also available.  For more details on the differences between versions, be sure to check here.

There are several new improvements and features available in Visual Studio 2019 including improved performance and start up times, a new AI driven code tool called IntelliCode, .NET core 3.0 support, C# data breakpoints, tighter integration with GitHub and Azure, multiple improvements to mobile development using Xamarin, a new remote coding interface called Live Code and much more.  You can read the complete Visual Studio 2019 release notes here.

Visual Studio 2019 for Mac also received a new release, including intellisense support taken directly from Visual Studio.  You can read the full release notes here and download here. (be sure to click the MacOS tab if required).

You can watch a condensed to under 10 minute version of the keynote in the video below.  In addition to the keynote, Microsoft have a series of training materials and more in-depth sessions available at https://visualstudio.microsoft.com/vs2019-launch/.

GameDev News


1. April 2019


Humble are running another bundle of interest to game developers, especially C# developers.  It’s the Humble Microsoft & .NET Bundle by APress which contains 3 tiers of programming books, many about C# but all about Microsoft .NET technologies.  As with all Humble Bundles (including the ongoing Coder’s Bookshelf bundle) it contains multiple tiers of books with proceeds split between Humble, the publisher, charity and potentially GFS (thanks!) at your discretion.  If you buy a tier, you get all of the books below that tier.

This Bundle consists of:

$1 Tier

C# 7 Quick Syntax Reference

Visual Studio Code Distilled

Microsoft Computer Vision APIs Distilled

Beginning Xamarin Development for the Mac

Modern API Design with ASP.NET Core 2


$8 Tier

Cosmos DB for MongoDB Developers

Modern Data Access with Entity Framework Core

Azure and Xamarin Forms

Beginning Entity Framework Core 2.0

Developing Bots with Microsoft Bots Framework

Essential Docker for ASP.NET Core MVC

Pro C# 7


$15 Tier

Hardening Azure Applications

Beginning XML with C# 7

Modern Algorithms for Image Processing

Xamarin.Forms Solutions

Deep Learning with Azure

IoT, AI and Blockchain for .NET

Practical Bot Development

Introducing Microsoft Teams


You can grab the bundle here or learn more in the video below.

GameDev News


24. December 2018

Xenko 3.1 beta has just been released.   This is the first major point release since the Xenko project went open source this summer.  The primary focus of this beta is reorganizing Xenko to make it play nicely with the NuGet distribution system, although this refactoring has some very cool side effects.  Now you are able to use individual components of Xenko on their own.  For example, if you wanted to use the Xenko graphics library on it’s own, you can, independent of the rest of the Xenko game engine.  This release also moves towards Xenko using .NET standard.

Details of the release from the Xenko blog:

Xenko was always a big proponent of NuGet: since first version, Xenko was distributed as a NuGet package.

However, due to limitations (hello packages.config and project.json!), we were leveraging NuGet more as a distribution medium than proper NuGet packages: Xenko 3.0 is still a monolithic single package and it would not work out of the box when referenced from Visual Studio without using Xenko Launcher and Game Studio.

Xenko 3.0 paved the way by making Xenko compatible with the new project system (game projects were referencing Xenko using a PackageReference).

Today, Xenko 3.1 brings Xenko as a set of smaller NuGet package, each containing one assembly, with proper dependencies:

GitHub

As a result, it is now possible to create a game project that references only the packages you want. Here are a few examples of “core” packages:

  • Xenko.Engine: allows you to use core engine runtime (including its dependencies)
  • Xenko.Core.Assets.CompilerApp: compile assets at build time
  • Xenko.Core.Mathematics or Xenko.Graphics: yes, if you want to make a custom project only using Xenko mathematics or graphics API without the full Xenko engine, you can!
  • Xenko.Core.Assets, Xenko.Presentation or Xenko.Quantum: all those piece of tech being used to build Xenko tooling are also available for reuse in other projects. Nothing prevents you from generating assets on the fly too!

Then, various parts of the engine are distributed as optional packages:

  • Xenko.Physics
  • Xenko.Particles
  • Xenko.UI
  • Xenko.SpriteStudio
  • Xenko.Video

If you don’t reference those packages, they won’t be packaged with your game either. In many situations, it results in a smaller packaged game and improved startup time.

In addition to the above changes, you can take a look at the commit log on GitHub for other aspects that made it into the 3.1 release.

GameDev News


GFS On YouTube

See More Tutorials on DevGa.me!

Month List