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
@itn3000
itn3000 / RetrieveInputKeyEventWithR3.cs
Last active April 28, 2024 21:23
how to retrieve input event with R3 and Stride3d
using System;
using Stride.Engine;
using Stride.Input;
using R3;
namespace RetrieveInputKeyEventWithR3;
public class RetriveKeyEventScript: StartupScript
{
public override Start()
@waquwex
waquwex / StrideAsyncScript.cs
Created February 24, 2024 15:43
Stride SpriteSheet anim with AsyncScript
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Stride.Core.Mathematics;
using Stride.Input;
using Stride.Engine;
using System.Diagnostics;
using Stride.Graphics;
@adrsch
adrsch / PlayerController.cs
Created October 25, 2023 19:59
PlayerController, messy
// Copyright (c) .NET Foundation and Contributors (https://dotnetfoundation.org/ & https://stride3d.net) and Silicon Studio Corp. (https://www.siliconstudio.co.jp)
// Distributed under the MIT license. See the LICENSE.md file in the project root for more information.
/*
* PARTS OF THIS FILE ARE MODIFICATIONS OF QUAKE 3 CODE UNDER THE FOLLOWING:
===========================================================================
Copyright (C) 1999-2005 Id Software, Inc.
This file is part of Quake III Arena source code.
Quake III Arena source code is free software; you can redistribute it
@EricEzaM
EricEzaM / StrideView.xaml
Created July 19, 2022 09:41
Stride3D embed in WPF xaml control
<UserControl x:Class="Namespace.StrideView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Namespace"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<ContentPresenter x:Name="SceneView">
@raysan5
raysan5 / open_source_and_videogames.md
Last active July 27, 2024 20:27
Open Source and Videogames - Resources

open_source_and_videogames

Open Source and Videogames - Resources

This git include a list of programs, tools, engines and libraries free and open source intended to make videogames.

NOTE: This gist is a support material for the talk "Open Source and Videogames" given by me, Ramon Santamaria, on October 26th 2021 in Canòdrom, Barcelona. All the materials listed here were explained in detail in a +2 hours talk.

Contents

@AmbulantRex
AmbulantRex / GameApp.cs
Last active April 28, 2024 21:24
Autofac DI in Stride
using System.Linq;
using System.Reflection;
using Autofac;
using Autofac.Core;
using Stride.Engine;
namespace GameApp
{
internal static void Main(string[] args)
{
@Eideren
Eideren / OnStrideUI.md
Last active April 28, 2024 21:26
Stride UI discussion

Editor UI

Issues:

  • WPF is windows only
  • It's a pain to maintain;
    • The logic behind it is not very flexible, loads of encapsulation and abstractions away from the raw types, tons of spaghetti logic.
  • Plugins are pretty much impossible to implement
    • The UI and system around scene management does not expect changes outside of editor-specific paths, see point #1.
  • I.E.: if a plugin were to change any value in a scene, that change would not be reflected in the editor or in the saved scene.
@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
{
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 / 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;