AmosNimos / PlatE

PlatE is a game engine for creating simple platformer games

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PlatE Game Engine

Project state:


Last update: May 04, 2023

πŸ”§ 🚧🚧🚧 In development 🚧🚧🚧 πŸ‘·

PlatE is a game engine for creating platformer games.

Disclaimer: PlatE was created on Linux (Ubuntu) and is expected to be used on a Linux distro (ideally a Debian based distro), and is not expected to work on other OS by default.

Creating Levels

To create a level for PlatE, create a text file with the level design. The level should be a grid of characters, where each character represents a different object in the game. The following objects are currently supported:

  • "@": Player
  • "#": Solid block
  • "_": Platform (with no bottom collision)
  • ".": Empty
  • "C": Coin
  • "G": Goal
  • "X": Spike

The text file should have a fixed width and height of 20 by 15 characters. You can create a copy of the level_template.lvl file to help you create new levels.

Compiling and Using PlatE

To compile PlatE, run the following command:

gcc PlatE.c -o PlatE -lSDL2

To make sure PlatE can be executed run the following command:

chmod +x ./PlatE

To use PlatE, run the following command:

./PlatE level_name.lvl

In this example level_name.lvl file would be the name of the text file containing the level design.

How it Works

PlatE is written in C and uses the SDL2 graphics library for rendering graphics. The current version of PlatE includes the following features:

  • Level creation from a text file
  • Basic collision detection and gravity
  • Player movement and jumping
  • Objects with customizable color and solidness
  • A maximum of 300 objects allowed in the game
  • A game over and win game function

PlatE is still under development, and additional features are planned for future versions:

  • Viewport
  • Sound
  • Adaptive level size based on the .lvl file
  • Multiple levels
  • Main menu
  • Level editor
  • Moving enemies
  • Moving platforms
  • Power-ups
  • GUI with score

About

PlatE is a game engine for creating simple platformer games

License:MIT License


Languages

Language:C 99.4%Language:Shell 0.6%