Skip to content

C-D-Lewis/pge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pge

Simple looping game engine for Pebble. Available on NPM.

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 PGESprites, 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 <pebble.h>

#include <pge/pge.h>

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 - Main engine documentation.

PGE Sprite - Sprite class documentation.

PGE Title - Template title screen documentation.

PGE Grid - Convenience for grid-based games.

PGE Splash - Engine splash screen animation documentation.

PGE Isometric - Isometric rendering of rects, boxes and textures.

PGE WS - WebSocket-based client-server abstraction.

About

Simple looping game engine for Pebble

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •