Skip to content

A 2D puzzle game developed in C++ using SFML and PhysicsFS

License

Notifications You must be signed in to change notification settings

salindersidhu/Blocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Blocks

Contributors Visitors License: MIT

Overview

Blocks is a 2D puzzle game where the goal is to manipulate blocks horizontally or vertically to guide the red block off the board. Each block moves only along its orientation: vertical blocks move up or down, while horizontal blocks move left or right. To slide a block, click to select it, then move your mouse; release to place the block. Successful completion of each level reveals the number of moves and time taken.

Main Menu Level 1 Level 5 Level 5 Complete

Prerequisite Software

Software Version
Git 2.20.1+
Visual Studio 2017+
SFML 2.3.2
CocoaDialog 2.1.1
PhysicsFS 3.2.0

Getting Started

Windows

  1. Download and install Microsoft Visual Studio.
  2. Download and install CMake Windows 32-bit installer.
  3. Download SFML Visual C++ 14 (2015) 32-bit and extract it to C:\.
  4. Download and extract the PhysicsFS source.
  5. Create a new folder called bin in the same location as the extracted physfs-release-3.2.0 folder.
  6. Open CMake and configure the following settings:
    • Set Where is the source code: to the path of the extracted physfs-release-3.2.0 folder.
    • Set Where to build the binaries: to the path of the bin folder.
  7. Click Generate and select Visual Studio 14 2015 as the generator, then click Finish.
  8. Click Configure and close CMake.
  9. Navigate to bin and open PhysicsFS.sln.
  10. Change Solutions Configurations to Release and change Solutions Platform to Win32.
  11. Right click ALL_BUILD in the Solution Explorer and select Build.
  12. Create the following folders at C:\.
    • C:\PHYSFS-3.2.0\bin
    • C:\PHYSFS-3.2.0\include
    • C:\PHYSFS-3.2.0\lib
  13. Navigate to the bin\release and copy the following files to C:\PHYSFS-3.2.0\bin:
    • physfs.dll
    • test_physfs.exe
  14. Copy the following files to C:\PHYSFS-3.2.0\lib:
    • physfs.exp
    • physfs.lib
    • test_physfs.exp
    • test_physfs.lib
  15. Navigate back to physfs-release-3.2.0 and copy the following to C:\PHYSFS-3.2.0\include:
    • all folders
    • all .h header files
    • all .c source files
  16. Delete the physfs-release-3.2.0 folder.

Linux

  1. Install the required dependencies:
sudo apt-get install cmake
sudo apt-get install libsfml-dev
  1. Download and extract the PhysicsFS source.
  2. Navigate to the extracted physfs-release-3.2.0 folder and create a new folder called bin:
cd physfs-release-3.2.0
mkdir bin
  1. Navigate to bin and generate the Makefiles:
cd bin
cmake ..
  1. Compile and install the PhysicsFS library:
make
sudo make install
  1. Configure the shared library cache for PhysicsFS:
sudo ldconfig
  1. Delete the physfs-release-3.2.0 folder.

Running

Windows

  1. Open Blocks.sln.
  2. Change Solutions Configurations to Release and change Solutions Platform to x86.
  3. Right click Blocks in the Solution Explorer and select Build to build Blocks.exe.
  4. Double click Blocks.exe compiled in the Release folder to start the game.

Linux

  1. Run the make command to compile the game:
cd Blocks
make
  1. Start the game after it has compiled successfully:
./Blocks

Contributing

Please see our Contributing Guide for more details.

Acknowledgements

  • Graphics
    • Ribbon inspired from a Photoshop Ribbon Tutorial
    • Blocks, Grid and Background created exclusively using Photoshop

About

A 2D puzzle game developed in C++ using SFML and PhysicsFS

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages