top-level view of the problem i want an architecture that allows me to develop quickly, making adhoc objects without slotting them and abstracting them into either inheritance hierarchies or interfaces to solve plumbing problems. i just want to be able to smash together a script super quick and just gently make sure it has most of the things it needs to have or be in order to behave like, say, a weapon, or a character. this should not only serve me in long-term projects, but i want this to work especially in highly iterative and time sensitive workflows, like game jams (if you can get your teammates on board).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifndef DYNAMIC_ARRAY_H | |
| #define DYNAMIC_ARRAY_H | |
| #ifndef DYNAMIC_ARRAY_MALLOC | |
| #include <stdlib.h> | |
| #define DYNAMIC_ARRAY_MALLOC malloc | |
| #endif | |
| #ifndef DYNAMIC_ARRAY_REALLOC | |
| #include <stdlib.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import matplotlib.bezier as bezier | |
| if __name__ == '__main__': | |
| seg = bezier.BezierSegment([ | |
| (0, 0), | |
| (16, 40), | |
| (32, -32), | |
| ]) | |
| seg2 = bezier.BezierSegment([ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| import ctypes | |
| import threading | |
| import time | |
| import tkinter as tk | |
| def _main() -> None: | |
| done = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <errno.h> | |
| #include <fcntl.h> | |
| #include <linux/fs.h> | |
| #include <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <sys/ioctl.h> | |
| #include <sys/mman.h> | |
| #include <unistd.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env luajit2 | |
| local ffi = require 'ffi' | |
| ffi.cdef [[ | |
| int glfwInit(void); | |
| void glfwTerminate(void); | |
| void glfwWindowHint(int hint, int value); | |
| void* glfwCreateWindow(int width, int height, const char *title, void *monitor, void *share); | |
| void glfwDestroyWindow(void *window); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // by Mason "Belmondo" | |
| // based off of Mohsen Zare's implementation | |
| shader_type spatial; | |
| render_mode cull_back, depth_draw_always, specular_disabled; | |
| uniform sampler2D albedo_texture : filter_nearest, repeat_enable, source_color; | |
| uniform vec2 uv1_offset; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <cmath> | |
| #include <cstdio> | |
| #include <raylib.h> | |
| #include <raymath.h> | |
| #include <vector> | |
| static const auto TICK_RATE = 1.0 / 30.0; | |
| static Vector2 playerPosition { 5, 5 }; | |
| static Vector2 playerDirection { 0, -1 }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang racket/base | |
| (require ffi/unsafe) | |
| (define raylib (ffi-lib "libraylib")) | |
| (define-cstruct _Color { | |
| [r _ubyte] | |
| [g _ubyte] | |
| [b _ubyte] |
OlderNewer