Skip to content

Sonic game made using Object Pascal programming language

License

Notifications You must be signed in to change notification settings

GalaxyShad/Pascal-Sonic

Repository files navigation

Pascal-Sonic


Sonic game made using Object Pascal programming language and RayLib.

How to run?

You can download a pre-built version of the game from the Releases Section. Alternatively, you can build it yourself by following the instructions below.

How to build?

Lazarus IDE

  1. Clone this repository:
    git clone https://github.com/GalaxyShad/Pascal-Sonic.git
    
  2. Download the runtime libraries from RayLib and place them in the root directory of the project.
  3. Install Lazarus IDE.
  4. Open the project in Lazarus IDE and build it.

FPC

  1. Make sure that you have FPC installed
  2. Clone this repository:
git clone --recurse-submodules -j8 https://github.com/GalaxyShad/Pascal-Sonic.git && cd Pascal-Sonic
  1. Compile:
fpc -MOBJFPC game.lpr -Fu"ray4laz/source"
  1. (if you on Windows) copy dlls from ray4laz/libs for your platform

Dependencies

Features

  • 360-degree movement
  • Image-based collisions (a pixel with alpha == 0x00 is considered empty)
  • High-speed movement
  • Jumping
  • Sound effects
  • Spindash

Controls

  • Arrow keys - movement
  • Z key - jump/charge spindash
  • D key - enable/disable drawing of collision masks

How to create your own levels

You can create your own levels by editing the textures/big-lvl.png file. Remember, a pixel is considered collideable if its alpha value is 0.

Why not use a higher-level programming language?

Cuz challenge 😎

License

Sonic The Hedgehog is a trademark of SEGA. Please do not use any images containing Sonic for commercial purposes. The source code is released under the MIT license.