Thanks to visit codestin.com
Credit goes to github.com

Skip to content

tysweezy/spacedock-joystick

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spacedock-joystick

This project now uses uv for dependency management, running, and building.

Setup

uv sync

OpenGL prerequisites

  • GPU/driver support for a core OpenGL context.
  • On macOS, SDL is configured for OpenGL 3.2 core profile.
  • On Linux/Windows, SDL requests OpenGL 3.3 core profile.
  • If OpenGL context creation fails, verify system graphics drivers and any remote/headless environment constraints.

Run

uv run python control.py

or via the console script:

uv run spacedock-joystick

Controls

  • W/A/S/D move the current input cursor state.
  • Left-click and drag on the cube to move it in screen-space X/Y.
  • Releasing the left mouse button ends the drag.
  • Clicking outside the cube does not start dragging.
  • Joystick axis 0 and 1 are read and logged.
  • The renderer continuously draws a rotating cube using shader/VBO/VAO pipeline.

Renderer boundaries

  • control.py owns SDL init, event loop, and input handling.
  • renderer3d.py owns OpenGL shader setup, mesh buffers, matrices, and frame rendering.

First 3D cube milestone checklist

  • App launches with SDL + OpenGL context.
  • A rotating 3D cube renders every frame.
  • Window resize updates OpenGL viewport.
  • Frame presentation uses SDL_GL_SwapWindow.
  • Rendering path is modern OpenGL (no immediate mode).

Build

uv build

About

Joystick SDL2 fun

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages