dogs-ate-our-homework
Jeffrey Weng - Kyle Lin - Khinshan Khan
Period 10
Description
A tetris game built using C and SDL. The goal is to get the most points you can before time runs out or you reach the top of the map.
How to run
- Install all libraries
- Navigate to
./sdl_tests/sdlUbuntu/
- run
make
- run
./game
- Left/Right arrow key for movement. J/K for rotation.
SDL Installation + Libraries
Ubuntu
- Pre-Installation
- Check to see if you have SDL:
- To find the current SDL version to install:
- To find the current SDL_image version to install:
apt-cache search libsdl2-image
- To find the current SDL_ttf version to install:
apt-cache search libsdl2-ttf
- Installation
- Install SDL2:
apt-get install libsdl2-dev
- Install Image Library for PNG files:
apt-get install libsdl2-image-dev
- Install SDL_ttf:
apt-get install libsdl2-ttf-dev
Mac OS-X (On Xcode)
- Installation
- Download the .dmg for SDL2 on the webpage: SDL2 WebPage
- Download the .dmg for SDL2 image on the webpage: SDL2 Image Webpage
- Download the .dmg for SDL2 ttf on the webpage: SDL2 TTF Webpage
- Open the .dmg file and drag the SDL2.framework, SDL2_image.framework, SDL2_ttf.framework into your /Library/Frameworks folder.
- Open a new Xcode Project
- Select SDL Project
- Build Phases
- Link Binary with Libraries
- Press + and command+shift+g to find your SDL2.framework, SDL2_image.framework, and SDL2_ttf.framework
- Add them.
- Post-Installation
- In your Xcode Window
- Press Product
- Scheme
- Edit Scheme...
- Set custom working directory to your current working directory
Bugs
- Gravity works uniform on all pieces of the tetrimo rather than on the tetrimo
- Sometimes the last row clearing gets disabled (re-enabled after clearing more rows)
- Blocks can sort of phase throught the bottom if you move them alot on the last row (left and right)
- Rotating fast enough might cause temporary suspension (gravity will work as soon as you fail to be at that speed)
How to use log.sh
- Open the terminal
- Navigate to the root folder containing log.sh
- Run
./log.sh "<lastF>" "<devmsg>"