/sfmlFlashcards

Small flashcard Game. You can add and delete flash cards from the menu, and you can also choose to play a match game. In Match, we'll associate your terms and definitions with a flashcard. You can click on the question card, drag it, and hover it over the corresponding answer card. Press E to go back to menu...(that works for every selection from the menu except add/delete card)

Primary LanguageC++

SFMLFlashcards / TESTLY

Ubuntu Bash Build Ubuntu Make Build

Benjamin Michaelis, Hugo Aponte, Zach Griswold, Blake Calvin

Github Repo: https://github.com/BenjaminMichaelis/sfmlFlashcards

Directions

You can add and delete flash cards from the menu, and you can also choose to play a match game. In Match, we'll associate your terms and definitions with a flashcard. You can click on the question card, drag it, and hover it over the corresponding answer card. Press E to go back to menu...(that works for every selection from the menu except add/delete card) Can be run by directions below or make file (make; make run)

Prerequisites

Windows

MacOS

  • SFML 2.5.1 - Clang 64-bit
  • Command Line Tools / XCode (type "xcode-select --install" in terminal to trigger the installer)
  • Homebrew (for makeicns, or to optionally install SFML)

All


Installation

Windows

  1. Download & Extract SFML to C:/SFML-2.5.1/ where the bin/lib/include folders are contained within
  2. Download & Extract MinGW to C:/mingw32/ where the bin/lib/include folders are contained within

MacOS

  1. Install "Command Line Tools" in MacOS if they're not already installed (type "xcode-select --install" in terminal)
  2. Follow the "Installing SFML" directions here: https://www.sfml-dev.org/tutorials/2.5/start-osx.php#installing-sfml

Linux

  1. Ensure the GCC Toolchain is installed (sudo apt install build-essential)
  2. Run sudo apt install libsfml-dev. The SFML version you got will vary depending on the distro. 2.5.1 is included in Ubuntu 19.04 Disco Dingo for example.

All

  1. Download & Install Visual Studio Code if you don't already have it.
  2. Install the official C/C++ Extension, reload the window & wait for the dependencies to install.
  3. If on Windows, install Git Bash, and ensure the "terminal.integrated.shell.windows" property in the project's settings.json is set to bash.exe's correct location (default: C:/Program Files/Git/bin/bash.exe). We'll be using this for the terminal in our workspace so that the Makefile can run in both Windows, Mac & Linux
  4. In settings.json Ensure Path in the terminal.integrated.env.windows object is set to the correct location of the compiler's executable (example: C:\mingw32\bin) and the SFML directory is correct as well. Keep in mind Paths should be separated by a semi-colon with no spaces between.

Configuration

At this point, everything you need is installed

  1. Open the sfmlFlashcards folder in VS Code. You should see an lime-green status bar at the bottom (color-picked from the SFML logo).
  2. With Main.cpp (or any source file) open, check the lower-right to ensure "Win32/Mac/Linux" is the configuration set (this should be auto-selected by the C++ plugin). If it is not correct, hit Ctrl+Shift+B and select C/Cpp: Select a configuration... and choose the platform you're working on.
  3. At this point you should be able to run a build task (Ctrl+Shift+B > Build & Run), but it'll be nicer to add keybindings for these tasks so you can build with 1 keypress.
  4. Open the .vscode folder and click on the _keybindings.json file. This is not an officially recognized file, but just contains the keybindings you can copy into the actual keybindings.json file.
  5. Go into File > Preferences > Keyboard Shortcuts & click on the keybindings.json link at the top.
  6. Copy the keybindings into this file. Feel free to change them if you don't like them later.
  7. Hit the F9 key to run the Build & Run: Release task. It should run the Makefile, find the compiler, build the Main.cpp into Main.o, and launch the sample SFML app. Shift+F9 will launch the basic Debug build, and F8 will launch the actual Debugger alongside the Debug build.