Speed updates

pull/383/head
Gordon Williams 2020-05-05 13:42:27 +01:00
parent 7d8d1a8f6f
commit 3b14b2d5ba
7 changed files with 16 additions and 10 deletions

View File

@ -206,7 +206,7 @@
{ "id": "trex",
"name": "T-Rex",
"icon": "trex.png",
"version":"0.01",
"version":"0.02",
"description": "T-Rex game in the style of Chrome's offline game",
"tags": "game",
"allow_emulator":true,
@ -218,7 +218,7 @@
{ "id": "astroid",
"name": "Asteroids!",
"icon": "asteroids.png",
"version":"0.01",
"version":"0.02",
"description": "Retro asteroids game",
"tags": "game",
"allow_emulator":true,
@ -780,7 +780,7 @@
{ "id": "flappy",
"name": "Flappy Bird",
"icon": "app.png",
"version":"0.03",
"version":"0.04",
"description": "A Flappy Bird game clone",
"tags": "game",
"allow_emulator":true,

1
apps/astroid/ChangeLog Normal file
View File

@ -0,0 +1 @@
0.02: Add "ram" keyword to allow 2v06 Espruino builds to cache function that needs to be fast

View File

@ -59,6 +59,7 @@ function gameStart() {
function onFrame() {
"ram"
var t = getTime();
var d = (lastFrame===undefined)?0:(t-lastFrame)*20;
lastFrame = t;

View File

@ -1,2 +1,3 @@
0.02: Tweaks to make flappy bird run with less RAM available
0.03: A few tweaks to improve rendering speed
0.04: Add "ram" keyword to allow 2v06 Espruino builds to cache function that needs to be fast

View File

@ -32,6 +32,7 @@ function gameStop() {
}
function draw() {
"ram"
var H = g.getHeight()-24;
g.setColor("#71c6cf");
g.fillRect(0,0,g.getWidth(),H-1);

1
apps/trex/ChangeLog Normal file
View File

@ -0,0 +1 @@
0.02: Add "ram" keyword to allow 2v06 Espruino builds to cache function that needs to be fast

View File

@ -165,6 +165,7 @@ function gameStop() {
}
function onFrame() {
"ram"
g.clear();
if (rex.alive) {
frame++;