Breakout Clone created for both Windows and PS Vita Platforms (Educational Purposes)
- SDL2 Development Libraries (https://www.libsdl.org/download-2.0.php)
- SDL2 Development TTF Libraries (https://www.libsdl.org/projects/SDL_ttf/)
- PS Vita with CFW installed (https://vita.hacks.guide/)
- PS Vita SDK (https://vitasdk.org/)
- PS Vita Shell (https://github.com/TheOfficialFloW/VitaShell/releases)
- QCMA (https://codestation.github.io/qcma/)
- Install MySys2 MinGW 64-bit (https://www.msys2.org/)
- Open MySys2 and navigate to
windowsdirectory - Download SDL2 Dev and SDL2 TTF Dev Libraries from What's needed section
- Note: Make sure to take note of where these files are installed for the next step.
- There are 4 variables in the
CMakeLists.txtfile that need to be replaced with the paths on your machine of where the SDL2 ibrary files and include directories are located in order to successfully link the SDL libraries to get an.exefile of the game. They are:
set(SDL2_INCLUDE_DIR "C:/msys64/usr/include/SDL2.0.16")
set(SDL2_LIBRARY "C:/msys64/usr/lib/SDL2.0.16/x64/SDL2.lib")
set(SDL2_TTF_INCLUDE_DIR "C:/msys64/usr/include/SDL2_TTF-2.0.15")
set(SDL2_TTF_LIBRARY "C:/msys64/usr/lib/SDL2_ttf-2.0.15/lib/x64/SDL2_ttf.lib")
- Change the path for each variable of where you saved the SDL2 include directories and libraries that are enclosed in quotation marks ("")
- In the MySys2 Terminal, install the
mingw-w64-x86_64-toolchain(https://packages.msys2.org/group/mingw-w64-x86_64-toolchain)
pacman -S mingw-w64-x86_64-toolchain
- In the MySys2 Terminal, type in:
./compile.sh
- The above shell script will automatically call CMake Commands to create the game's
.exefile on successful build
- Install CFW on PS Vita following link in What's needed section
- Install PS Vita SDK on PC following link in What's needed section
- Note: Once PS Vita SDK is installed, it will automatically install all the SDL2 libs for you (See: https://github.com/vitasdk/vdpm/blob/master/include/install-packages.sh for the list of all libs installed)
- Install QCMA on PC which will allow you to transfer files between PC and PS Vita
- Using WSL Terminal (Ubuntu on Windows), navigate to the
psvitadirectory of this project - Type in
cmake . - Type in
make all - Connect PS Vita to PC using USB cable
- Copy
.vpkfile built located in thepsvitadirectory from PC to PS Vita using QCMA. - Open Vita Shell app on PS Vita
- Navigate to
.vpkfile copied over from step 8 and press X to install
- Font used from Terrifried Repo (https://github.com/PolyMarsDev/Terri-Fried/blob/master/psvita/src/resources/font.otf)
- Font used from TwinkleBearDev Tutorial (https://www.willusher.io/sdl2%20tutorials/2013/12/18/lesson-6-true-type-fonts-with-sdl_ttf)
- https://github.com/vitasdk/samples
- https://www.willusher.io/pages/sdl2/
- https://github.com/PolyMarsDev/Terri-Fried
- To reduce code repetition of common gameplay logic blocks between psvita and windows builds, store functions such as
initBrickPositions()anddrawBricks()in a separate.cppand.hfile that can be reused by both psvita and windows builds - Create an abstraction layer of how controller inputs are received between different platforms. That is, create a generic interface that can be used to poll for input regardless of platform and create wrapper classes around the specific implementation details of the input modules (e.g. SDL2 Input system and PSVita Input system).

