Skip to content
/ sdl2-game-starter Public template

A template for a game in the C programming language that can be compiled to web and native targets from the same codebase.

Notifications You must be signed in to change notification settings

diraneyya/sdl2-game-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDL2 Game Template

Preview link: https://diraneyya.github.io/sdl2-game-starter/

This is a minimal C program that can be built into web and native targets (currently, only Mac OS X is supported).

Instructions

  1. Install the Emscripten SDK using the instructions below:
    https://emscripten.org/docs/getting_started/downloads.html

  2. Clone this repository and cd into it:

git clone git@github.com:diraneyya/sdl2-game-starter.git
cd sdl2-game-starter
  1. Run make web to make the web target.
  • Artifact: index.html (at the root of the repository)
  • How to run: using the live-server extension in vscode or the emrun command by typing emrun index.html in the shell.
  1. Run make macos to make the Mac OS X target.
  • Artifact: index.app (at the root of the repository).
  • How to run: double click in Mac OS X

Web app

Mac OS X native app