Skip to content

Instantly share code, notes, and snippets.

View dasannikov's full-sized avatar
🤖
Virtual Robotics

Dmitry Sannikov dasannikov

🤖
Virtual Robotics
View GitHub Profile
@lwchkg
lwchkg / microbit_mario2_overworld.ts
Last active July 28, 2024 12:52
Mario 2 overworld melody for Micro:bit MakeCode. I have confirmed that the pitches of all notes are correct. Some duration of long notes may need adjustment.
const mario2Start: string[] = [
"g5:4","f#:8","f:4","d:8","b4:4","a:8","g#:4","g:12","g5","g4:18","r:6",
]
const mario2Body: string[] = [
"g5:8","c:4","e:8","g:12","c:4","e:8","g:4","b4","eb5","g","b:8","a:24","r:4",
"g5:8","bb4:4","d5:8","g:12","bb4:4","d5:8","g:4","c#","e","g","b:8","a:20","r:4",
"b:4","c6:8","b5:4","c6:8","a5:12","c6:4","b5:8","a:4","g:8","f#:4","g:8","e:12",
"c#:4","d:8","e:4","f:8","e:4","f:8","b4:12","e5:4","d:8","c:28","r:24",
"r:8","e5:16","g:12","a:8","c6:28","a5:8","g:4","e:8","c:4",
"d:8","e:4","d:8","e:4","d:8","a4:8","r:4","d5:16",
@raysan5
raysan5 / custom_game_engines_small_study.md
Last active July 26, 2024 01:53
A small state-of-the-art study on custom engines

CUSTOM GAME ENGINES: A Small Study

a_plague_tale

A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.

Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) because d

@dmitry1100
dmitry1100 / TransformAllChildren.cs
Last active March 12, 2024 13:09
Unity Transform extension to enumerate all nested children deeply
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Fiftytwo
{
public static class TransformAllChildren
{
public static IEnumerable<Transform> AllChildren ( this Transform t )
@mhamilt
mhamilt / Notes.md
Last active February 19, 2023 20:17
Metal Compute Shader Example in Swift and Objective C

Notes

Create a command line target in xcode either in Swift or Obj-C. add a metal file to the project and copy and paste the respective code into each file.

@estorgio
estorgio / Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver).md
Last active July 5, 2024 10:17
Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

Mounting VirtualBox shared folders on Ubuntu Server 18.04 LTS (Bionic Beaver)

This guide will walk you through the steps on how to setup a VirtualBox shared folder inside your Ubuntu Server guest.

Prerequisites

This guide assumes that you are using the following setup:

You could still make this guide work with other setups (possibly with some modifications to the commands and whatnot).

@wakita
wakita / Makefile
Last active July 21, 2023 08:53
Metal compute shader example
SDK = xcrun -sdk macosx
all: compute.metallib compute
compute.metallib: Compute.metal
# Metal intermediate representation (.air)
$(SDK) metal -c -Wall -Wextra -std=osx-metal2.0 -o /tmp/Compute.air $^
# Metal library (.metallib)
$(SDK) metallib -o $@ /tmp/Compute.air
using System;
using System.Text;
//----------------------------------------------------------------------------
// Using:
//
// private UpdateCheckString<int, int> _updateCheck;
// ...
// if(_updateCheck.IsChanged("Time now: {0}:{1}", DateTime.UtcNow.Minute, DateTime.UtcNow.Second))
// TextObject.text = _updateCheck;
@hasanbayatme
hasanbayatme / MinMax.cs
Last active November 23, 2020 16:00
Unity Min Max Slider Implementation
using System;
using UnityEngine;
[Serializable]
public struct MinMax
{
[SerializeField]
private float min;
[SerializeField]
@CloudyWater
CloudyWater / Starfield.shader
Created February 23, 2018 03:31
Conversion of ShaderToy to Unity Shader
Shader "Starfield"
{
Properties
{
_iMouse ("iMouse", Vector) = (0,0,0,0)
_Iterations ("Iterations", int) = 17
_Formuparam ("Formuparam", float) = .53
_Steps ("Steps", int) = 20
_StepSize ("StepSize", float) = .1
_Zoom ("Zoom", float) = .8
@Maxstupo
Maxstupo / ObjectPool.cs
Last active May 21, 2020 10:46
A generic object pool in C#
using System;
using System.Collections.Generic;
//TODO: Implement the IDisposable interface to allow pooled objects to be freed by the using keyword.
public interface IPoolable {
void ResetObject();
}
public abstract class ObjectPool<T> where T : IPoolable {