Learn how to use the SDL2 package in C to draw a simple grid using isometric projection.
Prerequisite: You must have the gcc compiler and SDL2 package installed on your machine to run this code.
- Clone this repo by typing this into your command line: git clone https://github.com/petehwu/Raise_the_terrain.git
- change directory into the repo by typing: cd Raise_the_terrain
- Compile this code by typing: ./compile_this inside the Raise_the_terrain folder
- Once compiled you can run the executable using either of the supplied z_axis value files terrain z_axis or terrain zeros Alternatively you can create your own z_axis file by copying the zeros file and changing the 0 values to a value you prefer.
File | Description |
---|---|
compile_this | bash script used to compile the program |
header.h | header file containing prototypes of all functions and structs used |
helper.c | helper functions |
init.c | functions to initialize the SDL session and draw |
main.c | main entry point into the program |
z_axis | files containing the z-axis values for the 8x8 grid |
zeros | files containint all 0s for the z-axis values for the 8x8 grid |
Peter Wu