SDL2 module for Deno

Overview

Deno SDL2

Cross platform and stable bindings to SDL2. Have fun!

Features

  • Bindings to Video, Graphics, Font and Mixer subsystems. (Uses rodio instead of SDL2_Mixer)
  • Not --unstable. Uses TCP instead of Deno's traditional plugin system.

Example

import { Canvas } from "https://deno.land/x/sdl2/src/canvas.ts";

const canvas = new Canvas({ title: "Hello, Deno!", width: 800, height: 400 });

canvas.setDrawColor(0, 64, 255, 255);
canvas.clear();
canvas.present();

for await (const event of canvas) {
  switch (event.type) {
    case "draw":
      // Your game logic
      // ...
      break;
    case "mouse_motion":
      // Mouse stuff
      break;
    case "key_down":
      // Keyboard stuff
      break;
    // ...
    default:
      break;
  }
}

License

MIT

Comments
  • sprite example not working, main readme example not working.

    sprite example not working, main readme example not working.

    The sprite example appears to not be fetching some dynamic libs it looking for:

    ~/Code/scratchwork/deno_sdl2/examples/sprite  deno run --unstable --allow-read --allow-net --allow-run --allow-env --allow-write  main.ts
    Download target/debug/libdeno_sdl2.dylib
    error: Uncaught (in promise) CacheError: /Users/andrew/Code/scratchwork/deno_sdl2/examples/sprite/target/debug/libdeno_sdl2.dylib is not valid.
        throw new CacheError(`${path} is not valid.`);
              ^
        at protocolFile (https://deno.land/x/[email protected]/file_fetcher.ts:12:11)
        at async fetchFile (https://deno.land/x/[email protected]/file_fetcher.ts:41:14)
        at async FileWrapper.fetch (https://deno.land/x/[email protected]/file.ts:95:18)
        at async FileWrapper.get (https://deno.land/x/[email protected]/file.ts:113:12)
        at async cache (https://deno.land/x/[email protected]/cache.ts:67:10)
        at async Wrapper.cache (https://deno.land/x/[email protected]/cache.ts:21:12)
        at async Module.prepare (https://deno.land/x/[email protected]/plug.ts:75:16)
        at async file:///Users/andrew/Code/scratchwork/deno_sdl2/bindings/bindings.ts:11:14
    

    it also is missing a few permissions in the readme (--allow-env --allow-write)

    the main readme example has some incorrect type errors:

    ~/Code/scratchwork/deno_sdl2  deno run --unstable sample.ts
    Check file:///Users/andrew/Code/scratchwork/deno_sdl2/sample.ts
    error: TS2345 [ERROR]: Argument of type '{ title: string; width: number; height: number; }' is not assignable to parameter of type 'WindowOptions'.
      Type '{ title: string; width: number; height: number; }' is missing the following properties from type 'WindowOptions': flags, centered, fullscreen, hidden, and 3 more.
    const canvas = new Canvas({ title: "Hello, Deno!", width: 800, height: 400 });
                              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        at file:///Users/andrew/Code/scratchwork/deno_sdl2/sample.ts:3:27
    

    it is also missing the --unstable flag

    opened by andykais 7
  • proper way to get dimensions of surfaces?

    proper way to get dimensions of surfaces?

    I couldn't figure out how to get the dimensions of images & fonts.

    I am currently doing this:

    const imgTitle = {
      tex: canvas.createTextureFromSurface(canvas.loadSurface('./assets/title.png')),
      dim: { x: 0, y: 0, width: 158, height: 62  }
    }
    
    // ...later
    const pos = { ...imgTitle.dim, x: 80, y: 60}
    canvas.copy(imgTitle.tex, imgTitle.dim, pos)
    
    

    where I just put in the right size

    and

    canvas.renderFont(font, "Press any key.", {
        blended: { color: { r: 255, g: 255, b: 255, a: 255 } },
      }, {
        x: 120,
        y: 130,
        width: 80,
        height: 14,
      })
    

    where I guess, and tweak it until it sort of fits.

    Is there a proper way to do this that can tell me the size of some text used by a font, or would there be interest in adding some utilities like this in a PR?

    I am imagining things like love has. getLineHeight and getWrap and getWidth are super-useful for laying out text.

    Seems like TTF_SizeText might be a good start, but I'm not sure how to wrap it in deno/deno_sdl2.

    opened by konsumer 3
  • Working Font Render example with v5.0

    Working Font Render example with v5.0

    I've been playing around with your Deno SDL2 bindings and was looking to use it as a starting point for porting a project I have been seriously committed to for the last year and a half plus. It is built on the JavaScript Canvas API so the general concepts are familiar and approachable for me.

    However, I have been trying my hardest to get a working example of the Font.renderSolid/TTF_RenderText_Solid using the latest release v5.0. I saw the only other example that was using the text rendering was the project that recreated the Chrome Dinosaur jumping game but this was using the Canvas.renderFont that existing in the SDL API versions previous to 5. I repeatedly get issues with buffer/pointer types but believed I had resolved these as I read about the FFI pointer/buffer changes that were supposed to come with Deno 1.29. I can only see it in v3 and prior and there have been no other projects at this time that I could find a reproducible example to emulate.

    Was hoping you might be able to point me in the right direction as if v5.0 doesn't work then I believe I would have to revert to v3 of deno_sdl2

    Goal was to render a simple "Hello World" string in the center of the window/canvas. If I am able to do the font, I would be able to port my entire project rather quickly but this is the one major feature I am truly struggling with.

    This code results in the error "error: Uncaught TypeError: Invalid FFI pointer type, expected null, integer or BigInt const raw = sdl2Font.symbols.TTF_RenderText_Solid("

    My mod.ts does integrate all changes that were listed here https://github.com/littledivy/deno_sdl2/pull/58/files#diff-e8c3622ccfbed67f4b3058cd4417bf41d066236f49c6f3e63b7c243b584c6734 as well

    import { Color, EventType, WindowBuilder } from "./mod.ts";
    import { FPS } from "./utils.ts";
    
    const stepFrame = FPS();
    const window = new WindowBuilder("deno_sdl2 Font", 800, 600).build();
    const canvas = window.canvas();
    
    const font = canvas.loadFont(".\\mainfont.ttf", 128);
    const color = new Color(0, 0, 0);
    
    const surface = font.renderSolid(Deno.args[0] || "Hello there!", color);
    
    const creator = canvas.textureCreator();
    const texture = creator.createTextureFromSurface(surface);
    
    async function frame() {
      canvas.clear();
      canvas.copy(texture);
      canvas.present();
      stepFrame();
    }
    
    for (const event of window.events()) {
      if (event.type == EventType.Quit) Deno.exit(0);
      else if (event.type == EventType.Draw) frame();
    }
    
    
    opened by captainbuckkets 1
  • update Deno to upcoming 1.29

    update Deno to upcoming 1.29

    Fixes https://github.com/littledivy/deno_sdl2/issues/55 Fixes https://github.com/littledivy/deno_sdl2/issues/57 Fixes https://github.com/littledivy/deno_sdl2/issues/54

    opened by littledivy 1
  • Uncaught TypeError: Invalid FFI pointer type, expected null, integer or BigInt

    Uncaught TypeError: Invalid FFI pointer type, expected null, integer or BigInt

    Trying to run the hello.ts example, but getting an error, pasted below. This happens on multiple machines on the latest deno. The most recent version of deno I have laying around where the code works is 1.23.2.

    tychi@pop-os:~/SourceCode/deno_sdl2$ deno run --allow-ffi --unstable examples/hello.ts --no-check
    ⚠️  ️Deno requests env access to "DENO_SDL2_PATH". Run again with --allow-env to bypass this prompt.
       Allow? [y/n (y = yes allow, n = no deny)]  y
    SDL2 initialized on Linux
    error: Uncaught TypeError: Invalid FFI pointer type, expected null, integer or BigInt
        const window = sdl2.symbols.SDL_CreateWindow(
                                    ^
        at Object.eval [as SDL_CreateWindow] (eval at DynamicLibrary (deno:ext/ffi/00_ffi.js:366:34), <anonymous>:4:13)
        at WindowBuilder.build (file:///home/tychi/SourceCode/deno_sdl2/mod.ts:956:33)
        at file:///home/tychi/SourceCode/deno_sdl2/examples/hello.ts:4:60
    tychi@pop-os:~/SourceCode/deno_sdl2$ 
    
    opened by tylerchilds 1
  • panicked with macos aarch64

    panicked with macos aarch64

    I don't know this is an issue of deno_sdl2, maybe deno itself?

    v1.23.4 works fine, but I got this error with v1.24.0.

    macOS 12.3.1 Monterey / M1 Macbook air

    import { WindowBuilder } from "https://deno.land/x/sdl2/mod.ts";
    const window = new WindowBuilder("Hello, Deno!", 640, 480).build();
    
    hash@hashnoMacBook-Air deno_sdl_bug % deno run -A --unstable main.ts
    <string>:1: error: include file 'stdint.h' not found
    
    ============================================================
    Deno has panicked. This is a bug in Deno. Please report this
    at https://github.com/denoland/deno/issues/new.
    If you can reliably reproduce this panic, include the
    reproduction steps and re-run with the RUST_BACKTRACE=1 env
    var set and include the backtrace in your report.
    
    Platform: macos aarch64
    Version: 1.24.0
    Args: ["deno", "run", "-A", "--unstable", "main.ts"]
    
    thread 'main' panicked at 'gen_trampoline: ()', ext/ffi/lib.rs:735:51
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    
    opened by hashrock 1
  • `SDL2_image` not found on Windows

    `SDL2_image` not found on Windows

    I boot up a Windows VM, install SDL2 and put it in my current working directory. And run the example.

    C\> SET "DENO_SDL2_PATH=%CD%"
    C\> deno run --allow-env --allow-ffi --unstable https://deno.land/x/sdl2/examples/hello.ts
    

    After running that, I get the following error:

    error: Uncaught Error: Could not open library: The specified module could not be found.
    
    const sdl2Image = Deno.dlopen(getLibraryPath("SDL2_image"), {
                           ^
        at Object.opSync (deno:core/01_core.js:174:12)
        at new DynamicLibrary (deno:ext/ffi/00_ffi.js:231:24)
        at Object.dlopen (deno:ext/ffi/00_ffi.js:329:12)
        at https://deno.land/x/[email protected]/mod.ts:245:24
    

    The thing is, SDL2_image.dll exist in the same directory as SDL2.dll and SDL2_ttf.dll.

    C\> DIR | FINDSTR /c:"SDL2"
    13/01/2022  03:14 AM         1,763,967 SDL2.dll
    31/07/2021  08:20 PM           137,492 SDL2_image.dll
    13/01/2022  03:18 AM            69,473 SDL2_ttf.dll
    

    What could be the problem? Is it because of my VM?

    opened by fxrysh 1
  • Slow exit on Windows

    Slow exit on Windows

    20220106-deno-sdl-slow-exit

    In Windows, it takes about 20 seconds from the time I press the quit button to the time it exits. During that time, it appears to be frozen. However, the deno process CPU usage is 0%. This issue occurs with minimal demo.

    • Windows 10 Home x64 build 19043.1415
    • Ryzen 5 3500
    • 16GB Mem
    bug 
    opened by hashrock 1
  • Add sprite example

    Add sprite example

    init

    Hi divy, this project is really awesome.

    I'm not sure if I should include it in this repository, but I've made a example that uses sprites. I also made an image resource for this, which I think you can use to add more examples.

    It does occasionally throw an exception on Windows. I don't know if this is caused by the code, so it would be great if you could check if it works in your environment.

    Exception details:

    Error: control character (\u0000-\u001F) found while parsing a string at line 1 column 8189n 8189                                                                               断されました。 (os error 10054)
    error: Uncaught (in promise) ConnectionReset: 既存の接続はリモート ホストに強制的に切
    断されました。 (os error 10054)
      await conn.read(status);
      ^
        at deno:core/01_core.js:106:46
        at unwrapOpResult (deno:core/01_core.js:126:13)
        at async read (deno:ext/net/01_net.js:21:19)                                     .ts:385:32)
        at async readStatus (file:///C:/code/deno/deno_sdl2/src/msg.ts:51:3)
        at async Canvas.[Symbol.asyncIterator] (file:///C:/code/deno/deno_sdl2/src/canvas.ts:385:32)
        at async file:///C:/code/deno/deno_sdl2/examples/sprite/main.ts:88:18
    
    opened by hashrock 1
  • canvas.copy is not working

    canvas.copy is not working

    Trying to update deno-dino but latest SDL2 throws this error:

    SDL2 initialized on Mac OS X
    error: Uncaught TypeError: Invalid FFI pointer type, expected null, integer, BigInt, ArrayBuffer, or ArrayBufferView
        const ret = sdl2.symbols.SDL_RenderCopy(
                                 ^
        at Canvas.copy (https://deno.land/x/[email protected]/mod.ts:523:30)
        at gameLoop (file:///Users/x/nightly/dino-deno/game.ts:68:17)
        at file:///Users/x/nightly/dino-deno/game.ts:187:7
    
    opened by nightlyistaken 0
  • feat: raw SDL2 bindings

    feat: raw SDL2 bindings

    This is the 3rd rewrite of deno_sdl2.

    First one used a TCP backend. Second one used deno_bindgen to wrap rust-sdl2. This one removes that abstraction and we're left with raw bindings to SDL2.

    It's much easier to maintain/release deno_sdl2 now!

    opened by littledivy 0
  • Memory management

    Memory management

    I am curious to see how you deal with memory management.

    I see SDL_DestroyWindow declared but never used

    https://github.com/littledivy/deno_sdl2/blob/b0381ee18f3033915f65e44f4d4bbf0da17d5797/mod.ts#L73

    How is this supposed to work?

    opened by audetto 0
  • libjpeg error on Debian (testing)

    libjpeg error on Debian (testing)

    Attempting to run the sample program gives the following error:

    error: Uncaught (in promise) Error: Could not open library: Could not open library: libjpeg.so.8: cannot open shared object file: No such file or directory
      return Deno.dlopen(file.path, symbols);
                  ^
        at Object.opSync (deno:core/01_core.js:142:12)
        at new DynamicLibrary (deno:ext/ffi/00_ffi.js:15:24)
        at Object.dlopen (deno:ext/ffi/00_ffi.js:63:12)
        at Module.prepare (https://deno.land/x/[email protected]/plug.ts:77:15)
        at async https://deno.land/x/[email protected]/bindings/bindings.ts:11:14
    

    Debian hasn't shipped libjpeg8 since 2017, considering it to have been superceded by libjpeg9, so no surprise there.

    Not sure if there's anything you can do about this; just wanted to flag it. Thanks.

    opened by adamsmasher 0
  • 'snd_pcm_open' failed with error 'ECONNREFUSED: Connection refused' when playing audio before previous ends

    'snd_pcm_open' failed with error 'ECONNREFUSED: Connection refused' when playing audio before previous ends

    Full output:

    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
    ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
    ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
    ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection terminated
    
    ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
    ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm_dmix.c:1024:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
    ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
    ALSA lib pcm_dmix.c:1024:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
    ALSA lib pcm_dsnoop.c:577:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
    ALSA lib pcm_dsnoop.c:577:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
    ALSA lib pcm_dsnoop.c:577:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
    ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
    ALSA lib pcm_usb_stream.c:508:(_snd_pcm_usb_stream_open) Unknown field hint
    ALSA lib pcm_usb_stream.c:508:(_snd_pcm_usb_stream_open) Unknown field hint
    Error: A backend-specific error has occurred: ALSA function 'snd_pcm_open' failed with error 'ECONNREFUSED: Connection refused'
    
    Caused by:
        0: A backend-specific error has occurred: ALSA function 'snd_pcm_open' failed with error 'ECONNREFUSED: Connection refused'
        1: A backend-specific error has occurred: ALSA function 'snd_pcm_open' failed with error 'ECONNREFUSED: Connection refused'
    
    bug 
    opened by littledivy 0
Releases(0.6.0)
Owner
Divy Srivastava
17 | Core team @useverto @nestdotland @elsaland | Contributor @denoland
Divy Srivastava
Provides event handling for egui in SDL2 window applications.

egui-sdl2-event Provides event handling for egui when SDL2 is used as the windowing system. This crate does not perform any rendering, but it can be c

Valtteri Vallius 8 Feb 15, 2023
Foreign Function Interface Plugin for Deno.

Deno FFI Plugin to call dynamic library functions in Deno. Usage import { Library } from "https://deno.land/x/[email protected]/mod.ts"; const lib = new

DjDeveloper 4 Aug 18, 2022
Prototype for a Deno to npm package build tool.

dnt - Deno to Node Transform Prototype for a Deno to npm package build tool. What does this do? It takes a Deno module and creates an npm package for

David Sherret 573 Jan 9, 2023
Prototype for a Deno to npm package build tool.

dnt - Deno to Node Transform Prototype for a Deno to npm package build tool. What does this do? It takes a Deno module and creates an npm package for

Deno Land 570 Dec 28, 2022
Windowing support for Deno WebGPU.

deno_desktop Windowing support for Deno WebGPU. In very early stages at the moment. Usage const win = Deno.createWindow({ title: "Deno Desktop", w

DjDeveloper 56 Oct 26, 2022
Examples for Deno Deploy

Deno Deploy Examples This repository contains a list of examples for Deno Deploy. fetch - Make outbound requests using the fetch() API. json_html - Re

Deno Land 118 Dec 19, 2022
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

Deno Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. Features Secure by default. No file,

Derek Jones 2 Aug 13, 2022
autogen website (with Deno Core)

Kurit Static website generator ?? Warning WIP: It is still under development, so some of the features may not be developed. Project Structures graph T

null 11 Oct 16, 2023
A simple, cross-platform GUI automation module for Rust.

AutoPilot AutoPilot is a Rust port of the Python C extension AutoPy, a simple, cross-platform GUI automation library for Python. For more information,

null 271 Dec 27, 2022
Easy c̵̰͠r̵̛̠ö̴̪s̶̩̒s̵̭̀-t̶̲͝h̶̯̚r̵̺͐e̷̖̽ḁ̴̍d̶̖̔ ȓ̵͙ė̶͎ḟ̴͙e̸̖͛r̶̖͗ë̶̱́ṉ̵̒ĉ̷̥e̷͚̍ s̷̹͌h̷̲̉a̵̭͋r̷̫̊ḭ̵̊n̷̬͂g̵̦̃ f̶̻̊ơ̵̜ṟ̸̈́ R̵̞̋ù̵̺s̷̖̅ţ̸͗!̸̼͋

Rust S̵̓i̸̓n̵̉ I̴n̴f̶e̸r̵n̷a̴l mutability! Howdy, friendly Rust developer! Ever had a value get m̵̯̅ð̶͊v̴̮̾ê̴̼͘d away right under your nose just when

null 294 Dec 23, 2022
Redirect Deno dependencies from semantic versions to the newest fitting version on deno.land/x

Deno Semver Redirect Redirect Deno dependencies from semantic versions to the newest fitting version on deno.land/x. See also this Deno Issue. How to

EdJoPaTo 8 Mar 12, 2022
The module graph logic for Deno CLI

deno_graph The module graph/dependency logic for the Deno CLI. This repository is a Rust crate which provides the foundational code to be able to buil

Deno Land 67 Dec 14, 2022
SDL2 bindings for Rust

Rust-SDL2 Bindings for SDL2 in Rust Changelog for 0.34.2 Overview Rust-SDL2 is a library for talking to the new SDL2.0 libraries from Rust. Low-level

null 2.2k Jan 5, 2023
A wrapper around SDL2's game controller API.

fishsticks System for handling gamepad input, using SDL2's game controller API as the backend. License Fishsticks is dual-licensed under either Apache

null 7 Dec 8, 2022
Chip8 emulator written in pure rust, using rust-sdl2 for graphics

Rust-8 chip8 emulator written in rust, using rust-sdl2 for graphics. Features Fully implemented all 35 original chip8 opcodes. This emulator does NOT

Chris Hinson 7 Dec 28, 2022
SDL2 bindings for Rust

Rust-SDL2 Bindings for SDL2 in Rust Changelog for 0.35.0 Overview Rust-SDL2 is a library for talking to the new SDL2.0 libraries from Rust. Low-level

null 2.2k Dec 31, 2022
A simple Verlet integration solver written using the Rust SDL2 bindings.

Rust Verlet Solver A simple Verlet integration solver written using the Rust SDL2 bindings. Where's the friction?! Building cargo-vcpkg is required in

Will 8 Jun 6, 2022
A render-backend independant egui backend for sdl2

A Sdl2 + Egui Backend An egui backend for sdl2 unbound to any renderer-backend. You can include it like so: [dependencies] egui_sdl2_platform = "0.1.0

null 4 Dec 16, 2022
A Chip-8 Emulator written in Rust & SDL2

Crab-8 A fully featured Chip-8 Emulator written in Rust. This project was written as a learning & development project in rust, and as such the code ma

Harry Smith 3 Dec 1, 2022
Provides event handling for egui in SDL2 window applications.

egui-sdl2-event Provides event handling for egui when SDL2 is used as the windowing system. This crate does not perform any rendering, but it can be c

Valtteri Vallius 8 Feb 15, 2023