Skip to content

SDL2 Starter Game Template implemented using OOPs Principles

License

Notifications You must be signed in to change notification settings

SatvikG7/SDL2-Game-Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SDL2 Game Template

SDL2

Introduction

This repository contains the template for a SDL2 project which does the following things:

  • Implements Game loop for 60 fps
  • Creates window
  • Sets window icon and title
  • Creates and Renders background texture
  • Creates and Renders sprite
  • Handles keypress events

Requirements

  • MinGW toolkit (g++) (required)
  • Python (>=3.8.x) (optional)

Libraries Required

  • SDL2
  • SDL_image

How to compile?

  1. Install and Extract

  2. Copy

    • SDL2/bin/* to bin/debug/ and bin/release/
    • SDL2/include/* to include/
    • SDL2/lib/* to lib/
    • SDL_image/bin/* to bin/debug/ and bin/release/
    • SDL_image/include/* to include/
    • SDL_image/lib/* to lib/
  3.  make res
    
     make run # to build and run debug executable
     # or
     make release # to build release executable
  4. (Optional) You can make changes to generate_sprite.py files to make changes to sprite

    python generate_sprite.py
    
    make res
  5. Feel free to open an issue in this repo if you get any error

About

SDL2 Starter Game Template implemented using OOPs Principles

Topics

Resources

License

Stars

Watchers

Forks