Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

cleanup

  • Loading branch information...
commit cd2b77ec7dd8a8063edbdc12edc16f9630969433 1 parent 53acf3e
@Pomax authored
Showing with 16 additions and 58 deletions.
  1. +16 −5 README
  2. +0 −53 tools/monitor/monitor.pde
View
21 README
@@ -1,5 +1,16 @@
-Repository for work-in-progress code for a Processing.js-based 2D
-gaming library. This library offers scaffolding with which to build
-your own 2D games, with enough complexity to make a mario or zelda
-clone, but with enough generic properties to allow you to quickly
-implement a basic working game.
+A Processing library for use in 2D game making,
+fully compatible with online deployedment via
+the Processing.js library.
+
+Documentation pending
+
+tests are in the ./tests/ directory
+
+This is a work in progress pending initial release.
+Due to the lack of license, any license that ends up
+being put on this will apply retroactively. That
+means you can play with it, as long as you realise
+that deployment before this becomes a public release
+is probably not the best of ideas.
+
+- Mike "Pomax" Kamermans
View
53 tools/monitor/monitor.pde
@@ -1,53 +0,0 @@
-/**
- * Framerate monitor for the game library.
- * This sketch can be included on a page that
- * is running a Pjs game, and linked to it
- * via javascript for framerate and actor
- * count monitoring.
- */
-
-final int xoff = 25;
-int bin = 0;
-int[] values = new int[100];
-
-int actors = 0;
-
-void addPoint(int v) {
- values[bin] = v;
- bin = (bin+1)%100;
- redraw();
-}
-
-void addActor() { actors++; }
-void setActorCount(int v) { actors += v; }
-void removeActor() { actors--; }
-void resetActorCount() { actors = 0; }
-
-void setup() {
- size(xoff+100,110);
- textFont(createFont("Arial",8));
-}
-
-void draw() {
- background(255);
- fill(0);
- stroke(127);
- textAlign(RIGHT);
- for(int i=0; i<100; i+=10) {
- line(xoff,i,xoff+100,i);
- text(""+i, xoff-10, 100 - i);
- }
- text("frame rate: "+(values[(bin-1)%100]|0), xoff+100, 109);
- textAlign(LEFT);
- text("Live actors: "+actors, 5, 109);
- noFill();
- stroke(0);
- rect(0,0,xoff+100,100);
- stroke(200,0,0);
- line(xoff,0,xoff,100);
- for(int b=0; b<100; b++) {
- point(xoff+b, 100-values[b]);
- }
- stroke(0,0,200);
- line(xoff+bin,0,xoff+bin,100);
-}
Please sign in to comment.
Something went wrong with that request. Please try again.