Skip to content

Instantly share code, notes, and snippets.

FLIPS_choose_game

Game Porting Adventures

This article details my adventures and disadventures while porting my +9 years old XNA games, originally developed for Windows Phone, to multiple other frameworks (SharpDX, PSM, MonoGame...), for PSVita, Android and Desktop (Windows, Linux, macOS) platforms.

The article is divided in 3 parts:

@timj-unity
timj-unity / system_update_order.md
Created March 21, 2018 00:19
Documentation for system update order

System update order

In ECS all systems are updated on the main thread. The order in which the are updated is based on a set of constraints and an optimization pass which tries to order the system in a way so that the time between scheduling a job and waiting for it is as long as possible. The attributes to specify update order of systems are [UpdateBefore(typeof(OtherSystem))] and [UpdateAfter(typeof(OtherSystem))]. In addition to update before or after other ECS systems it is possible to update before or after different phases of the Unity PlayerLoop by using typeof(UnityEngine.Experimental.PlayerLoop.FixedUpdate) or one of the other phases in the same namespace.

The UpdateInGroup attribute will put the system in a group and the same UpdateBefore and UpdateAfter attributes can be specified on a group or with a group as the target of the before/after dependency.

To use __UpdateIn

@Hotrian
Hotrian / ProtoMesh.cs
Last active April 20, 2024 07:11
Example code for simple Quad and Cube meshes built through code.
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(MeshFilter)), RequireComponent(typeof(MeshRenderer))]
public class ProtoMesh : MonoBehaviour
{
#region Helper Properties
// Simple helpers to cache the MeshFilter and MeshRenderer
public MeshRenderer MyMeshRenderer
{
@jackmott
jackmott / ShaderManager.cs
Created March 13, 2017 19:21
Hot Swappable Shaders for MonoGame
/*
HotSwap shader sytem for MonoGame
HotSwap code only exists for debug builds
Edit paths to match your project
Construct in your Initialize method
Add shaders in LoadContent (or whenever)
Call CheckForChanges in Update() or periodically however you like
mgcb.exe usually located in C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools
*/