Assembly Web Assembly Forth - sgml/signature GitHub Wiki
Assembly Game Design
(tradeoffs
(flat-data-vs-objects
(gain "Fast memory access" "Better CPU cache usage")
(loss "Rich inheritance" "Encapsulation"))
(explicit-memory-layout
(gain "Predictable performance" "Precise memory control")
(loss "Automatic memory management" "Abstraction"))
(entity-component-system-vs-object-oriented-programming
(gain "Scalable systems" "Parallel processing")
(loss "Intuitive object behavior" "Polymorphism"))
(manual-control-vs-convenience
(gain "Fine-tuned optimization" "Performance tuning")
(loss "Convenience" "Built-in abstractions"))
(separation-of-data-and-logic
(gain "Batching operations" "SIMD-friendly structure")
(loss "Tight coupling of data and behavior"))
(minimal-runtime-overhead
(gain "Fast execution" "Small memory footprint")
(loss "Dynamic features" "Runtime flexibility"))
)
Data Oriented Design
(data-oriented-design
(philosophy
"Optimize for speed and control"
"Treat data as streams, not behavior bundles"
"Favor composition over inheritance"))
(why-it-works
"Modern CPUs prefer contiguous memory"
"Predictable access patterns improve performance"
"Games process thousands of entities per frame")
)
Definition
(entity-component-system
(description
"An architectural pattern used in video game development"
"Separates data (components), identity (entities), and behavior (systems)"
"Follows composition over inheritance for flexibility and scalability")
(components
(entity "A unique identifier representing a game object")
(component "A plain data structure describing one aspect of an entity")
(system "A function or process that operates on entities with specific components"))
)
Tradeoffs
(entity-component-system-tradeoffs
(advantages
"Improved performance through data locality"
"Flexible composition of behaviors"
"Easier parallel processing and batching"
"Simplified runtime modification of entities")
(disadvantages
"Steeper learning curve for developers unfamiliar with ECS"
"More boilerplate code for simple behaviors"
"Debugging can be harder due to decoupled logic"
"Less intuitive than object-oriented models for small projects")
)
References
- https://github.com/spiroharvey/c64/blob/main/asm/C64%20Assembly%20Coding%20Guide.md
- https://meatfighter.com/nintendotetrisai/
- https://wiki.nesdev.com/w/index.php/Standard_controller
- https://www.chibiakumas.com/z80/Gameboy.php
- https://codebase64.org/doku.php?id=base:joystick_input_handling
- https://www.chibiakumas.com/68000/platform2.php
- https://rosettacode.org/wiki/Loops/Infinite#ARM_Assembly
- https://www.theiphonewiki.com/wiki/MobileDevice_Library
- https://hacks.mozilla.org/2018/07/introducing-the-d-web/
- https://blog.ircmaxell.com/2019/04/compilers-ffi.html
- https://android-developers.googleblog.com/2015/07/game-performance-data-oriented.html
- https://apachecon.com/acna2022/slides/01_Gonz%c3%a1lez_mod-wasm_Bringing_WebAssembly.pdf
- http://cggallant.blogspot.com/2018/01/webassembly-caching-when-using.html
- https://en.wikipedia.org/wiki/Fork_bomb
- http://files.catwell.info/misc/mirror/lua-5.2-bytecode-vm-dirk-laurie/lua52vm.html
- https://www.tutorialspoint.com/assembly_programming/assembly_quick_guide.htm
- https://stackoverflow.com/questions/43996835/assembly-8086-dosbox-how-to-produce-beep-sound
- https://www.c64-wiki.com/wiki/Assembly_Language_for_Kids_Commodore_64_-_Sanders
- https://www.codeproject.com/Articles/45788/The-Real-Protected-Long-mode-assembly-tutorial-for
- https://wiki.osdev.org/Virtual_8086_Mode
- http://infocenter.arm.com/help/topic/com.arm.doc.dai0235c/DAI0235C_migrating_from_mips_to_arm.pdf
- https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/xax-osdi08.pdf
- https://download-mirror.savannah.gnu.org/releases/pgubook/ProgrammingGroundUp-0-8.pdf
- https://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/WebIDL-Binder.html
- https://github.com/WebAssembly/design/issues/755
- https://blog.acolyer.org/2017/09/18/bringing-the-web-up-to-speed-with-webassembly/
- https://www.usna.edu/Users/cs/aviv/classes/si485h/s17/units/02/unit.html
- https://www.cl.cam.ac.uk/~caw77/papers/mechanising-and-verifying-the-webassembly-specification.pdf
- https://retrocomputing.stackexchange.com/questions/5925/who-wrote-the-ms-basic-on-the-pet-c64-etc
- https://www.dwheeler.com/6502/
- https://news.ycombinator.com/item?id=14516233
- https://news.ycombinator.com/item?id=13154111
- https://doc.lagout.org/operating%20system%20/linux/Assembly%20Language%20Step-by-Step%20-%20Programming%20with%20Linux%2C%203rd%20Edition.pdf
- https://www.asc.ohio-state.edu/lewis.239/Gauge/abrash.pdf
- http://cdtdoug.ca/2018/09/10/native-to-webview.html
Wasm
- https://www.accusoft.com/blog/should-i-be-using-webassembly/
- https://www.barcoderesource.com/WebAssembly_wasm.shtml
- https://www.codepool.biz/javascript-barcode-sdk-native-webassembly.html
- http://tesseract.projectnaptha.com/
- https://venturebeat.com/2018/10/09/dropboxs-autoocr-can-index-text-from-pdfs-and-images/
- https://codelabs.developers.google.com/codelabs/hour-chipmunk/index.html?index=..%2F..index#0