Skip to content

Instantly share code, notes, and snippets.

@dakom
dakom / ECS notes.md
Last active May 4, 2024 21:05
ECS with sparse array notes (EnTT style)

Intro

The below is a breakdown / bird's eye view of how a sparse-array backed ECS like EnTT or Shipyard works.

Please see the thanks and references at the bottom - without their help I would not have been able to share this breakdown with you... everything here is really just notes and rephrasing of what they've written already :)

Also, these notes do not cover archetype systems (like unity) nor adaptations of archetypes (like in Flecs). Though there's a couple comparative footnotes at the end.

Here we go!

@dakom
dakom / machine.js
Created July 15, 2019 19:15
Generated by [XState Viz](https://xstate.js.org/viz)
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@dakom
dakom / SketchSystems.spec
Last active June 26, 2019 13:52
#ji-tap ask a question
#ji-tap ask a question
Main Stage
No Activity Set
ask a question -> Add Question
Has Activity
ask a question -> List
Root
has questions in list -> List
@dakom
dakom / Slices.rs
Created June 16, 2019 09:51
Rust slice helpers
//since memory is aligned contiguously we can use the values() function as-is
#[repr(C)]
#[derive(Copy, Clone, PartialEq)]
pub struct Point {
pub x:f64,
pub y:f64,
pub z:f64
}
impl SliceValues for Point {}
@dakom
dakom / SketchSystems.spec
Last active June 26, 2019 09:30
LoggedOut
LoggedOut
log in -> Gallery
LoggedIn*
log out -> LoggedOut
Gallery
startSlide -> Slide
Slide*&
@dakom
dakom / Slide.fbs
Created August 9, 2018 07:28
potential file format
//SLIDE
table Slide {
slideId: string;
creationId: string;
design:Design;
activity:Activity;
}
//DESIGN
table Design {
@dakom
dakom / gist:c8f4a7d1542e60bb8af71bfa94546c73
Created August 7, 2018 18:09
Purescript ST get mutable
ST.run (do
ref <- STRef.new initial
_ <- STRef.modify fn ref
STRef.read ref
)
@dakom
dakom / output.txt
Created July 1, 2018 00:40
install.py output for ycm debugging
-- The C compiler identification is MSVC 19.14.26431.0
-- The CXX compiler identification is MSVC 19.14.26431.0
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.14.26428/bin/Hostx86/x64/cl.exe -- works
@dakom
dakom / debug-vim.txt
Created July 1, 2018 00:36
vim --version for ycm debug
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 29 2018 22:02:24)
MS-Windows 64-bit console version
Included patches: 1-127
Compiled by appveyor@APPVYR-WIN
Huge version without GUI. Features included (+) or not (-):
+acl +eval -mouseshape -tag_any_white
+arabic +ex_extra +multi_byte_ime/dyn +tcl/dyn
+autocmd +extra_search +multi_lang +termguicolors
+autoservername +farsi +mzscheme/dyn +terminal
-balloon_eval +file_in_path -netbeans_intg -tgetent