My favorites | Sign in
Project Logo
                
Search
for
Updated Nov 16, 2009 by brackeen
Manual  
PulpCore user manual (work in progress - not much here).

Introduction

PulpCore is an easy-to-use API designed to create modern-looking 2D web games with a strong focus on a positive user experience.

PulpCore Setup

First, download the distribution archive: http://code.google.com/p/pulpcore/downloads/list

All PulpCore examples have an Ant build file with "build" and "run" targets. You can copy these build files from the "templates" folder in the distribution archive.

You can either use Ant from the command line, or setup PulpCore in NetBeans, Eclipse, or jEdit.

Core Concepts

  • Stage - The Stage is where an app is displayed. There is only one Stage per app.
  • Scene - The Stage handles updating and drawing a Scene. An app can have many Scenes, but only one Scene can be active at a time. Typically scenes for a game might include Title, Menu, Options, and Game. PulpCore provides the Scene2D class that manages sprites and layers, and renders using dirty rectangles for efficiency.
  • Sprite - A Scene2D typically contains many sprites, from a static background to an animated character. The base Sprite class is abstract. Common sprites for games are ImageSprite and FilledSprite. PulpCore also includes a few widget sprites, Button, Label, and TextField. Sprites are rendered in the order that they were added to the Scene2D.
  • Property - Each sprite has several properties, including: x, y, width, height, angle, and alpha. Each property is either an Int property or an Fixed property (similar to a float) that can be animated over time. The Timeline class is provided to group together several property animations.
  • Layer - The Scene2D class can manage multiple sprite layers, AKA the Group class. Typical layers might be the background, the game elements, and the heads-up display.

Sign in to add a comment
Hosted by Google Code