Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/c-d-lewis/pge
Simple looping game engine for Pebble
https://github.com/c-d-lewis/pge
Last synced: 2 days ago
JSON representation
Simple looping game engine for Pebble
- Host: GitHub
- URL: https://github.com/c-d-lewis/pge
- Owner: C-D-Lewis
- License: mit
- Created: 2014-10-25T01:09:12.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2016-06-15T23:34:48.000Z (over 8 years ago)
- Last Synced: 2024-10-13T19:00:04.853Z (about 1 month ago)
- Language: C
- Size: 1.03 MB
- Stars: 20
- Watchers: 5
- Forks: 11
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pge
Simple looping game engine for Pebble. Available on
[NPM](https://www.npmjs.com/package/pebble-pge).## Installation
`pebble package install pebble-pge`
## Features
- Automatic looping of developer-supplied per-frame logic and rendering.
- Up to 30 frames per second.
- Implement only your game code - `AppTimer`, `LayerUpdateProc`, `Clicks`,
`Window` and `main` abstracted away.
- `PGESprite` base object to implement game entities.
- Basic collision checking between `PGESprite`s, GRects, lines and points.
- Isometric rendering of rects, boxes and textures.
- Basic game title screen template.
- Simple highscore mechanism.
- WebSocket-based client-server abstraction.## Basic Template App
To begin a new game watchapp, begin with the template file in `/docs/template.c.sample`:
```
/**
* This is the bare minimum to make a looping game with PGE!
*/#include
#include
static void game_logic() {
// Per-frame game logic here
}static void game_draw(GContext *ctx) {
// Per-frame game rendering here
}static void game_click(int button_id, bool long_click) {
// Process click events
}void pge_init() {
// Start the game
pge_begin(game_logic, game_draw, game_click);
}void pge_deinit() {
// Finish the game
pge_finish();
}
```## Documentation
[PGE](docs/pge.md) - Main engine documentation.
[PGE Sprite](docs/pge_sprite.md) - Sprite class documentation.
[PGE Title](docs/pge_title.md) - Template title screen documentation.
[PGE Grid](docs/pge_grid.md) - Convenience for grid-based games.
[PGE Splash](docs/pge_splash.md) - Engine splash screen animation documentation.
[PGE Isometric](docs/pge_isometric.md) - Isometric rendering of rects, boxes and textures.
[PGE WS](docs/pge_ws.md) - WebSocket-based client-server abstraction.