Skip to content

C-Standards is the C version of my Standards library, originally written in Java.

License

Notifications You must be signed in to change notification settings

joshuacrotts/c-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C - Standards

CodeFactor GitHub contributors GitHub commit activity GitHub repo size GitHub issues open GitHub issues closed

C - Standards is the continuation of the Standards game library, originally written in Java. While not all features are implemented such as handlers, the basic necessities for creating a game are completely here. All data structures for entity-handling/updating/drawing should be drawn by the programmer, but these structures should come at a future date. SDL is the back-end graphical library for this engine.

Dependencies

The only dependencies for this library are SDL components.

  1. SDL_2.0.12
  2. SDL_ttf 2.0.15 (Fonts)
  3. SDL_mixer 2.0.4 (Audio)
  4. SDL_image 2.0.5 (PNG/JPG Wrapper)

Rebuilding C - Standards

Windows: To rebuild the code, clone the repository to your computer. This project is compiled with MinGW and a makefile. Depending on how you want to compile the project (e.g. with Visual Studio, CodeBlocks, etc.), you may need to alter the makefile to suit your needs. Downloading and installing the dependencies on Windows takes a little more effort than MacOS or Linux:

  1. Download mingw-get-setup.exe.
  2. Install all packages except mingw32-gcc-ada-base, mingw32-gcc-fortran-base, and mingw32-gcc-objc-base through the installer.
  3. Download the four libraries above. The SDL2.0.12 link only provides a DLL file. The rest come in a .tar.gz file to extract. Make sure to choose the MinGW developer version.
  4. Inside these archives exists two folders: an i686-w64, and x86_64-w64 version. Choose the former (i686-w64). This is the 32-bit version, which is what we will use.
  5. There are three folders in each extension: bin, include, and lib. The bin/ folder provides the .dll files. Store these in C:/MinGW/bin. The include/ folder has an SDL2 folder with the respective .h file. Drag the SDL2 folder into C:/MinGW/include (do not take the .h file out!). Lastly, the lib/ folder contains necessary libraries (.a files) that accompany the addon. Drag these into C:/MinGW/lib.
  6. At this point, your code should be good to go. If you are using VSCode, make sure to set the compiler to gcc-x86, and set the compiler path to C:/MinGW/bin/gcc.exe. Compile the code via mingw32-make.

MacOS: For MacOS, run the following commands in your terminal to get the appropriate development files for SDL:

  1. brew install SDL2
  2. brew install SDL2_image
  3. brew install SDL2_ttf
  4. brew install SDL2_mixer

Then, compile via make.

Linux (Ubuntu/Debian): The process is similar to the former, with the exception of having to install SDL files to your system in Linux. Run the following commands (or their distro-equivalent) in your terminal:

  1. sudo apt-get install libsdl2-dev
  2. sudo apt-get install libsdl2-image-dev
  3. sudo apt-get install libsdl2-ttf-dev
  4. sudo apt-get install libsdl2-mixer-dev

Then, compile via make.

Linux (Arch-Based Distros): Run the following commands after cloning the repo to install SDL2:

  1. sudo pacman -S sdl2
  2. sudo pacman -S sdl2_image
  3. sudo pacman -S sdl2_ttf
  4. sudo pacman -S sdl2_mixer

Then, compile via make.

API

The API is located here.

Reporting Bugs

See the Issues Tab.

Version History

The master branch encompasses all changes. The development branches have in-progress additions and updates that are not yet ready for the master branch. Each person on the project has a respective development branch with their name as the suffix. Please work on only your branch. Additionally, if you are not on the immediate team, you can create a fork of the project, then submit a pull request for review.

About

C-Standards is the C version of my Standards library, originally written in Java.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published