Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adia-dev/sdl2-zig-demo
Showcase of Zig and SDL2
https://github.com/adia-dev/sdl2-zig-demo
sdl2 zig zig-lang
Last synced: 24 days ago
JSON representation
Showcase of Zig and SDL2
- Host: GitHub
- URL: https://github.com/adia-dev/sdl2-zig-demo
- Owner: adia-dev
- Created: 2023-06-11T16:20:37.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2023-06-11T16:20:39.000Z (over 1 year ago)
- Last Synced: 2024-10-02T07:04:56.923Z (about 1 month ago)
- Topics: sdl2, zig, zig-lang
- Language: Zig
- Homepage:
- Size: 1.24 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SDL2 Zig Demo
This repository contains an updated version of the SDL2 Zig Demo created by @andrewrk. The original repository can be found [here](https://github.com/andrewrk/sdl-zig-demo).
## Demo
Check out the demo of the SDL2 Zig Demo in action:
![demo](assets/demo.gif)
The demo showcases a simple application window created using SDL2 in Zig. The window allows user interaction and displays a red square that can be moved using arrow keys. Additionally, it renders text on the window to display information such as the position and speed of the square.
## How to Build and Run
To build and run the SDL2 Zig Demo, follow these steps:
1. Clone the repository:
```bash
git clone https://github.com/adia-dev/sdl2-zig-demo.git
```2. Change into the project directory:
```bash
cd sdl2-zig-demo
```3. Build the project:
```bash
zig build run
```This will compile the code and execute the resulting binary, launching the SDL2 Zig Demo window.
## Prerequisites
Before running the SDL2 Zig Demo, make sure you have the following dependencies installed:
- Zig compiler (version 0.11 or later (the one the project was built with: `0.11.0-dev.3384+00ff65357`))
- SDL2 development librariesEnsure that you have the necessary dependencies installed before attempting to build and run the demo.
## Contributing
Contributions are welcome! If you find any issues or have suggestions for improvements, feel free to open an issue or submit a pull request.