Skip to content

Instantly share code, notes, and snippets.

View Doprez's full-sized avatar
⚠️
Not a real dog!

Doprez

⚠️
Not a real dog!
View GitHub Profile
@EternalTamago
EternalTamago / LoadMeshScript.cs
Last active October 16, 2024 16:01
実行時にModelの頂点やインデックス情報を読み込む
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
using Xenko.Core.Mathematics;
using Xenko.Engine;
using Xenko.Graphics;
using Xenko.Input;
@Vercidium
Vercidium / greedyvoxelmeshing
Last active July 20, 2025 18:29
Greedy Voxel Meshing ported to C#
// Code ported from https://0fps.net/2012/06/30/meshing-in-a-minecraft-game/
// Note this implementation does not support different block types or block normals
// The original author describes how to do this here: https://0fps.net/2012/07/07/meshing-minecraft-part-2/
const int CHUNK_SIZE = 32;
// These variables store the location of the chunk in the world, e.g. (0,0,0), (32,0,0), (64,0,0)
@westonsoftware
westonsoftware / StartScript.cs
Last active May 15, 2025 16:05
Stride 3D rendered into Avalonia
using System;
using Stride.Core.Mathematics;
using Stride.Engine;
using Stride.Rendering;
using Stride.Graphics;
using System.IO;
namespace InfinityGame
{
public class StartScript : SyncScript
@Eideren
Eideren / StrideExporter.cs
Last active October 16, 2024 16:09
A small class to export/save a scene or a group of entities within a running stride game
namespace Project
{
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using Stride.Core;
using Stride.Core.Annotations;
using Stride.Core.Mathematics;
using Stride.Core.Yaml;

Stride UI/UX discussion summary

This document is meant to summarize the discussion that started at the end of June 2020 about improving Stride's UI (Game Studio's UI).

Initially MechWarrior99 came up with some ideas on making the UX better. One of these ideas was to make something akin to Blender's Workspaces. Then this issue was mentioned - it may have inspired #637 and #667, which tried to improve somewhat the current UI.

Next MechWarrior99 worked on the improved UI design of different parts of Stride, starting with components (msg). During that time qbic suggested changes to the 3D translation gizmo ([msg](https://discordapp.com/channels/500285081265635328/727168636770582581/728626959126

@manio143
manio143 / Stride Editor design document.md
Last active April 10, 2024 02:03
Stride Editor current design document

Current Stride Editor design document

This document is meant to describe the architecture of the current Stride Editor, so that it's easier to read its source code and rewrite it in a better way. This is in now way a complete document as the Editor is about 35k LOC. I'm slowly going to read through the more interesting parts and note down my thoughts.

View hierarchy

  • GameStudioWindow
    • static top bar menu
    • static asset context menu
    • static key bindings (start/cancel build, run game, open debug window, copy asset, show add asset dialog)
  • static toolbar tray (icon buttons)

Graphics Library

  • Skia/Cairo
    • Extremely barebone, might as well fix stride's ui system ?

Retained

  • Eto, Windows Forms-like, c#
    • BSD-3
    • Fairly limited styling
  • Avalonia, WPF-like, c#|xml
    • MIT
@Eideren
Eideren / YourGameDefinition.cs
Last active April 28, 2024 21:29
How to setup async shader compilation in stride, note that the game will still freeze initially to compile the fallback
public class YourGameDefinition : Stride.Engine.Game
{
protected override void BeginRun()
{
base.BeginRun();
foreach( var feature in SceneSystem.GraphicsCompositor.RenderFeatures )
{
if( feature is MeshRenderFeature meshRf )
{
meshRf.ComputeFallbackEffect += FallbackForAsyncCompilation;
namespace Project.Effects
{
using Stride.Rendering;
using Stride.Rendering.Materials;
using Stride.Rendering.Materials.ComputeColors;
using System.ComponentModel;
using Stride.Core;
using Stride.Core.Annotations;
using Stride.Core.Mathematics;
using Stride.Graphics;
@Eideren
Eideren / TessCustom.sdsl
Created October 21, 2020 16:31
Stride, charly's tessellation issues
#ifndef InputControlPointCount
# define InputControlPointCount 3
#endif
#ifndef OutputControlPointCount
# define OutputControlPointCount 3
#endif
shader TessCustom : ShaderBase, TransformationBase, MaterialDomainStream, Camera, Transformation, NormalBase
{