Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Common Lisp
  3. cl-sdl2

cl-sdl2

MITCommon Lisp

Common Lisp bindings for SDL2, enabling cross-platform game and multimedia development in Lisp.

GitHubGitHub
337 stars82 forks0 contributors

What is cl-sdl2?

cl-sdl2 is a Common Lisp binding library for SDL2, the popular cross-platform multimedia development library. It provides Lisp developers with access to SDL2's graphics, audio, input, and windowing capabilities, enabling game and multimedia application development in Common Lisp.

Target Audience

Common Lisp developers who want to create games, interactive applications, or multimedia projects using SDL2's capabilities from within Lisp.

Value Proposition

It offers a native Lisp interface to SDL2 with good integration into the Common Lisp ecosystem, including Quicklisp package management and SLIME/Slynk debugging support, making SDL2 development more accessible to Lisp programmers.

Overview

Common Lisp bindings for SDL2 using C2FFI.

Use Cases

Best For

  • Creating 2D games in Common Lisp
  • Building multimedia applications with graphics and audio in Lisp
  • Developing cross-platform interactive simulations
  • Learning game development with Common Lisp
  • Prototyping game ideas quickly in Lisp
  • Integrating SDL2 functionality into existing Lisp projects

Not Ideal For

  • Developers working in programming languages other than Common Lisp
  • Projects demanding high-performance 3D graphics with modern rendering techniques like ray tracing or complex shaders
  • Teams seeking an all-in-one game engine with built-in tools for physics, UI, and asset pipelines
  • Environments where managing external C library dependencies is impractical or restricted, such as in sandboxed or embedded systems

Pros & Cons

Pros

Full SDL2 Access

Provides comprehensive, idiomatic Common Lisp bindings to SDL2's video, audio, events, and input subsystems, enabling full utilization of the library's capabilities as highlighted in the README.

Cross-Platform Support

Inherits SDL2's cross-platform nature, allowing Lisp applications to run seamlessly on Linux, macOS, and other supported operating systems without code changes.

Lisp Ecosystem Integration

Integrates with Quicklisp for easy installation and supports Swank/Slynk for interactive debugging and restarts in SLIME or Sly, enhancing the development workflow as described in the installation section.

Comprehensive Examples

Includes example code that demonstrates basic SDL2 usage and OpenGL integration, helping developers quickly grasp how to use the library, as shown in the examples section.

Cons

Native Dependency Management

Requires manual installation and management of the SDL2 C library, which can be platform-specific and prone to compatibility issues, adding setup complexity beyond typical Lisp packages.

Platform-Specific Threading Issues

On macOS, especially with SBCL, extra steps like using sdl2:make-this-thread-main are needed for thread initialization, introducing cross-platform development hurdles as noted in the OSX section.

Performance Overhead

As a foreign function interface wrapper, it may introduce performance overhead compared to direct C/C++ SDL2 usage, which could impact real-time applications like fast-paced games.

Limited High-Level Features

Focuses on low-level SDL2 bindings without providing higher-level abstractions for game development, such as scene management or asset loading, requiring more manual coding effort.

Frequently Asked Questions

Quick Stats

Stars337
Forks82
Contributors0
Open Issues6
Last commit1 year ago
CreatedSince 2013

Tags

#graphics#sdl2#opengl#quicklisp#bindings#game-development#cross-platform#common-lisp#multimedia

Built With

S
SDL2
C
Common Lisp
c
c2ffi

Included in

Common Lisp2.9k
Auto-fetched 23 hours ago

Related Projects

discussiondiscussion

General-purpose editor/IDE with high expansibility in Common Lisp

Stars2,987
Forks251
Last commit3 days ago
cl-cudacl-cuda

Cl-cuda is a library to use NVIDIA CUDA in Common Lisp programs.

Stars305
Forks27
Last commit5 years ago
CLinchCLinch

Common Lisp 3D/2D Graphics Engine for OpenGL

Stars273
Forks23
Last commit9 years ago
VarjoVarjo

Lisp to GLSL Language Translator

Stars229
Forks22
Last commit10 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub