summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAmir Rajan <[email protected]>2021-08-07 00:11:35 -0500
committerAmir Rajan <[email protected]>2021-08-07 00:11:35 -0500
commitbea150381f495630f92f89d23d5f3445ec289b2d (patch)
treefab101117bf7df04682901193c2cde782a5f5470
parentba91acb8835e1c85a06e9b4c8cc82db1d12edbb0 (diff)
downloaddragonruby-game-toolkit-contrib-bea150381f495630f92f89d23d5f3445ec289b2d.tar.gz
dragonruby-game-toolkit-contrib-bea150381f495630f92f89d23d5f3445ec289b2d.zip
Deploy template folder synced.
-rw-r--r--deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js313
-rw-r--r--deploy_template/.dragonruby/stubs/html5/stub/index.html4
-rw-r--r--deploy_template/CHANGELOG.txt2277
-rw-r--r--deploy_template/CHEATSHEET.txt232
-rw-r--r--deploy_template/README-raspberrypi.txt33
-rw-r--r--deploy_template/README.txt369
-rw-r--r--deploy_template/mygame/app/main.rb7
-rw-r--r--deploy_template/mygame/data/.gitkeep1
-rw-r--r--deploy_template/mygame/documentation/01-high-level.md31
-rw-r--r--deploy_template/mygame/documentation/02-labels.md132
-rw-r--r--deploy_template/mygame/documentation/03-solids-and-borders.md126
-rw-r--r--deploy_template/mygame/documentation/04-lines.md108
-rw-r--r--deploy_template/mygame/documentation/05-sprites.md239
-rw-r--r--deploy_template/mygame/documentation/06-keyboard.md150
-rw-r--r--deploy_template/mygame/documentation/07-mouse.md48
-rw-r--r--deploy_template/mygame/documentation/08-controllers.md86
-rw-r--r--deploy_template/mygame/documentation/99-todo.md89
-rw-r--r--deploy_template/mygame/fonts/.gitkeep1
-rw-r--r--deploy_template/mygame/metadata/game_metadata.txt1
-rw-r--r--deploy_template/mygame/metadata/ios_metadata.txt9
-rw-r--r--deploy_template/mygame/sounds/.gitkeep1
-rw-r--r--deploy_template/mygame/sprites/border-black.pngbin908 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-black.pngbin1882 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-blue.pngbin2901 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-gray.pngbin3006 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-green.pngbin2887 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-indigo.pngbin2433 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-orange.pngbin2670 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-red.pngbin2233 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-violet.pngbin2439 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-white.pngbin1754 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle-yellow.pngbin2456 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/black.pngbin0 -> 2511 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/blue.pngbin0 -> 4096 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/gray.pngbin0 -> 3719 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/green.pngbin0 -> 4105 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/indigo.pngbin0 -> 4430 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/orange.pngbin0 -> 4093 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/red.pngbin0 -> 4133 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/violet.pngbin0 -> 4383 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/white.pngbin0 -> 3463 bytes
-rw-r--r--deploy_template/mygame/sprites/circle/yellow.pngbin0 -> 3408 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-black.pngbin2602 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-blue.pngbin4842 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-gray.pngbin5184 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-green.pngbin4695 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-indigo.pngbin4918 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-orange.pngbin4825 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-red.pngbin3753 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-violet.pngbin5069 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-white.pngbin5326 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon-yellow.pngbin5249 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/black.pngbin0 -> 2202 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/blue.pngbin0 -> 2060 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/gray.pngbin0 -> 2011 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/green.pngbin0 -> 2064 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/indigo.pngbin0 -> 2169 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/orange.pngbin0 -> 2045 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/red.pngbin0 -> 2017 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/violet.pngbin0 -> 2166 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/white.pngbin0 -> 1627 bytes
-rw-r--r--deploy_template/mygame/sprites/hexagon/yellow.pngbin0 -> 1656 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-black.pngbin264 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-blue.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-gray.pngbin493 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-green.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-indigo.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-orange.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-red.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-violet.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-white.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric-yellow.pngbin361 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/black.pngbin0 -> 2444 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/blue.pngbin0 -> 2771 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/gray.pngbin0 -> 2475 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/green.pngbin0 -> 2785 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/indigo.pngbin0 -> 2844 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/orange.pngbin0 -> 2444 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/red.pngbin0 -> 2469 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/violet.pngbin0 -> 2852 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/white.pngbin0 -> 2033 bytes
-rw-r--r--deploy_template/mygame/sprites/isometric/yellow.pngbin0 -> 1449 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/dragon-0.png (renamed from deploy_template/mygame/sprites/dragon-0.png)bin12896 -> 12896 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/dragon-1.png (renamed from deploy_template/mygame/sprites/dragon-1.png)bin2964 -> 2964 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/dragon-2.png (renamed from deploy_template/mygame/sprites/dragon-2.png)bin3047 -> 3047 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/dragon-3.png (renamed from deploy_template/mygame/sprites/dragon-3.png)bin2655 -> 2655 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/dragon-4.png (renamed from deploy_template/mygame/sprites/dragon-4.png)bin2725 -> 2725 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/dragon-5.png (renamed from deploy_template/mygame/sprites/dragon-5.png)bin2655 -> 2655 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-0.png (renamed from deploy_template/mygame/sprites/explosion-0.png)bin267 -> 267 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-1.png (renamed from deploy_template/mygame/sprites/explosion-1.png)bin4585 -> 4585 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-2.png (renamed from deploy_template/mygame/sprites/explosion-2.png)bin4675 -> 4675 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-3.png (renamed from deploy_template/mygame/sprites/explosion-3.png)bin4724 -> 4724 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-4.png (renamed from deploy_template/mygame/sprites/explosion-4.png)bin4773 -> 4773 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-5.png (renamed from deploy_template/mygame/sprites/explosion-5.png)bin4742 -> 4742 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-6.png (renamed from deploy_template/mygame/sprites/explosion-6.png)bin4665 -> 4665 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/explosion-sheet.png (renamed from deploy_template/mygame/sprites/explosion-sheet.png)bin2584 -> 2584 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/lowrez-ship-blue.pngbin0 -> 109 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/lowrez-ship-red.pngbin0 -> 104 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/simple-mood-16x16.pngbin0 -> 14424 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/star.png (renamed from deploy_template/mygame/sprites/star.png)bin711 -> 711 bytes
-rw-r--r--deploy_template/mygame/sprites/misc/tiny-star.pngbin0 -> 112 bytes
-rw-r--r--deploy_template/mygame/sprites/square-black.pngbin250 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-blue.pngbin283 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-gray.pngbin251 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-green.pngbin283 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-indigo.pngbin283 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-orange.pngbin282 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-red.pngbin274 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-violet.pngbin284 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-white.pngbin279 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square-yellow.pngbin286 -> 0 bytes
-rw-r--r--deploy_template/mygame/sprites/square/black.pngbin0 -> 326 bytes
-rw-r--r--deploy_template/mygame/sprites/square/blue.pngbin0 -> 329 bytes
-rw-r--r--deploy_template/mygame/sprites/square/gray.pngbin0 -> 325 bytes
-rw-r--r--deploy_template/mygame/sprites/square/green.pngbin0 -> 329 bytes
-rw-r--r--deploy_template/mygame/sprites/square/indigo.pngbin0 -> 335 bytes
-rw-r--r--deploy_template/mygame/sprites/square/orange.pngbin0 -> 335 bytes
-rw-r--r--deploy_template/mygame/sprites/square/red.pngbin0 -> 335 bytes
-rw-r--r--deploy_template/mygame/sprites/square/violet.pngbin0 -> 334 bytes
-rw-r--r--deploy_template/mygame/sprites/square/white.pngbin0 -> 325 bytes
-rw-r--r--deploy_template/mygame/sprites/square/yellow.pngbin0 -> 319 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0000.pngbin0 -> 93 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0001.pngbin0 -> 99 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0010.pngbin0 -> 98 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0011.pngbin0 -> 101 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0100.pngbin0 -> 98 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0101.pngbin0 -> 100 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0110.pngbin0 -> 100 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-0111.pngbin0 -> 102 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1000.pngbin0 -> 99 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1001.pngbin0 -> 101 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1010.pngbin0 -> 100 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1011.pngbin0 -> 101 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1100.pngbin0 -> 101 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1101.pngbin0 -> 102 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1110.pngbin0 -> 101 bytes
-rw-r--r--deploy_template/mygame/sprites/tile/wall-1111.pngbin0 -> 102 bytes
137 files changed, 1535 insertions, 2722 deletions
diff --git a/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js b/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js
index c321422..bb4ef56 100644
--- a/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js
+++ b/deploy_template/.dragonruby/stubs/html5/dragonruby-html5-loader.js
@@ -25,7 +25,7 @@ function syncDataFiles(dbname, baseurl)
total_to_download: 0,
total_downloaded: 0,
total_files: 0,
- pending_files: 0
+ pending_files: []
};
var log = function(str) { console.log("CACHEAPPDATA: " + str); }
@@ -98,15 +98,16 @@ function syncDataFiles(dbname, baseurl)
failed("Couldn't open local database: " + event.target.error.message);
};
+ // !!! FIXME: there _has_ to be a better way to do this, right?
+ var hash_count = function(h) {
+ var k = Object.keys(h);
+ return (k === undefined) ? 0 : k.length;
+ }
+
var finished_file = function(fname) {
debug("Finished writing '" + fname + "' to the database!");
- state.pending_files--;
- if (state.pending_files < 0) {
- state.pending_files = 0;
- debug("Uhoh, pending_files went negative?!");
- }
- if (state.pending_files == 0) {
- succeeded();
+ if ((hash_count(state.xhrs) == 0) && (state.pending_files.length == 0)) {
+ succeeded(); // nothing downloading, nothing new to download, and everything is written to disk. Success!
}
};
@@ -138,10 +139,63 @@ function syncDataFiles(dbname, baseurl)
};
};
+ var download_another_file = function() {
+ if (state.pending_files.length == 0) {
+ return false; // nothing to do.
+ }
+
+ var remotefname = state.pending_files.pop();
+ var remoteitem = state.remote_manifest[remotefname];
+ var xhr = new XMLHttpRequest();
+ state.xhrs[remotefname] = xhr;
+ xhr.previously_loaded = 0;
+ xhr.filename = remotefname;
+ xhr.filesize = remoteitem.filesize;
+ xhr.filetime = remoteitem.filetime;
+ xhr.expected_filesize = remoteitem.filesize;
+ xhr.responseType = "arraybuffer";
+ xhr.addEventListener("error", function(e) { failed("Download error on '" + e.target.filename + "'!"); });
+ xhr.addEventListener("timeout", function(e) { failed("Download timeout on '" + e.target.filename + "'!"); });
+ xhr.addEventListener("abort", function(e) { failed("Download abort on '" + e.target.filename + "'!"); });
+
+ xhr.addEventListener('progress', function(e) {
+ if (state.reported_result) { return; }
+ var xhr = e.target;
+ var additional = e.loaded - xhr.previously_loaded;
+ state.total_downloaded += additional;
+ xhr.previously_loaded = e.loaded;
+ debug("Downloaded " + additional + " more bytes for file '" + xhr.filename + "'");
+ var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0;
+ progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)");
+ });
+
+ xhr.addEventListener("load", function(e) {
+ if (state.reported_result) { return; }
+ var xhr = e.target;
+ if (xhr.status != 200) {
+ failed("Server reported failure downloading '" + xhr.filename + "'!");
+ } else {
+ debug("Finished download of '" + xhr.filename + "'!");
+ state.total_downloaded -= xhr.previously_loaded;
+ state.total_downloaded += xhr.expected_filesize;
+ xhr.previously_loaded = xhr.expected_filesize;
+ delete state.xhrs[xhr.filename];
+ var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0;
+ progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)");
+ download_another_file(); // kick off another download now that this one is done.
+ store_file(xhr);
+ }
+ });
+
+ debug("Starting download of '" + xhr.filename + "'...");
+ xhr.open("get", baseurl + remotefname + urlrandomizerarg, true);
+ xhr.send();
+ return true;
+ }
+
var download_new_files = function() {
if (state.reported_result) { return; }
progress("Downloading new files...");
- var downloadme = [];
for (var i in state.remote_manifest) {
var remoteitem = state.remote_manifest[i];
var remotefname = i;
@@ -149,65 +203,25 @@ function syncDataFiles(dbname, baseurl)
debug("remote filename '" + remotefname + "' already downloaded.");
} else {
debug("remote filename '" + remotefname + "' needs downloading.");
- // the browser will let a handful of these go in parallel, and
- // then will queue the rest, firing events as appropriate
- // when it gets around to them, so just fire them all off
- // here.
-
// !!! FIXME: use the Fetch API, plus streaming, as an option.
// !!! FIXME: It can use less memory, since it doesn't need
// !!! FIXME: to keep the whole file in memory.
state.total_to_download += remoteitem.filesize;
state.total_files++;
- state.pending_files++;
-
- var xhr = new XMLHttpRequest();
- state.xhrs[remotefname] = xhr;
- xhr.previously_loaded = 0;
- xhr.filename = remotefname;
- xhr.filesize = state.remote_manifest[i].filesize;
- xhr.filetime = state.remote_manifest[i].filetime;
- xhr.expected_filesize = remoteitem.filesize;
- xhr.responseType = "arraybuffer";
- xhr.addEventListener("error", function(e) { failed("Download error on '" + e.target.filename + "'!"); });
- xhr.addEventListener("timeout", function(e) { failed("Download timeout on '" + e.target.filename + "'!"); });
- xhr.addEventListener("abort", function(e) { failed("Download abort on '" + e.target.filename + "'!"); });
-
- xhr.addEventListener('progress', function(e) {
- if (state.reported_result) { return; }
- var xhr = e.target;
- var additional = e.loaded - xhr.previously_loaded;
- state.total_downloaded += additional;
- xhr.previously_loaded = e.loaded;
- debug("Downloaded " + additional + " more bytes for file '" + xhr.filename + "'");
- var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0;
- progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)");
- });
-
- xhr.addEventListener("load", function(e) {
- if (state.reported_result) { return; }
- var xhr = e.target;
- if (xhr.status != 200) {
- failed("Server reported failure downloading '" + xhr.filename + "'!");
- } else {
- debug("Finished download of '" + xhr.filename + "'!");
- state.total_downloaded -= xhr.previously_loaded;
- state.total_downloaded += xhr.expected_filesize;
- xhr.previously_loaded = xhr.expected_filesize;
- delete state.xhrs[xhr.filename];
- var percent = state.total_to_download ? Math.floor((state.total_downloaded / state.total_to_download) * 100.0) : 0;
- progress("Downloaded " + percent + "% (" + Math.ceil(state.total_downloaded / 1048576) + "/" + Math.ceil(state.total_to_download / 1048576) + " megabytes)");
- store_file(xhr);
- }
- });
-
- xhr.open("get", baseurl + remotefname + urlrandomizerarg, true);
- xhr.send();
+ state.pending_files.push(remotefname)
}
}
- if (state.pending_files == 0) {
+ if (state.pending_files.length == 0) {
succeeded(); // we're already done. :)
+ return;
+ }
+
+ var max_concurrent_downloads = 4;
+ while (download_another_file()) {
+ if (hash_count(state.xhrs) >= max_concurrent_downloads) {
+ break; // we'll start another as each download completes.
+ }
}
};
@@ -340,30 +354,52 @@ function syncDataFiles(dbname, baseurl)
return retval;
}
+var prepareFilesystem = function()
+{
+ // Download the game data and set up the filesystem!
+ // set up a persistent store for save games, etc.
+ FS.mkdir('/persistent');
+ FS.mount(IDBFS, {}, '/persistent');
+ FS.syncfs(true, function(err) {
+ if (err) {
+ console.log("WARNING: Failed to populate persistent store. Save games likely lost?");
+ } else {
+ console.log("Read in from persistent store.");
+ }
+
+ loadDataFiles(GDragonRubyGameId, 'gamedata/', function() {
+ console.log("Game data is sync'd to MEMFS. Starting click-to-play()...");
+ //Module.setStatus("Ready!");
+ //setTimeout(function() { Module.setStatus(""); statusElement.style.display='none'; }, 1000);
+ Module.setStatus("");
+ statusElement.style.display='none';
+ Module.startClickToPlay();
+ });
+ });
+}
+
+
var statusElement = document.getElementById('status');
var progressElement = document.getElementById('progress');
var canvasElement = document.getElementById('canvas');
-canvasElement.style.width = '1280px';
-canvasElement.style.height = '720px';
-canvasElement.style.display = 'block';
-canvasElement.style['margin-left'] = 'auto';
-canvasElement.style['margin-right'] = 'auto';
+canvasElement.style.width = '100%';
+canvasElement.style.height = '100%';
+document.getElementById('borderdiv').style.border = '0px';
-statusElement.style.display = 'none';
-progressElement.style.display = 'none';
-document.getElementById('progressdiv').style.display = 'none';
+//statusElement.style.display = 'none';
+//progressElement.style.display = 'none';
+//document.getElementById('progressdiv').style.display = 'none';
document.getElementById('output').style.display = 'none';
-document.getElementById('game-input').style.display = "none"
-if (!window.parent.window.gtk) {
- window.parent.window.gtk = {};
-}
+// if (!window.parent.window.gtk) {
+// window.parent.window.gtk = {};
+// }
-window.parent.window.gtk.saveMain = function(text) {
- FS.writeFile('app/main.rb', text);
- window.gtk.play();
-}
+// window.parent.window.gtk.saveMain = function(text) {
+// FS.writeFile('app/main.rb', text);
+// window.gtk.play();
+// }
var loadDataFiles = function(dbname, baseurl, onsuccess) {
@@ -481,8 +517,14 @@ var base64Encode = function(ui8array) {
return out;
}
+function startGame()
+{
+ Module["removeRunDependency"]("dragonruby_init");
+}
+
+
var Module = {
- noInitialRun: true,
+ noInitialRun: false,
preInit: [],
clickedToPlay: false,
clickToPlayListener: function() {
@@ -493,10 +535,11 @@ var Module = {
div.removeEventListener('click', Module.clickToPlayListener);
document.body.removeChild(div);
}
- if (window.parent.window.gtk.starting) {
- window.parent.window.gtk.starting();
- }
- Module["callMain"](); // go go go!
+ // if (window.parent.window.gtk.starting) {
+ // window.parent.window.gtk.starting();
+ // }
+
+ startGame(); // go go go!
},
startClickToPlay: function() {
var base64 = base64Encode(FS.readFile(GDragonRubyIcon, {}));
@@ -504,27 +547,38 @@ var Module = {
var leftPx = ((window.innerWidth - 640) / 2);
var leftPerc = Math.floor((leftPx / window.innerWidth) * 100);
div.id = 'clicktoplaydiv';
+ div.style.width = '50%';
+ div.style.height = '50%';
div.style.backgroundColor = 'rgb(40, 44, 52)';
- div.style.left = leftPerc.toString() + "%";
- div.style.top = '10%';
- div.style.display = 'block';
div.style.position = 'absolute';
- div.style.width = "640px"
- div.style.height = "360px"
-
-
+ div.style.top = '50%';
+ div.style.left = '50%';
+ div.style.transform = 'translate(-50%, -50%)';
var img = new Image();
img.onload = function() { // once we know its size, scale it, keeping aspect ratio.
- var zoomRatio = 100.0 / this.width;
- img.style.width = (zoomRatio * this.width.toString()) + "px";
- img.style.height = (zoomRatio * this.height.toString()) + "px";
- img.style.display = "block";
- img.style['margin-left'] = 'auto';
- img.style['margin-right'] = 'auto';
+ var pct = 30;
+ var w = img.naturalWidth;
+ var h = img.naturalHeight;
+ if (!w || !h || (w == h)) {
+ img.style.width = '' + pct + '%';
+ img.style.height = '' + pct + '%';
+ } else if (w > h) {
+ img.style.width = '' + pct + '%';
+ } else {
+ img.style.height = '' + pct + '%';
+ }
+ img.style.display = 'block';
}
img.style.display = 'none';
+ img.style.width = 'auto';
+ img.style.height = 'auto';
+ img.style.margin = 0;
+ img.style.position = 'absolute';
+ img.style.top = '50%';
+ img.style.left = '50%';
+ img.style.transform = 'translate(-50%, -50%)';
img.src = 'data:image/png;base64,' + base64;
div.appendChild(img);
@@ -536,17 +590,21 @@ var Module = {
p.style.textAlign = 'center';
p.style.color = '#FFFFFF';
p.style.width = '100%';
+ p.style.position = 'absolute';
+ p.style.top = '10%';
p.style['font-family'] = "monospace";
div.appendChild(p);
-
+
p = document.createElement('p');
- p.innerHTML = 'Click here to begin.';
+ p.innerHTML = 'Click or tap here to begin.';
p.style['font-family'] = "monospace";
p.style['font-size'] = "20px";
p.style.textAlign = 'center';
p.style.backgroundColor = 'rgb(40, 44, 52)';
p.style.color = '#FFFFFF';
p.style.width = '100%';
+ p.style.position = 'absolute';
+ p.style.top = '75%';
div.appendChild(p);
document.body.appendChild(div);
@@ -554,25 +612,10 @@ var Module = {
window.gtk.play = Module.clickToPlayListener;
},
preRun: function() {
- // set up a persistent store for save games, etc.
- FS.mkdir('/persistent');
- FS.mount(IDBFS, {}, '/persistent');
- FS.syncfs(true, function(err) {
- if (err) {
- console.log("WARNING: Failed to populate persistent store. Save games likely lost?");
- } else {
- console.log("Read in from persistent store.");
- }
-
- loadDataFiles(GDragonRubyGameId, 'gamedata/', function() {
- console.log("Game data is sync'd to MEMFS. Starting click-to-play()...");
- //Module.setStatus("Ready!");
- //setTimeout(function() { Module.setStatus(""); statusElement.style.display='none'; }, 1000);
- Module.setStatus("");
- statusElement.style.display='none';
- Module.startClickToPlay();
- });
- });
+ // this prevents the game from running. We'll remove the dependency when
+ // we have downloaded everything and the user has clicked-through to play.
+ Module["addRunDependency"]("dragonruby_init");
+ prepareFilesystem(); // will get data, async.
},
postRun: [],
print: (function() {
@@ -610,10 +653,6 @@ var Module = {
canvas.addEventListener("click", function() {
document.getElementById('toplevel').click();
document.getElementById('toplevel').focus();
- document.getElementById('game-input').style.display = "inline"
- document.getElementById('game-input').focus();
- document.getElementById('game-input').blur();
- document.getElementById('game-input').style.display = "none"
canvas.focus();
});
@@ -653,36 +692,26 @@ window.onerror = function(event) {
};
};
+// sanity check this before downloading anything heavy.
var hasWebAssembly = false;
if (typeof WebAssembly==="object" && typeof WebAssembly.Memory==="function") {
hasWebAssembly = true;
}
//console.log("Do we have WebAssembly? " + ((hasWebAssembly) ? "YES" : "NO"));
+if (!hasWebAssembly) {
+ Module.setStatus("Your browser doesn't have WebAssembly support. Please upgrade.");
+} else {
+ var buildtype = "wasm";
+ var module = "dragonruby-" + buildtype + ".js";
+ window.gtk = {};
+ window.gtk.module = Module;
-var buildtype = hasWebAssembly ? "wasm" : "asmjs";
-var module = "dragonruby-" + buildtype + ".js";
-window.gtk = {};
-window.gtk.module = Module;
-
-//console.log("Our main module is: " + module);
+ //console.log("Our main module is: " + module);
-var script = document.createElement('script');
-script.src = module;
-if (hasWebAssembly) {
+ var script = document.createElement('script');
+ script.src = module;
script.async = true;
-} else {
- script.async = false; // !!! FIXME: can this be async?
- (function() {
- var memoryInitializer = module + '.mem';
- if (typeof Module['locateFile'] === 'function') {
- memoryInitializer = Module['locateFile'](memoryInitializer);
- } else if (Module['memoryInitializerPrefixURL']) {
- memoryInitializer = Module['memoryInitializerPrefixURL'] + memoryInitializer;
- }
- var meminitXHR = Module['memoryInitializerRequest'] = new XMLHttpRequest();
- meminitXHR.open('GET', memoryInitializer, true);
- meminitXHR.responseType = 'arraybuffer';
- meminitXHR.send(null);
- })();
+ document.body.appendChild(script);
}
-document.body.appendChild(script);
+
+// end of dragonruby-html5-loader.js ...
diff --git a/deploy_template/.dragonruby/stubs/html5/stub/index.html b/deploy_template/.dragonruby/stubs/html5/stub/index.html
index b2bcf9f..b9d48b7 100644
--- a/deploy_template/.dragonruby/stubs/html5/stub/index.html
+++ b/deploy_template/.dragonruby/stubs/html5/stub/index.html
@@ -77,10 +77,8 @@
</head>
<body id='toplevel'>
<div class="emscripten_border" id='borderdiv'>
- <input id="game-input" autocomplete="off" />
- <canvas class="game emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
+ <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" tabindex=-1></canvas>
</div>
- <br/>
<textarea style="display: none;" id="output" rows="8"></textarea>
<div class="emscripten" id="status"></div>
diff --git a/deploy_template/CHANGELOG.txt b/deploy_template/CHANGELOG.txt
index cf22fc9..048bb49 100644
--- a/deploy_template/CHANGELOG.txt
+++ b/deploy_template/CHANGELOG.txt
@@ -1,947 +1,1362 @@
-= 1.14 =
-
- * [Support] Better HTML5 template. Additional JS events added to
- handle loss of keyboard input within an iframe.
- * [Bugfix] `args.outputs.screenshots` regression fixed.
- * [Docs] Added documentation for a few more Numeric methods.
- * [Samples] Brand new advanced sample app: 99_sample_sprite_animation_creator.
- The sample app uses `args.outputs.screenshots` and `render_targets` heavily along with
- in memory queues as a means to consolidate events coming from
- different parts of the app.
-
-
-= 1.13 =
-
- * [API] Sprite angle now accepts fractional degrees.
- * [Samples] Better font added to LOWREZJAM 2020 template.
- * [API] Added `args.outputs[RENDER_TARGET_NAME]` as an alias to
- `args.render_target(RENDER_TARGET_NAME)`. Either of the following will work:
-
- ```ruby
- def tick args
- if args.state.tick_count == 1
- args.render_target(:camera).width = 100
- args.render_target(:camera).height = 100
- args.render_target(:camera).solids << [0, 0, 50, 50, 255, 0, 0]
- end
-
- if args.state.tick_count > 0
- args.outputs.sprites << { x: 0,
- y: 0,
- w: 500,
- h: 500,
- source_x: 0,
- source_y: 0,
- source_w: 50,
- source_h: 50,
- path: :camera }
- end
- end
-
- $gtk.reset
- ```
-
- Is the same as:
-
- ```ruby
- def tick args
- if args.state.tick_count == 1
- args.outputs[:camera].width = 100
- args.outputs[:camera].height = 100
- args.outputs[:camera].solids << [0, 0, 50, 50, 255, 0, 0]
- end
-
- if args.state.tick_count > 0
- args.outputs.sprites << { x: 0,
- y: 0,
- w: 500,
- h: 500,
- source_x: 0,
- source_y: 0,
- source_w: 50,
- source_h: 50,
- path: :camera }
- end
- end
-
- $gtk.reset
- ```
-
-= 1.12 =
-
- * [Samples] LOWREZ Jam sample app reworked in preparation for LOWREZ
- Jam 2020 (starts on August 1st so hurry and join).
- * [Docs] Docs added for GTK::Mouse, you can access them via the
- Console by typing `GTK::Mouse.docs` or `$gtk.args.inputs.mouse.docs`.
- * [MacOS] Updated minimum OS support to include MacOS 10.9+.
-
-= 1.11 =
-
- * [Bugfix] Fixed error in docs_search "TERM".
-
-= 1.10 =
-
- * [Support] Documentation infrastructure added (take a look at docs/docs.html). Bring up the DragonRuby Console and:
-
- To search docs you can type `docs_search "SEARCH TERM"`
-
- If you want to get fancy you can provide a `lambda` to filter documentation:
-
- docs_search { |entry| (entry.include? "Array") && (!entry.include? "Enumerable") }
-
- * [Bugfix] Fixed sprite rendering issues with source_(x|y|w|h) properties on sprites.
- * [Support] Removed double buffering of game if framerate drops below 60 fps.
- * [Support] Console now supports mouse wheel scrolling.
- * [Support] One time notifications have less noise/easier to read.
- * [Bugfix] Rogue ~app/main.rb~ directory will no longer be created if you run a sample app.
-
-= 1.9 =
-
- * [Bugfix] HTTP on windows should now work, for real this time.
- * [Bugfix] Non-720p render targets now use correct coordinate system.
-
-= 1.8 =
-
- * [Experimental] Added the ability to control the logical game size. You can use cli
- arguments to set it. Example ultra-wide support would be:
- `./dragonruby --window_width 3840 --window_height 1080`
- * [Bugfix] HTTP on windows should now work.
- * [Bugfix] `even?` and `odd?` return the correct result for Fixnum.
- * [Bugfix] args.intputs.mouse_wheel now reports the delta change in x and y correctly.
- * [Bugfix] Improved analog joystick accuracy when converting to percentages.
- * [Support] Incorporated pull request from https://github.com/kfischer-okarin that adds
- autocompletion to the Console. This is the PR:
- - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/da0fdcfbd2bd9739fe056eb646920df79a32954c
- - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/99305ca79118fa0704c8681f4019738b8c7a500d
-
-= 1.7 =
-
- * [BREAKING] args.inputs.mouse.wheel.point is gone. Use args.inputs.mouse.x
- and .y if you need cursor position.
- * [BREAKING] args.inputs.mouse.wheel.x and .y now represent the amount the
- mousewheel/trackpad has moved since the last tick and not the mouse cursor
- position. Use args.inputs.mouse.x and .y if you need cursor position.
-
-= 1.6 =
-
- * [API] Sprite now supports source_(x|y|w|h). These properties are consistent with the origin
- being in the bottom left. The existing properties tile_(x|y|w|h) assumes that origin 0, 0 is in the top left.
- The code below will render the same sprite (in their respective coordinate systems):
-
- # using tile_(x|y|w|h) properties
- args.outputs.sprites << { x: 0,
- y: 0,
- w: 1280,
- h: 100,
- path: :block,
- tile_x: 0,
- tile_y: 720 - 100,
- tile_w: 1280,
- tile_h: 100 }
-
- is equivalent to:
-
- # using source_(x|y|w|h) properties
- args.outputs.sprites << { x: 0,
- y: 0,
- w: 1280,
- h: 100,
- path: :block,
- source_x: 0,
- source_y: 0,
- source_w: 1280,
- source_h: 100 }
-
- Note: if you provide both tile_(x|y|w|h) and source_(x|y|w|h). The values of tile_ will "win" so as not to
- break existing code out there.
- * [Bugfix] Updated require to remove duplicate requires of the same file (or files that have recently been required).
- * [Bugfix] Strict entities of different types/names serialize and deserialize correctly.
- * [Samples] Updated render targets sample app to show two render targets with transparencies.
- * [API] No really, render targets now have a transparent background and respect opacity.
-
-= 1.5 =
-
- * [API] Added $gtk.show_cursor and $gtk.hide_cursor to show and hide the mouse cursor. The
- function only needs to be called once. EG: args.gtk.hide_cursor if args.state.tick_count == 0.
- * [Samples] Jam Craft 2020 sample app updated to have more comments and demonstrate a custom
- mouse cursor.
-
-= 1.4 =
-
- * [Bugfix] Adding $gtk.reset at the bottom of main.rb will no longer cause an infinite loop.
- * [Samples] Sample app added for Jam Craft 2020.
-
-= 1.3 =
-
- * [Bugfix] Adding $gtk.reset at the bottom of main.rb will no longer cause an infinite loop.
- * [Samples] Better instructions added to various sample apps.
-
-= 1.2 =
-
- * [Bugfix] Top-level require statements within main.rb will load before
- invoking the rest of the code in main.rb.
- * [Samples] Better keyboard input sample app.
- * [Samples] New sample app that shows how to use Numeric#ease_spline.
- * [Bugfix] Fixed "FFI::Draw cannot be serialized" error message.
-
-= 1.1 =
-
- * [Bugfix] Fixed exception associated with providing serialization related help.
- * [Bugfix] Fixed comments on how to run tests from CLI.
- * [Support] More helpful global variables added. Here's a list:
- - $gtk
- - $console
- - $args
- - $state
- - $tests
- - $record
- - $replay
- * [API] inputs.keyboard.key_(down|held|up).any? and inputs.keyboard.key_(down|held|up).all?
- added.
- * [Support] Recording gameplay and replaying streamlined a bit more. GIVE THE
- REPLAY FEATURE A SHOT! IT'S AWESOME!! Bring up the console and run: $record.start SEED_NUMBER.
- * [Support] Bringing up the console will stop a replay if one is running.
-
-= 1.0 =
-
- * [News] DragonRuby Game Toolkit turns 1.0. Happy birthday!
- * [Bugfix] args.state.new_entity_strict serializes and deserializes correctly now.
- * [BREAKING] Entity#hash has been renamed to Entity#as_hash so as not to redefine
- Object#hash. This is a "private" method so you probably don't have to worry about
- anything breaking on your end.
- * [BREAKING] gtk.save_state and gtk.load_state have been replaced with gtk.serialize_state
- and gtk.deserialize_state (helpful error messages have been added).
- * [Support] Console can now render sprites (this is still in its early stages). Try
- $gtk.console.addsprite(w: 50, h: 50, path: "some_path.png").
- * [API] Render targets now have a transparent background and respect opacity.
- * [API] Render targets can be cached/programatically created once and reused.
- * [Samples] A new render target sample app has been created to show how to cache them.
- * [Samples] Easing sample app reworked/simplified.
- * [Support] GTK will keep a backup of your source file changes under the tmp directory.
- One day this feature will save your ass.
-
-= 20200301 =
-
- * [Samples] Added sample app that shows how you can draw a cubic bezier curves.
- * [Support] Keyup event prints key and raw_key to the console.
- * [Support] Circumflex now opens the console.
-
-= 20200227 =
-
- * [Bugfix] Game will now auto restart in the event of a syntax error.
- * [Samples] Sample app added to show how to use a sprite sheet for sprite animations:
- 09_sprite_animation_using_tile_sheet.
- * [Samples] Sample app added to show how to use a tile sheet for a roguelike:
- 20_roguelike_starting_point_two.
- * [Samples] Example code added to show how sort an array with a custom sort block:
- 00_intermediate_ruby_primer/07_powerful_arrays.txt
- * [OSS] The following files have been open sourced at https://github.com/DragonRuby/dragonruby-game-toolkit-contrib:
- - modified: dragon/args.rb
- - new file: dragon/assert.rb
- - new file: dragon/attr_gtk.rb
- - modified: dragon/console.rb
- - new file: dragon/docs.rb
- - new file: dragon/geometry.rb
- - new file: dragon/help.rb
- - modified: dragon/index.rb
- - modified: dragon/inputs.rb
- - new file: dragon/log.rb
- - new file: dragon/numeric.rb
- - new file: dragon/string.rb
- - new file: dragon/tests.rb
- - new file: dragon/trace.rb
- * [Support] Added isometric placeholder sprites.
- * [Support] Added $gtk.reset_sprite 'path' to refresh a sprite from
- the file system (while the game is running). Future releases will
- automatically auto load sprites but you can use this to reload them
- on demand.
-
-= 20200225 =
-
- * [Bugfix] Fixed macOS compatibility back to Mac OS X 10.9 or so.
-
-= 20200224 =
-
- * [Bugfix] Some of the deprecation notices where throwing an exception. This has been fixed.
- * [API] $gtk.system(cmd) has been added. You'll find this helpful for running cli programs from
- Heads Up Display. It's probably not a good idea to use this in a production game (since you'll
- be responsible for making sure it works on all platforms).
-
-= 20200218 =
-
- * [API] Enhanced screenshotting api that can be used for image manipulation.
- Take a look at the painting sample app.
- Example usage: `args.outputs.screenshots << [0, 0, 100, 100, 'bottom-left-corner.png']`.
- * [BREAKING] Outputs#static_background_color has been renamed to Outputs#background_color.
- * [API] Outputs#debug and Outputs#static_debug layer has been added. You can use this layer
- to draw all your guide lines and helper primitives. When the game is published, this layer
- will not render.
-
-= 20200217 =
-
- * [Bugfix] `dragonruby-publish` would only build html5. It now builds
- all of the platforms again. Ryan has given Amir a warning and has told him
- to be more careful releasing. Amir cackled in defiance.
-
-= 20200213 =
-
- * [API] Added Float#pos? and Float#neg?.
- * [Samples] Sample added to show how to use directional_vector and sprite sheets.
- * [Samples] Updated 01_api_01_labels sample app to show how to render a label
- as an array or hash.
- * [Bugfix] Fixed incorrectly named value for labels in 11_hash_primitives sample app.
-
-= 20200211 =
-
- * [API] Added `args.inputs.directional_vector` and
- `args.inputs.(keyboard|controller_one|controller_two).directional_vector.
- The sample app to demonstrate the use of this feature is pending.
- * [API] Added Numeric#pos? and Numeric#neg?.
- * [Bugfix] Fixed looping issues with ogg files and popping issues with
- playing sounds in general.
- * [Bugfix] `args.gtk.console.toast :message, "some message"` would fail because
- of an invalid method name.
- * [News] Amir (the CEO of DragonRuby LLP) wrote a 2019 year end review. You can
- read it here: http://www.rubymotion.com/news/2020/01/02/year-end-review.html.
- * [News] Expect the frequency of updates of GTK to increase. Ryan let Amir have
- the deployment passwords, so the rate limiter is now gone :3
-
-= 20200202 =
-
- * [API] Hash now supports :scale_rect.
- * [Samples] Added sample app that shows how to create a hexagon based grid.
- * [Support] Initial work on CHEATSHEET.txt.
- * [API] Added args.inputs.keyboard.ctrl_* which will return true if Ctrl is
- combined with another key.
- * [API] Added args.inputs.click (which only returns the point or nil).
- * [API] Added Numeric#even? and Numeric#odd?.
- * [API] Added Geometry#point_inside_circle?(point, circle_point, radius).
-
-= 2020130 =
-
- * [Performance] Rendering api optimizations. Initial tests show that
- DragonRuby Game Toolkit can now render more sprites (and calculate
- more collisions) than Unity 2D. Checkmate.
- * [Support] Fixed documentation for labels (the hash properties are
- called size_enum, and alignment_enum). The documentation can be
- found under mygame/documentation.
- * [Support] Improved help text for exceptions related to ambiguous use
- of primitives.
- * [Bugfix] Requiring multiple ruby files will no long "blip" an
- exception on startup.
-
-= 20191201 =
-
- * [Samples] Added sample game called The Little Probe that demonstrates
- line collision.
- * [Samples] Experiments with squares and cubes in 3D.
- * [Support] HTML5 games now package a favicon.
- * [Samples] [Support] Quite a few of the sample apps have been updated to
- include an api listing at the top (expansion of documentation).
- * [API] Initial work for http has been created. Take a look at the
- http sample app to see how to use it. Take a look at
- `samples/99_zz_gtk_unit_tests` for a test suite that asserts async
- http.
- * [Support] [Samples] Added a sample app that shows how create
- collision detection associated with constraint points against
- a ramp. This sample app also demonstrates the use of `gtk.slowmo!`
- which you can use the slow down the tick execution of your game
- to see things frame by frame (still experimental).
- * [Support] Added sprites to default template folder. The sprites
- are `sprites/square-COLOR.png` and `sprites/circle-COLOR.png` where
- the colors are of the rainbow ROY G. BIV (eg `sprites/square-red.png`).
- * [Sample] Added a sample app that shows how to use the
- `static_sprites` rendering api which is the fastest way to render
- a sprite (but also hangs on the instances by reference as opposed
- to treating the collection as a queue... a trade off between
- immutablility and speed).
- * [API] Added the `attr_sprite` class macro which can be mixed into
- a class so that it quacks like a sprite. The Sprite Limits sample
- app has been updated to use this macro.
- * [Support] In the event of an exception, the class hierarchy for
- the object that threw the exception is provided.
- * [Support] In the event of a :method_missing exception, the
- instance's API is searched for methods that look like the one you
- were trying to call. Those recommendations are printed to the
- console.
- * [Samples] [Support] Significant enhancements have been made to the
- test harness. Take a look at `samples/99_zz_gtk_unit_tests` to see
- some of the test suites that are being fleshed out. These test
- suites are used as regression during builds. More will come.
- * [Samples] Unit tests added for geometry apis.
- * [Samples] Unit tests added for parsing json and xml.
- * [Bugfix] HTML5 builds no longer fail at startup with an audio
- initialization error message.
- * [Bugfix] The $gtk.write_file API change was a mistake. The actual
- bug it was meant to resolve has been fixed. The responsible
- parties have been brutally disciplined.
- * [BREAKING] `gtk_args` class macro has been renamed to
- `attr_gtk`. This is a little easier to remember because it follows
- the same pattern as `attr_accessor`.
- * [BREAKING] `PRIMITIVE.w(idth)_half` and `PRIMITIVE.h(eight)_half`
- have been deprecated. Use `PRIMITIVE.w.half` (Numeric#half).
- * [BREAKING] `PRIMITIVE.angle_given_point` has been deprecated. Use
- `PRIMITIVE.angle_from`.
- * [API] `PRIMITIVE.angle_to` has been added. Take a look at
- `samples/99_zz_gtk_unit_tests` for usages.
- * [BREAKING] `intersects_rect?` with an `s` has been deprecated. Use
- `intersect_rect?` instead.
- NOTE: Ruby's naming convention is to generally *not* include the
- \"s\" for interrogative method names (methods that end with a ?
- [question mark]). It doesn't sound grammatically correct, but that
- has been the rule for a long time (and why intersects_rect? has
- been deprecated).
- * [Samples] Added a white label version of Clepto Frog, a Ludam Dare
- game built by Amir, Karen, and Rye. You can see the final version
- (with all assets) here: https://amirrajan.itch.io/clepto-frog. The
- code is horrible. Who wrote this crap?
- * [Bugfix] Fixed looping issues with `.ogg`. The follow statement
- will now correctly work:
- ```
- def tick args
- if args.state.tick_count == 0
- args.outputs.sounds << 'sounds/sample.ogg'
- end
+* 2.24
+** [Bugfix] Labels within render targets scale correctly when windows are resized.
+** [Bugfix] [Pro] Better error handling in the iOS wizard if app metadata fails to retrieve.
+** [API] Added ~Numeric.mid? n1, n2~ which is similar to ~Numeric.between?~ except the numbers supplied to ~mid~ do not have to be in strictly increasing order.
+** [OSS] Contributions from [[github.com/dragonruby/dragonruby-game-toolkit-contrib]] have been synchronized.
+* 2.23
+** [Bugfix] ~Hash#include?~ had invalid logic which has now been removed and should operate to core spec.
+** [Bugfix] ~Hash#anchor_rect~ respects the anchor parameter passed to it as opposed to anchoring to 0.5, 0.5 only.
+** [Bugfix] ~args.gtk.reset~ now clears ~args.audio~.
+** [Bugfix] ~Numeric#(+|-|/|*) returns ~self~ instead of ~nil~ if arithmetic operation is performed against it.
+** [Bugfix] ~Numeric#(+|-|/|*) can now be used with ~Array#inject~.
+NOTE: A special thank you to leviondiscord@discord for persistence in talking about this issue and
+taking the time to try to understand nil punning and the underlying reasoning for the original behavior (which proved
+to be a unnecessarily inconsistency in the case of arithmetic).
+** [Bugfix] ~args.layout.debug_primitives~ are now cached. The grid overlay will render more quickly.
+** [Bugfix] Inner exceptions from ~GTK::Geometry~ class methods are now retained and reported within the error message.
+** [Bugfix] ~args.grid~ responds to ~x~, ~y~ which allows it to be used with geometric functions.
+You can use ~args.grid~ or continue to use ~args.grid.rect~.
+** [Bugfix] Font glyph cache is invalided if the Window size changes.
+** [API] ~args.audio~ now supports the ability to seek the audio to a specific location.
+Set ~args.audio[:some_audio][:playtime]~ to seconds (float) representing the point in time you
+want the audio to seek to.
+Take a look at the audio_mixer sample app for full api usage.
+** [Samples] Audio Mixer sample app got a solid facelift. =./samples/07_advanced_audio/01_audio_mixer/app/main.rb=
+** [Samples] Performance based sample apps are better labeled and contain documentation/fixes for new override methods.
+** [Support] The sprites under ~mygame/sprites/(square|circle|isometric|hexagon)~ have been redone (a lot nicer looking).
+** [Support] ~args.outputs.lines~ can now accept rectangular primitives ~(x|y|w|h)~.
+If the primitive does not respond to ~(x2|y2)~, then ~(w|h)~ will be used to derive ~(x2|y2)~. This
+change makes the definition of horizontal and vertical lines more intuitive.
+
+Instead of defining a horizontal line like this:
+#+begin_src ruby
+ args.outputs.lines << { x: 0, y: 360, x2: 1280, y2: 360 }
+ args.outputs.lines << { x: 640, y: 0, x2: 640, y2: 720 }
+#+end_src
+
+You can instead do this:
+#+begin_src ruby
+ args.outputs.lines << { x: 0, y: 360, w: 1280 }
+ args.outputs.lines << { x: 640, y: 0, h: 720 }
+#+end_src
+** [Support] Console font decreased slightly to give more real estate.
+** [Support] Console will apply color/formatting to comment blocks (making code blocks easier to read).
+** [Support] Slight performance improvements to ~OpenEntity~.
+** [Support] ~Hash#method_missing~ expanded to allow access to methods that collide with core apis.
+The ~Hash#method_missing~ capability allows you to access ~some_hash[:some_key]~, by using ~some_hash.some_key~ instead.
+For keys that conflict with core ~Hash~ api's, you can now suffix the method with an ~underscore~. Example: You
+can access ~some_hash[:length]~ using ~some_hash.length_~.
+
+Using the ~dot~ operator over ~Hash#[]~ isn't required, but it is encouraged (sample apps will opt to use the ~dot~
+operator for accessing keys in a ~Hash~, using the ~underscore~ suffix as needed).
+** [Deprecation] [Soft] ~Hash#(solid|sprite|label|line|border)~ methods log a deprecation warning and suggest new methods usage.
+*** New methods
+NOTE: Given how long these methods have been around, it's unlikely they will be removed for *very* long time.
+Here are the new method options:
+- ~Hash#(solid!|to_solid)~
+- ~Hash#(sprite!|to_sprite)~
+- ~Hash#(label!|to_label)~
+- ~Hash#(line!|to_line)~
+- ~Hash#(border!|to_border)~
+*** Sample Usage
+These new methods accept a ~Hash~ as an additional parameter that will perform a ~Hash#merge!~
+with the object it's called on. They also better communicate that these primitive
+methods cause side effects. The existing methods did not communicate this which is why they are
+being deprecated.
+
+This is how ~Hash#border~ is currently being used:
+#+begin_src ruby
+ def tick args
+ color = { r: 255, g: 0, b: 0 }
+ cell = {
+ x: 0,
+ y: 0,
+ w: 100,
+ h: 100
+ }
+ args.outputs.primitives << cell.merge!(color).border
+ end
+#+end_src
+
+You'll want to use ~Hash#border!~ instead:
+#+begin_src ruby
+ def tick args
+ color = { r: 255, g: 0, b: 0 }
+ cell = {
+ x: 0,
+ y: 0,
+ w: 100,
+ h: 100
+ }
+ args.outputs.primitives << cell.border!(color)
+ # args.outputs.primitives << cell.merge(color).border! # this is also valid
+ end
+#+end_src
+
+Use ~Hash#to_border~ if you *don't* want to mutate the original ~Hash~:
+#+begin_src ruby
+ def tick args
+ color = { r: 255, g: 0, b: 0 }
+ cell = {
+ x: 0,
+ y: 0,
+ w: 100,
+ h: 100
+ }
+ args.outputs.primitives << {
+ x: 0,
+ y: 0,
+ w: 100,
+ h: 100
+ }.to_border(color)
+ end
+#+end_src
+* 2.22
+** [Pro] [iOS] [Bugfix] Added missing icon files for ios and missing ios_metadata.txt template file.
+** [API] ~GTK::Runtime#http_post_body url:string, body:string, headers:array[string]~
+~args.gtk.http_post_body~ can be used to post raw data (with the responsibility of encoding left to the dev).
+Example:
+#+begin_src ruby
+ def tick args
+ if args.inputs.keyboard.key_down.enter
+ json = "{ \"userId\": \"1000\", \"name\": \"Artorias of the Abyss\" }"
+ args.gtk.http_post_body "http://tempuri.com/updated-profile",
+ json,
+ ["Content-Type: application/json"
+ "Content-Length: #{json.length}"]
end
- ```
- * [API] Added `args.gtk.stop_music` to stop all looping music.
- * [API] Added `args.geometry` which contains stateless functions
- that exist on primitives. For a full listing of methods open up
- the console and type `args.geometry.help`. A lot of these methods
- are exercised in the `samples/99_zz_gtk_unit_tests` test suite.
- * [Support] The --no-tick switch for ./dragonruby will now hide the
- game window (it's a good way to run "headless" unit
- tests/regressions suites). Usage: `./dragonruby mygame --eval
- some_ruby_file.rb --no-tick`.
- * [BREAKING] gtk.on_ticks has been deprecated, use the better named
- gtk.scheduled_callbacks instead.
- * [BREAKING] gtk.on_tick TICKCOUNT { BLOCK } has been deprecated, use the better named
- gtk.schedule_callback TICKCOUNT { BLOCK } instead.
-
-= release-20190930 =
-
- * [Samples] Added sample app that shows how trace can be used within a class.
- * [Support] Added $gtk.log_level. Valid values are :on,
- :off. When the value is set to :on, GTK log messages will show up
- in the DragonRuby Console *AND* be written to logs/log.txt. When the
- value is set to :off, GTK log messages will *NOT* show up in the
- console, but will *STILL* be written to logs/log.txt
- * [API] Added args.inputs.mouse.(click|up|down).(x|y) so you don't have to do
- args.inputs.mouse.click.point.
- * [Support] You can change your window title at runtime with
- $gtk.set_window_title('new title'). YOU MUST SET UP YOUR GAME'S METADATA
- CORRECTLY EVEN IF YOU USE THIS FUNCTION.
- * [Support] The macOS build is now compiled with Link-Time
- Optimization, as an experiment, which makes your games a little faster and
- your downloads a little smaller.
- * [Support] We've split the open source licenses out of README.txt
- to their own file, which is packaged with your games, to be a good citizen
- of the world. If you add other open source stuff, just copy
- open-source-licenses.txt into your game's folder and add your own stuff
- to it; that will package with your game instead of the original text file.
- * [Support] Added JSON parsing. Try $gtk.parse_json(myJsonString) or
- $gtk.parse_json_file(filename)
- * [Support] Added XML parsing. Try $gtk.parse_xml(myXmlString) or
- $gtk.parse_xml_file(filename)
- * [BREAKING] There is a new replay data format that is less crappy. But it breaks
- existing replay data. You'll need to re-record your replays (sorry T_T).
- To record a replay of gameplay, you can run ./dragonruby mygame --record.
- When you close the game, a file called last_replay.txt will be created.
- You can re-run a replay as a means to perform visual regression using
- ./dragonruby mygame --replay last_replay.txt
- * [Support] Added a --production command line option for running an
- unpublished game as if it were published.
- * [Support] We now offer bleeding edge builds on the "experimental"
- channel on itch.io. If you want those, go to where you downloaded this
- package, and look for the "experimental" download instead. These are
- expected to be less stable and pushed as we need to test things out or
- hotfix a bug that isn't ready to roll into an official release. If this is
- your jam, though, go for it.
- * [OSS] Thank you to StardragonEX, phaedryx, and pusewicz for contributing
- to GTK documentation located at github.com/DragonRuby/dragonruby-game-toolkit-contrib.
- * [Support] Enabling trace! on an object now outputs
- all trace data to a file as opposed to just standard out. This will
- make trace debugging significantly more useful to developers that
- don't have a high-buffer-history terminal running.
- * [Samples] Added platformer that deals with moving objects, jumping, and dealing with inertia.
- * [Samples] Added sample showing how to render an isometric grid
- (like Into The Breach).
- * [Samples] Sample added showing how to use trace! debugging when you
- are having trouble with why an exception is being thrown.
- * [Samples] Many of the sample apps have had their methods reorganized
- for consistency in reading. They also have comments added to them.
- * [Experimental] If the game has been running for over a minute, and cannot
- keep a stable 60 fps, the game's rendering will be skipped every other
- frame to save process cycles (tick method will still execute as fast
- as possible, but results from them method will only be rendered at 30 fps).
-
-= release-20190912 =
-
- * [Bugfix] dragonruby-publish now correctly builds HTML5 packages when
- there's a "'" character in the game's name (etc).
- * [Bugfix] dragonruby-httpd now serves paths with spaces in them correctly.
- * [Bugfix] dragonruby-publish now ignores __MACOSX directories (trash that
- macOS tends to generate when you double-click a .zip file to unpack it
- from the Finder).
-
-= release-20190909 =
-
- * [Bugfix] HTML5 builds' "click-to-play" UI now scales the icon.
- * [Bugfix] args.gtk.writefile(path, content [, write_to_game_dir = true])
- now writes file to the game folder as opposed to the root directory.
- If you need to write to the root directory provide false as the third
- parameter to write file.
- * [Experimental] There is now a special file in mygame called mailbox.rb.
- When `args.gtk.suppress_mailbox = false`, mailbox.rb will be checked for
- changes at a high frequency (10 times a second). Because this an
- experimental feature, the default value of `args.gtk.suppress_mailbox` is
- TRUE. You can use this file as a means to communicate with GTK between process.
- There is a sample app that shows how to use the mailbox.rb file.
- * [Support] You can now have multiple mouse buttons!
- args.inputs.mouse.click and .up will still be set if there was a mouse
- button change for the current tick, but you should look at
- args.inputs.mouse.button_left (or _middle or _right or _x1 or _x2) as a
- bool to see if it's currently pressed down. More than one might be pressed,
- and more than one button might have changed in the one .click you'll get.
- The same is true for .up
- * [Support] You can now see the mouse wheel (or your trackpad
- pretending to be a mouse wheel when you stroke it appropriately)!
- All wheel input since the last tick is added together. You can check if
- args.inputs.mouse.wheel isn't nil to decide if the wheel has moved for
- this tick.
- ```ruby
- m = args.inputs.mouse
- if m.wheel
- puts("The wheel moved #{m.wheel.x} left/right and #{m.wheel.y} up/down")
+ end
+#+end_src
+** [Support] ~GTK::Runtime#notify_extended!~ now accepts ~overwrite~ as an option.
+Example:
+#+begin_src ruby
+ def tick args
+ if args.inputs.keyboard.key_down.enter
+ args.gtk.notify_extended! message: "message to show", # message to show
+ durations: 300, # how many ticks to show the message
+ env: :prod, # by default, notifications only happened in :dev
+ overwrite: true # if this value is true, the notification will
+ # shown even if another one is currently in progress
end
- ```
-
-= release-20190829 =
-
- * [Community] Discord link: http://discord.dragonruby.org and Youtube link: http://youtube.dragonruby.org.
- * [Support] Plugging in an unrecognized controller will now make DragonRuby pop up a
- UI to let the user configure it. During this time your game will receive no
- tick calls and so will be effectively paused. It resumes once the user has configured the
- controller or abandoned it. This is a work in progress, but we already
- think it's pretty cool.
- * [Experimental] [Advanced] You can start up ./dragonruby by passing in --eval file_path. The file passed in will
- execute on startup. Additionally you can pass in --eval file_path --no-tick which will
- exit ./dragonruby immediately after loading all source, and running the file passed to eval.
- * [Experimental] [Advanced] `on_tick` callback has been added to $gtk. This can be used to run some form of automation.
- For example, you can run the Dueling Starships sample app with the following inside of repl.rb.
- ```ruby
- # Reset the game and sent the RNG seed to 100
- $gtk.reset 100
-
- # Remove any existing callbacks.
- $gtk.on_ticks.clear
-
- # One second into the game, hold down the right directional
- # on controller one.
- $gtk.on_tick 60 do
- $gtk.args.inputs.controller_one.key_held.right = true
+ end
+#+end_src
+** [Support] Better method missing exception formatting if the object's inspect is very long.
+
+* 2.21
+** [Samples] Added farming simulator starting point: =./samples/99_genre_crafting/farming_game_starting_point/=
+** [Pro] [iOS] Updated iOS Wizard to consult metadata/ios_metadata.txt for iOS Specific configurations.
+** [Support] Added a more streamlined means to get autocomplete suggestions: http://localhost:9001/dragon/autocomplete/
+** [Support] DragonRuby Console prints backtrace for exceptions if helpful information is contained in it.
+
+* 2.20
+** [Bugfix] ~GTK::Runtime#benchmark~ reports completion time if only a single lambda is provided.
+** [OSS] ~GTK::Runtime#benchmark~ has been open sourced.
+** [API] Added ~args.layout.rect_group~ which allows you to layout a group of primitives
+Entries of the group can be offset by a delta row/col value. This is useful if you want to
+position primitives as if they were in a table. Here's an example of presenting a collection
+of labels each offset by a delta row ~drow~:
+#+begin_src ruby
+ def tick args
+ args.state.player.x ||= 640
+ args.state.player.y ||= 360
+ args.state.player.x += 10
+ args.state.player.y -= 10
+
+ debug_labels = args.layout
+ .rect_group row: 0, # starting row
+ drow: 0.5, # row amount to offset set each item by (delta row)
+ col: 0, # starting col
+ group: [ # items representing the group
+ { text: "player.x: #{args.state.player.x}" },
+ { text: "player.y: #{args.state.player.y}" },
+ ]
+ args.outputs.labels << debug_labels
+ end
+#+end_src
+** [Samples] New sample app: =./samples/99_genre_fighting/01_special_move_inputs/app/main.rb=
+Sample app added that shows how to capture "special moves" like in a fighting game.
+** [Bugfix] Ensure custom console buttons show up in both dev and production builds.
+
+* 2.19
+** [Bugfix] Exception no longer thrown when requiring a brand new file.
+** [Support] [Important] Server Side Request Forgery vulnerability patch for DragonRuby Game Toolkit Web Console (http://localhost:9001)
+All http endpoints that submit data to DragonRuby now only accept ~application/json~ payloads (~x-www-form-urlencoded~ is no longer allowed).
+This change patches a SSRF vulnerability that would allow a malicious website to process request against
+~http://localhost:9001/dragon/eval/~ and execute arbitrary code on your machine.
+
+Special thanks to @mooff@discord for bringing up this concern and @kfischer_okarin@discord for verifying it.
+
+The new api interaction is as follows:
+*** From curl:
+#+begin_src sh
+ curl -H "Content-Type: application/json" --data '{ "code": "$result = $args.state" }' -X POST http://localhost:9001/dragon/eval/
+#+end_src
+*** From DragonRuby Game Toolkit
+#+begin_src ruby
+ def tick args
+ if args.inputs.keyboard.key_down.r
+ json = <<-S
+{
+ "code": "
+log 'received request from $gtk.http_post'
+$gtk.console.show
+$result = 1 + 2
+"
+}
+S
+ args.state
+ .http_eval_request = args.gtk
+ .http_post "http://localhost:9001/dragon/eval/",
+ { "body" => json },
+ [ "Content-Type: application/json" ]
end
-
- # On frame 80, release the right directional, and
- # hold down R1.
- $gtk.on_tick 80 do
- $gtk.args.inputs.controller_one.key_held.right = false
- $gtk.args.inputs.controller_one.key_up.right = true
- $gtk.args.inputs.controller_one.key_held.r1 = true
+ if (args.state.tick_count.zmod? 60) && args.state.http_eval_request && args.state.http_eval_request.complete
+ puts args.state.http_eval_request.response_data
+ end
+ end
+#+end_src
+* 2.18
+** [API] Added ~args.inputs.controller_(one|two).(key_down|key_held|key_up).(back|select)~.
+** [API] Added ~args.inputs.controller_(one|two).(key_down|key_held|key_up).(home|guide)~.
+** [API] Primitives now support ~blendmode_enum~ which can be used to inform how transparency should be blended.
+You may have encountered render artifacts where opacity of a sprite would take on the background color of a render target,
+or text of a label had quality degradation when included in a render target.
+This can now be resolved by setting the ~blendmode_enum~ to ~0~. Example:
+#+begin_src ruby
+ def tick args
+ # render target has transparent background
+ args.render_target(:camera).background_color = [0, 0, 0, 0]
+
+ # set blendmode_enum to 0 for label to retain quality
+ args.render_target(:camera).labels << { x: 700, y: 300, text: 'Hello World', blendmode_enum: 0 }
+
+ # set blendmode_enum to 0 for sprite so that background_color isn't blended in
+ args.render_target(:camera).sprites << { x: 700,
+ y: 300,
+ w: 300,
+ h: 300,
+ path: 'sprites/some-sprite-with-feathering.png',
+ blendmode_enum: 0 }
+
+ args.outputs.sprites << { x: 0, y: 0, w: 1280, h: 720, path: :camera }
+ end
+#+end_src
+The following blend modes are supported: 0 (none), 1 (alpha), 2 (add), 3 (mod), 4 (multiply).
+** [Samples] Sample app demonstrating ~blendmode_enum~ has been added: =./samples/07_advanced_rendering/10_blend_modes/=.
+** [Bugfix] Emscripten/web builds will now allocate as much memory as needed to run the game.
+The compilation of wasm games now set ~ALLOW_MEMORY_GROWTH~. If you had issues with large sound files
+not loading within a web build, this change should resolve that issue.
+** [Support] Added ~GTK::Runtime#benchmark~ which can be used to gauge performance.
+Example usage:
+#+begin_src ruby
+ def tick args
+ # press r to run benchmark
+ if args.inputs.keyboard.key_down.r
+ args.gtk.console.show
+ args.gtk.benchmark iterations: 1000, # number of iterations
+ # label for experiment
+ using_numeric_map: -> () {
+ # experiment body
+ v = 100.map do |i|
+ i * 100
+ end
+ },
+ # label for experiment
+ using_numeric_times: -> () {
+ # experiment body
+ v = []
+ 100.times do |i|
+ v << i * 100
+ end
+ }
+ end
+ end
+#+end_src
+** [Support] Better error message/exception for method missing on value types.
+** [Support] ~args.layout.debug_primitives~ will draw the cells on the screen to help with placement.
+~args.layout.rect(row:, col:, w:, h:)~ is a great way to layout controls. The ~debug_primitives~ function
+will render an overlay to help you with placement. Example:
+#+begin_src ruby
+ def tick args
+ args.outputs.debug << args.layout.debug_primitives
+ end
+#+end_src
+** [Bugfix] ~args.inputs.http_requests { |req| req.body }~ will now exclude the "Content-Disposition" envelope.
+Performing an ~args.gtk.http_post url, form_fields~ with populated form_fields creates a Content-Disposition envelope
+in the http request. The embedded web server's ~request.body~ now excludes that part of the payload to make parsing
+the body easier. ~request.raw_body~ has been added to show the unaltered http payload if you need it.
+** [Support] [Experimental] ~http://localhost:9001/dragon/eval/~ supports requests from ~args.gtk.http_post~.
+Here is an example of how to request an eval of code over http via ~gtk.http_post~
+#+begin_src ruby
+ def tick args
+ if args.inputs.keyboard.key_down.r
+ code_to_eval = <<-S
+log 'received request from $gtk.http_post'
+$gtk.console.show
+$result = 1 + 2
+S
+ args.state
+ .http_eval_request = args.gtk
+ .http_post "http://localhost:9001/dragon/eval/",
+ { "body" => code_to_eval }
+ end
+ if (args.state.tick_count.zmod? 60) && args.state.http_eval_request && args.state.http_eval_request.complete
+ puts args.state.http_eval_request.response_data
+ end
+ end
+#+end_src
+** [Support] Rendering should be 10% to 15% faster.
+Enumeration of primitives uses a new module ~Object#fn#each_send~ which is faster than
+using a while loop. Here is an example of how to use ~fn.each_send~:
+#+begin_src ruby
+ def process_item i
+
+ end
+
+ def process_very_large_array
+ very_large_array = ...
+
+ fn.each_send very_large_array, # array to process
+ self, # object containing method to invoke
+ :process_item # name of method to invoke for each item
+ end
+#+end_src
+
+* 2.17
+** [Bugfix] Fixed another reload edgecase related to: Files loaded on startup will not be loaded again on frame 57 (hotloading is deferred until after the game has been fully initialized).
+
+* 2.16
+** [Bugfix] [Pro] Android 32-bit deployment should now work.
+** [Support] [Pro] Android deployment are (for now) always production builds. Instructions for http server:
+If you want to have access to your app over http, you will need to put the following line in ~app/main.rb~
+before deploying:
+
+#+begin_src ruby
+ def tick args
+ args.gtk.start_server! port: 9001, enable_in_prod: true
+ ....
+ end
+#+end_src
+** [API] ~Runtime#calcspritebox~ added.
+Calling ~args.gtk.calcspritebox PATH~ will return the ~w~ and ~h~ of the sprite as an array/tuple.
+** [Support] Better error messages in the event of a ~uninitialized constant~ Exception when invoking ~require~.
+** [Support] Better coloring of codeblocks begin/end within the Console.
+** [Bugfix] Added additional Raspberry Pi configurations (arm32). DRGTK running on Raspberry Pi's should work now.
+** [Bugfix] Files loaded on startup will not be loaded again on frame 57 (hotloading is deferred until after the game has been fully initialized).
+** [Bugfix] Allow startup even if audio isn't available.
+** [API] [Bugfix] ~Geometry::inside_rect?~ will return ~nil~ instead of throwing an exception if either argument passed into it are ~nil~.
+
+* 2.15
+** [Bugfix] [Pro] ~dragonruby-publish~ no longer fails with ~ios-device~ error.
+** [API] ~Numeric#clamp~ now accepts a single parameter (representing ~min~ value).
+** [Support] Better Console visuals/information in the event of a ~method_missing~ exception.
+** [Support] Better formatting of "Did you mean?" in the event of a ~method_missing~ exception.
+** [Support] Added help text in Console stating that ~ctrl+g~ can be used to clear the prompt.
+** [Bugfix] Console automatically closes in the event of a syntax error being fixed.
+
+* 2.14
+** [Samples] Added sample app that shows how to create a very simple camera =./samples/07_advanced_rendering/07_simple_camera/=.
+** [Pro] [Support] Compiler optimizations for iOS builds. Your iOS apps should be quite a bit faster now.
+** [API] Better error handling missing methods on ~args.inputs.keyboard.KEYBOARD_KEY~.
+** [API] Added ~args.gtk.version_pro?~ which will return ~true~ for the Pro version of DragonRuby Game Toolkit.
+
+* 2.13
+** [Samples] Added sample app that you can use as a starting point for Classic Jam: Guantlet Edition =./samples/99_genre_dungeon_crawl/classics_jam/=
+** [API] ~Geometry~ apis no longer rely on ~left~, ~right~, ~top~, and ~bottom~ allowing you to use anything that ~respond_to~ ~x~, ~y~, ~w~, ~h~.
+** [API] Added ~args.inputs.directional_angle~ which will return nil, 0, 45, 90 ... 360 depending on if ~up~, ~down~, ~left~, ~right~ are pressed.
+** [API] ~OpenEntity~ and ~StrictEntity~ include the ~Geometry~ module.
+** [API] Added ~OpenEntity#merge~ which invokes ~(OpenEntity#as_hash).merge~.
+
+* 2.12
+** [Support] Better call stack for exceptions.
+** [Support] Added ~args.fn.pretty_print OBJECT~ and ~args.fn.pretty_print_verbose OBJECT~.
+These printing apis are still a work in progress/might not be perfect.
+** [Bugfix] Fixed Raspberry Pi executable segfaulting (it was totally @icculus's fault).
+** [Bugfix] Fixed ~GTK#http_(get|post) for Mojave, while at the same time not breaking Catalina/Big Sur (it was totally Apple's fault).
+** [Bugfix] [Pro] Fixed unhandled exception caused by missing headers when responding to http requests.
+** [API] Added ~Geometry#rotate_point(target_point, degrees_to_rotate, pivot_point = [0, 0])~.
+** [API] Added ~FFI::Draw#draw_label_2~ which accepts ~vertical_alignment_enum~ as a new parameter.
+~FFI::Draw#draw_label~ defaults ~vertical_alignment_enum~ to ~2~ for backwards compatibility.
+** [API] ~Label~ primitive now supports ~vertical_alignment_enum~.
+Example:
+
+#+begin_src ruby
+ def tick args
+ args.outputs.labels << {
+ # x position of the label's origin
+ x: 640,
+
+ # y position of the label's origin
+ y: 360,
+
+ # text of the label
+ text: "Sample Label",
+
+ # red color of the label
+ r: 0,
+
+ # green color of the label
+ g: 0,
+
+ # blue color of the label
+ b: 0,
+
+ # alpha of the label
+ a: 255,
+
+ # default value of size_enum is 0 this virutal value of zero represents
+ # the recommended font size that would be legible on devices large and small
+ # this value can be negative to go smaller (but with the risk of being hard to read
+ # on mobile or handheld screens)
+ size_enum: 0
+
+ # this represents the horizontal alignment of the label, which is calculated using
+ # the far left value of the string (~x~) and its render width.
+ # 0 (default value) means ~left~ aligned, 1 means ~center~ aligned, 2 means ~right~ aligned
+ alignment_enum: 0,
+
+ # this represents the vertical alignment of the label, which is calculated using
+ # the asension value of the string (~h~) and the bottom location of the string (~y~).
+ # 0 means ~bottom~ aligned, 1 means ~center~ aligned, 2 (default value) means ~top~ aligned
+ # IMPORTANT: To reiterate, the default value of this enum is 2 for backwards compatibility.
+ vertical_alignment_enum: 0,
+
+ # the font for the label
+ font: "font.ttf"
+ }
+ end
+#+end_src
+
+* 2.11
+** [Sample] Added a very simple sample app that shows how to move a sprite using the keyboard =samples/02_input_basics/01_moving_a_sprite=.
+** [API] ~attr_gtk~ adds ~new_entity~ to the class that invokes this class macro.
+** [API] Added ~args.temp_state~. All values are set to ~nil~ on this object after ~tick~ is processed.
+** [API] ~Hash#merge(!)~ accepts both ~Entities~ and ~Hashes~.
+** [API] ~Hash~ responds to method missing and will forward to ~[key](=)~.
+** [API] ~Layout#rect~ accepts ~d(x|y)_ratio~ which alters the final rectangle by the ratio specified.
+** [API] ~Layout#rect~ accepts ~merge~ which will add the hash specified into the resulting rectangle.
+** [API] Added ~Runtime#platform?(symbol)~ which consults ~Runtime#platform_mappings~ to make it easier to determine the platform your game is running on.
+** [Support] ~$wizards.itch.start~ performs a the publishing process for you, but no longer attempts to deploy to Itch.io using Butler (Butler is too unstable).
+** [Support] [Pro] ~$wizards.ios.start~ now asks for App's version number.
+** [Support] Performance improvements to ~Numeric#==~.
+
+* 2.10
+** [Sample] [Bugfix] Fixed naming of roguelike sample apps (they were wrong).
+** [Pro] Ahead of time/bytecode compilation added.
+In the manifest file, add ~compile_ruby=true~. ~./dragonruby-publish~ will do the work.
+** [Pro] [Bugfix] Fixed issue where game would not boot if main.rb was compiled (AOT will totally work this time).
+** [Pro] [Bugfix] ~dragonruby-publish~ will compile ruby files outside of =mygame/app= (such as mygame/lib).
+
+* 2.9
+** [Sample] [Bugfix] Fixed exception in breadth first search sample app =samples/13_path_finding_algorithms/01_breadth_first_search=.
+** [Pro] [Bugfix] Fixed premature ~free~ in AOT which caused it to fail loading.
+
+* 2.8
+** [Pro] [Support] ~args.inputs.http_requests~ has been added so that you can prototype multiplayer games over http.
+Here is an example usage:
+#+begin_src ruby
+def tick args
+ args.gtk.start_server! port: 9001, enabled_in_prod: true
+ args.inputs.http_request.each do |req|
+ puts req
+ req.respond 200, "hello from DragonRuby", { 'Content-Type' => 'text/plain }
+ end
+end
+#+end_src
+** [Pro] [Sample] Added sample app that shows how to process http request =./samples/11_http/02_web_server=.
+** [Pro] [iOS] Added the ability to create a distribution build of an iOS app.
+To deploy to your device as a dev build, open up the Console and type ~$wizards.ios.start env: :dev~.
+To create a package that can be uploaded to Apple, open up the Console and type ~$wizards.ios.start env: :prod~.
+** [Pro] [Bugfix] [iOS] Remote hot loading of a game deployed to your iOS device is stable and will not perform unnecessary reloads.
+** [Pro] Ahead of time/bytecode compilation added.
+In the manifest file, add ~compile_ruby=true~. ~./dragonruby-publish~ will do the work.
+** [Perf] Minor improvements made to arithmetic operations.
+** [Samples] Created a much simpler sample app that shows how to play sounds.
+** [OSS] Hot loading machinery has been open sourced.
+** [Sample] Added sample app that shows a z-targeting game mechanic =./samples/07_advanced_rendering/08_z_targeting_camera=.
+** [Support] DragonRuby GTK when in development mode spins up an http endpoint that exposes capabilities of the Console as a webpage.
+The default port for the http endpoint is a port number 9001 (it's a port number over 9000). After
+starting up DragonRuby, go to http://localhost:9001 to see the what options you have available (these options will expand over time).
+** [Sample] Added a Tower Defense sample app =samples/13_path_finding_algorithms/09_tower_defense=.
+
+* 2.7
+** [Bugfix] Html5 exception when trying to find a missing metadata file no longer occurs.
+** [API] ~attr_rect~, ~attr_sprite~ class macros updated so that they can be mixed into ~Entities~.
+#+begin_src
+ def tick args
+ args.state.player ||= args.state.new_entity :player, x: 0, y: 0, w: 100, h: 100 do |e|
+ e.attr_rect
end
- ```
- There is a full blown automation script under samples/00_beginner_ruby_primer/automation.rb
- ./samples/00_beginner_ruby_primer $ ../../dragonruby . --eval app/automation.rb
- * [Support] Exceptions `game_state_*.txt files are now written to an exceptions directory
- instead of cluttering up the root.
- * [Support] Launching dragonruby with --fullscreen on the command line makes the game fullscreen.
- * [Support] Launching dragonruby-publish from any directory with no command line arguments
- and without a "mygame" folder in the current working directory will
- cause it to look for "mygame" in the same directory as dragonruby-publish
- itself. Which is to say: it'll work in the default configuration if you
- double-click it from the macOS Finder.
- * [Samples] New sample app called 02_collisions_02_moving_objects has been added.
- * [Support] Previous console messages are subdued if unhandled exception is resolved.
- This removes visual confusion if another exception is thrown (easier to determine what the current exception is).
- * [Support] Added api documentation about truthy_keys for keyboards and controllers.
- * [API] [Experimental] Hashes now quack like render primitives. For example some_hash[:x] is the same as
- some_hash.x and can be interchangeable with some_array.x (this is a work in progress
- so there may be some geometric/collision apis that aren't covered).
- * [Support] Usability of Console and it's interaction with repl.rb is SIGNIFICANTLY better.
- Take a look at the new repl.rb file under mygame/repl.rb to see an interactive
- crash course of Ruby that shows how to use variables, functions, conditionals,
- loops, and arrays. Special thanks to @raulrita (https://www.twitch.tv/raulrita)
- for live streaming and bringing light to these enhancements.
- * [Support] `puts` statements that begin with "====" are rendered as teal in the Console. This
- provides a visual separation that will help with print line debugging.
- * [OSS] The DragonRuby Game Toolkit Console has been open sourced under an MIT license. You can find it
- here: https://github.com/DragonRuby/dragonruby-game-toolkit-contrib
-
-= release-20190823 =
-
- * [Support] The mygame directory now contains a documentation folder that provides high level
- APIs for the engine (it's a work in progress, but a good starting point).
- * [Samples] A sample app called "hash primitives" has been added that shows how you can use a Hash
- to render a primitive. This will make specifying sprite's advanced properties much easier.
- * [Samples] The sprite limits sample app shows how you can ducktype a class and render it as a sprite.
- Doing this is a tiny bit more work, but there is a huge performance benefit.
- * [Bugfix] Internal limits total textures/render targets/fonts is removed.
- * [BREAKING] args.dragon has been deprecated, you must now use the new property args.gtk.
- * [BREAKING] args.game has been deprecated, you must now use the new property args.state.
- * [BREAKING] args.gtk.root has been removed and all attributes have been moved to args.gtk.
- * [BREAKING] args.gtk(.root).mouse_focus has been removed, use args.inputs.mouse.has_focus.
- * [BREAKING] args.gtk(.root).keyboard_focus has been removed, use args.inputs.keyboard.has_focus.
- * [BREAKING] $dragon has been removed, you must now use $gtk.
- * [BREAKING] $view has been removed and functionality has been moved to $gtk, use that variable instead.
-
-= release-20190816 =
-
- * [Bugfix] HTML5: Fixed crash on startup on Chrome if the game's icon isn't tiny.
- * [Samples] Added sample app that shows how you can make a paint app (05_mouse_move_paint_app).
- * [Samples] Added sample app that shows how you can make a tile editor (05_mouse_move_tile_editor).
- * [Samples] Added LOWREZ Jam 2019 game that Amir built: Return of Serenity (99_sample_game_return_of_serenity).
- * [Samples] Added Metroidvania sample app which is a great starting point for the "Metroidvania Month" Jam on Itch.io.
- * [Support] :ordinal_indicator (º) character added to args.inputs.keyboard. It can be used to bring up the GTK console.
-
-= release-20190813 =
-
- * [Samples] Added sample app that shows off controller input.
- * [API] `args.inputs.keyboard.key_down.delete is now available and works in the GTK console.
- * [Bugfix] Requiring a ruby file that doesn't exist will return an error instead of crashing.
- * [Support] Console coloring added for exceptions.
- * [Support] When running trace!, if an exception occurs. The last method invoked will
- be provided in the details.
-
-= release-20190806 =
-
- * [Bugfix] Having $gtk.reset at the bottom of your main.rb will not cause a recursive require
- of all files.
- * [Support] In the event of an exception, the source code will not be searched if the
- search term is less than three characters.
- * [Samples] A Roguelike starting point sample app has been added.
- * [Support] If a primitive rendering fails, the primitive type will now be included
- with the exception.
- * [API] The property `args.outputs.static_background_color = [0, 0, 0]` is now exposed. This allows
- you to control the color of the letterbox around your game. Some of the sample apps have been
- updated to use this property (for example Dueling Starships).
-
-= release-20190803 =
-
- * [Bugfix] `gtk_attr` now included the `inputs` attr_accessor.
- * [Website] The initial version of http://fiddle.dragonruby.org has
- been created. Try it out.
- * [Support] Eight new beginner sample apps have been added
- which breakdown the tech demo into consumable pieces (with comments).
- * [Support] The two introductory Ruby primers now contain links
- to video tutorials that you can use to follow along.
- * [Support] A game/sample app called Snakemoji has been added. Game
- development should be fun and about experimentation. This sample app
- was certainly built in the spirit of this. A big thank you to
- Anton K. (ai Doge) for this contribution.
- * [Support] Added $gtk.trace!(an_object) which will detailed print execution
- information. This should make it much easier to track down exceptions.
- * [Support] All source files are auto reloaded on save or when
- $gtk.reset is executed.
- * [Support] § (:section_sign) can now be used to open up the
- DragonRuby GTK Console.
-
-= release-20190731 =
-
- * [Bugfix] Fixed bug in DragonRuby console returning evaled value.
- * [Support] Updated collisions sample app with comments.
- * [Support] Added comments for sprite animation sample app.
- * [Support] dragonruby-publish will look for your game in the
- "mygame" directory if not otherwise specified on the command line.
- * [Support] dragonruby-publish now puts packaged builds in
- "builds" directory instead of ".dragonruby/builds" so you can actually
- find them.
-
-= release-20190712 =
-
- * [Bugfix] dragonruby-publish ignores .git/.hg/.svn directories.
-
-= release-20190711 =
-
- * [Bugfix] Bug fix for Easing module rename. Sorry about that!
- * [Typo] Fixed grammar in sprite limits explanation.
-
-= release-20190709 =
-
- * [Bugfix] Text scaling now works on Windows. Resize the window and your
- fonts should stay crisp now!
- * [Bugfix] dragonruby-httpd on Windows now has proper EXE metadata.
- * [API] Commonly used properties on `args` are now accessible as top
- level methods:
-
- ```
+
+ puts60 (args.state.player.intersect_rect? [10, 10, 10, 10])
+ end
+#+end_src
+** [Docs] Better themeing of table of contents.
+** [Docs] Added docs for easing functions and string functions. Added ~args.easing~ and ~args.string~ so you have access to class functions like ~args.geometry~.
+** [Bugfix] ~args.inputs.directional_vector~ now returns the correct normalized values for diagonals.
+** [Bugfix] ~args.layout.rect~ now respects ~args.grid.origin_center!~.
+** [API] Hash responds to ~pos~ and ~z~ so you can access those properties via the dot operator instead of using indexed symbols.
+** [Samples] Misnamed sample app has been renamed to =bullet_hell= to reflect what the sample shows.
+
+* 2.6
+** [Samples] Fixed \r\n syntax error in animation creator sample app that only affected Window (grr).
+
+* 2.5
+** [Samples] [Pro] Fixed exception in synth sample app (no really this time).
+
+* 2.4
+** [OSS] Contributions from [[github.com/dragonruby/dragonruby-game-toolkit-contrib]] have been synchronized.
+** [OSS] Remote hot load client has been open sourced.
+** [Samples] Added starter template from Nokia Jam 3 under =./samples/99_lowrez=.
+** [Samples] [Pro] Fixed exception in synth sample app.
+** [Support] Initial work to include line number and file in the event on an exception.
+
+* 2.3
+** [Bugfix] Ensure that all requires are processed before running unit tests.
+** [Samples] =./samples/99_genre_3d/02_wireframe=: Sample app added to show how to create a wireframe using ~.off~ (Object File Format) geometry files.
+** [Samples] =./samples/13_path_finding_algorithms= Sample apps added that show various types of pathfinding.
+[[This write-up][https://www.redblobgames.com/pathfinding/a-star/implementation.html]] on Red Blob Games is a fantastic read.
+** [Samples] =./samples/(08_bouncing_on_collision|09_arbitrary_collision|10_collision_with_object_removal) Sample apps added that show collision of arbitrary polygons.
+** [Samples] =./samples/99_genre_rpg_tactical= Sample app added that show how to do player/enemy turns in a tactical RPG.
+** [API] Added a means to get autocompletion suggestions from the Runtime via ~GTK::Runtime::suggest_autocomplete~. You can use this to create fancy autocompletion plugins for your preferred editor.
+Example usage:
+#+begin_src ruby
+ # API: $gtk.suggest_autocompletion index: STRING_INDEX_REPRESENTING_CURSOR_LOCATION, text: SOURCE_CODE
+
+ # Write something like the following to app/mailbox.rb
+ # get the autocomplete suggestions for the source code with the cursor at index 21
+ suggestions = $gtk.suggest_autocompletion index: 21, text: <<-SOURCE_CODE
def tick args
- args.(solids|sprites|lines|labels|borders|
- click|click_at|mouse|controller_one|controller_two|
- keyboard)
+ args.
end
- ```
- * [BREAKING] `args.game` has been deprecated is favor of the better
- named property `args.state`.
- * [Support] DragonRuby GTK Console now accepts input
- immediately (specifically while it's animating).
- * [API] Class macro `gtk_args` has been added. Instead of having to
- do:
-
- ```
- class Game
- attr_accessor :args, :grid, :state, :inputs, :outputs, :gtk, :passes,
- :current_scene, :other_custom_attrs
-
- def tick
+ SOURCE_CODE
+
+ # write autocomplete suggestions to a file for reading later
+ $gtk.write_file 'autocomplete.txt', (suggestions.join "\n")
+#+end_src
+** [API] The ~attr_gtk~ class macro now adds ~layout~ as a member variable.
+** [API] Added ~Kernel#puts(6|60|600). Using ~puts6~ will print to the console ever 6 ticks, ~puts60~ will print every second, ~puts600~ will print to the console every 10 seconds.
+** [API] Added ~Mouse#inside_rect?~.
+** [API] Added ~Geometry#center_inside_rect_(x|y)~ which only centers rects horizonally (x) or vertically (y).
+** [API] ~GTK::Layout#rect~ now accepts ~d(x|y|w|h)~ parameters.
+Example usage:
+#+begin_src ruby
+ # note: the layout is composed of 12 rows and 24 columns, rows go from top to bottom and columns go from left to right.
+ # ~args.layout.rect~ returns a rectangle represented as a ~Hash~ with ~:x~, ~:y~, ~:w~, and ~:h~.
+ # render a border at row 0, column 0, with a width 1 and height of 1
+ def tick args
+ args.outputs.borders << (args.layout.rect row: 0, # you have access to 12 rows (float values are allowed)
+ col: 0, # you have access to 24 columns (float values are allowed)
+ w: 1, # w and h are represented in cell units (not pixels)
+ h: 1)
+ end
+#+end_src
+
+Example usage with added parameters
+#+begin_src ruby
+ # render a border at row 0, column 0, with a width 1 and height of 1, but shift the rectangle by dx, dy (represented in pixels),
+ # and increase/decrease by dw, and dh (reprsented in pixels)
+ def tick args
+ def tick args
+ args.outputs.borders << (args.layout.rect row: 0, # you have access to 12 rows (float values are allowed)
+ col: 0, # you have access to 24 columns (float values are allowed)
+ w: 1, # w and h are represented in cell units (not pixels)
+ h: 1,
+ dx: -10, # after calculating, shift x by -10 pixels (left)
+ dy: 10, # after calculating, shift y by 10 pixels (up)
+ dw: 100, # after calculating, increase the w by 100 pixels
+ dh: 200) # after calculating, increase height by 200 pixels
+ end
+#+end_src
+** [OSS] ~GTK::Runtime::Autocomplete~ (the logic for suggesting autocompletions) has been open sourced.
+** [OSS] ~GTK::Runtime::Framerate~ (the logic for calculating framerate) has been open sourced.
+** [OSS] ~GTK::Layout~ (the logic to calculate aspect-ratio-aware rectangles within a 12x24 grid) has been open sourced.
+
+* 2.2
+** [Bugfix] Better support for requires for paths in nested directories.
+** [Bugfix] Better support for requires for paths outside off the app directory.
+** [Support] Added ~--test~ command line argument that will automatically start tests withouth explicitly having to call ~$tests.start~.
+Take a look at ~samples/10_advanced_debugging/03_unit_tests~ for samples.
+
+* 2.1
+** [Bugfix] Better support for nested require statements ~require~ and top level ~require~ statements that depend on ~tick_count == 0~.
+** [Bugfix] Ensure that screen remains black while nested and top level requires are being processed.
+
+* 2.0
+** [IMPORTANT] This version does NOT have any breaking changes.
+** [Pro] [API] [Audio] Sound synthesis sample app now includes square, triangle, and sawtooth wave generation.
+** [Pro] [Bugfix] [Android] Android deployment issues related to the latest SDKs have been fixed.
+** [Support] Apple Silicon publishing added.
+** [API] ~$gtk.version~ has been added and will return a ~String~ (in this case "2.0"). Assume the version is "1.0" if ~$gtk.respond_to? :version~ returns ~false~.
+** [Bugfix] ~require~ parsing improved and facilities put in place to ensure all files are required before ~tick~ is invoked.
+** [Bugfix] Flashing of background color when your game starts has been fixed. The default starting color is black.
+** [Bugfix] [Http] $gtk.http_post now works correctly with form collections.
+** [Samples] New sample app ~samples/04_physics_and_collisions/06_box_collision_3~ added that shows auto-tiling concepts with dynamically changing collisions.
+
+* 1.27
+** [Pro] [API] [Audio] Sound synthesis capabilities added.
+** [Pro] [Samples] [Audio] Added a new sample app samples/01_rendering_basics/07_sound_synthesis/ that shows how to create sine waves.
+** [Pro] [OSS] [iOS] iOS Wizard open sourced.
+** [Bugfix] Scaling issues fixed with HTML5 games.
+** [API] Added ~GTK::Runtime#openurl~ ~args.gtk.openurl(some_url)~.
+** [API] Added ~GTK::Runtime#set_window_fullscreen~ ~args.gtk.set_window_fullscreen(true|false)~.
+** [Bugfix] Sprite angles now accept float values instead of just ints.
+** [Bugfix] More accurate results for ~args.gtk.calcstringbox~.
+** [Support] Better cursor rendering in the Console.
+** [Experimental] Added component layout api (open sourced), take a look at samples/01_rendering_basics/07_sound_synthesis/ to see how it's used to layout buttons.
+** [Support] Emscripten dependencies updated (hopefully yielding better HTML5 games).
+** [OSS] [iOS] Itch Wizard open sourced.
+
+* 1.26
+** [Pro] [Samples] [C Extensions] New sample app added showing how to incorporate your own regex library: 12_c_extensions/02_intermediate
+** [Pro] [Samples] [C Extensions] New sample app added showing how to manipulate single pixels: 12_c_extensions/03_native_pixel_arrays
+** [Samples] [API] [Experimental] Added a new sample app 01_rendering/06_audio_mixer that gives you more control over sounds.
+Check out the YouTube video at [[https://www.youtube.com/watch?v=b1pL4pEWymI&ab_channel=AmirRajan]]
+** [Docs] Docs added for ~outputs.screenshots~ (thank you kfischer_okarin@discord).
+** [Support] ~trace!~ now provides timing information (thank you danhealy@discord).
+** [Support] Console now supports left and right movement of the cursor (thank you kfischer_okarin@discord).
+** [Bugfix] ~args.state~ serialization and deserialization now takes into consideration hashes that were stored by reference.
+** [API] Added ~attr~ class method that is an alias for ~attr_accessor~.
+** [API] Re-added ~args.gtk.save_state~ and ~args.gtk.load_state~ as convenience methods.
+This is what the convenience methods do:
+#+begin_src ruby
+ def save_state
+ serialize_state "game_state_#{Time.now.to_i}.txt", @args.state
+ serialize_state "game_state.txt", @args.state
+ end
+
+ def load_state
+ @args.state = deserialize_state 'game_state.txt'
+ end
+#+end_src
+** [OSS] Implementation of draw order and the underlying FFI methods have been open sourced.
+** [API] ~GTK::Runtime#console_button_primitive~
+The ~args.gtk.console_button_primitive~ is a function that returns and handles the click of a button that will render in the top right
+corner of the screen. If this button is clicked, then the console will be shown. This is useful for when you want have the console
+readily available on Desktop or if you need to bring up the console on mobile devices (mobile is available in DragonRuby Game
+Toolkit Pro only). To use this, add the following to your ~tick~ method:
+#+begin_src ruby
+ def tick args
+ args.outputs.reserved << args.gtk.console_button_primitive
+ end
+#+end_src
+The source code for this function is:
+#+begin_src ruby
+module GTK
+ class Runtime
+ def console_button_primitive
+ return nil if $gtk.production
+ return nil if @console.visible?
+
+ @console_button ||= { x: 55.from_right, y: 50.from_top, w: 50, h: 50, path: 'console-logo.png', a: 80 }.sprite
+ if @args.inputs.mouse.click && (@args.inputs.mouse.inside_rect? @console_button)
+ @args.inputs.mouse.click = nil
+ @console.show
end
+ @console_button
+ end
+ end
+end
+#+end_src
+** [Bugfix] HTML game will now be uploaded to Itch.io along with Mac, Linux, PC, and Raspberry Pi binaries.
+** [Support] Emscripten compiler has been updated.
+* 1.25
+** [Bugfix] Hash#anchor_rect wasn't working like Array#anchor_rect (now it is).
+** [API] Added Mouse#inside_circle? so you don't have to do ~args.inputs.mouse.point.inside_circle?~.
+** [Bugfix] Mac app will no longer ask to monitor keyboard input when starting.
+* 1.24
+** [Bugfix] ~GTK::Runtime#(write|append)_file~
+~$gtk.(write|append)_file in production mode will no long write to the
+app directory. You can get the write location of the file using
+~gtk.get_game_dir~.
+** [Wizard] [Experimental] Itch.io Wizard
+An Itch.io Wizard has been added to the Console as a menu button. you
+can also invoke the wizard via ~$wizards.itch.start~.
+* 1.23
+** [API] ~Numeric#randomize~
+~Numeric#randomize~ can now accept the symbol ~:int~.
+~(100.randomize :int)~ will return a random whole number between ~0~
+and ~100~ inclusive. Here are some other uses of ~Numeric#randomize~:
+#+begin_src ruby
+ 100.randomize :ratio # returns a float between 0 and 100
+ 100.randomize :ratio, :sign # returns a float between 0 and 100, but negative or positive
+#+end_src
+** [Bugfix] ~Label#size_enum~
+Fixed bug where a label's size_enum is larger than the maximum font
+size of the OS.
+** [API] ~GTK::Runtime#(write|append)_file~ ~GTK::Runtime#(write|append)_file_root~
+This is kind of a breaking change, but should actually yield a nice
+development experience. ~$gtk.(write|append)_file~ will now write to
+your game directory as opposed to writing to the process execution
+directory. To write to the process execution directory, use
+~gtk.(write|append)_file_root~.
+** [Bugfix] ~def tick args~
+The simulation will run more consistently in the event a slow ~tick~
+occurs and won't try to "catchup" (which causes the game to run very
+fast for a few ticks).
+* 1.22
+** [Samples] Console Customization
+Sample app added that shows how to add custom buttons to the
+Console. The new sample app is located at ~./samples/99_genre_dev_tools/add_buttons_to_console~
+* 1.21
+** [Bugfix] Sprite Color Saturation
+There was a bug with rgb saturations on sprites. This bug was
+terminated with extreme prejudice.
+* 1.20
+** [Bugfix] Line Colors
+The green and blue values for lines and screenshots was flipped. This
+bug was terminated with extreme prejudice.
+* 1.19
+** [Samples] Sprite Rendering Performance
+Better sample apps showing a spectrum of ways to render a lot of
+sprites. All sprite_limits samples apps were reworked.
+** [Support] Override Draw Call For Sprite
+Performance enhancements to draw calls and a means to override them
+completely if you really need to (take a look at the sprite limit
+sample apps).
+** [Support] Troubleshooting Framerate
+Added better diagnostics for performance issues. Try
+~$gtk.framerate_diagnostics~ from the console. This diagnostics
+information has been open sourced.
+** [Samples] Sample Apps Reorganized
+** [Bugfix] ~Outputs#background_color~
+Setting ~Output#background_color~ to an invalid value no longer segfaults.
+** [Docs] Searching Sample Code
+The file docs/docs.html now contains all code from the sample apps so you only have to search in one place.
+** [Samples] There are over 12,000 lines of sample code now :-)
+* 1.18
+** [Docs] Added the "Continuity of Design" to the "DragonRuby's Philosophy" section.
+** [Docs] Added all source code that has been open sourced to the docs.html.
+** [Support] ~$gtk.reset~ Enhancements
+~$gtk.reset~ now resets the grids origin back to bottom left by
+calling the ~args.grid.origin_bottom_left!~ method.
+** [API] ~Numeric#from_top~
+Added ~Numeric#from_top~ so that it's easier to position primitives:
+#+begin_src ruby
+ args.outputs.labels << [10, 10.from_top, "hello world"]
+#+end_src
+** [API] ~Object::attr_gtk~, ~Object::attr_sprite~, ~Object::attr_rect~ as instance methods.
+** [API] ~Mouse#inside_rect?~
+Added ~Mouse#inside_rect?~ (~args.inputs.mouse.inside_rect?~) which
+delegates to ~args.inputs.mouse.point.inside_rect?~.
+** [Support] Added a collection of menu buttons for common tasks to DragonRuby Console.
+* 1.17
+** [MacOS] Updated minimum OS support to include MacOS 10.9+ (really I swear this time it's fixed definitely, maybe).
+* 1.16
+** [Bugfix] Fixed bug in HTML5 template that would cause an exception when releasing to Itch.
+* 1.15
+** [Support] Rendering Enhancements
+Rendering and simulation have been decoupled which will allow fps to
+be unbounded. ~tick~ will still run at 60 hz (we just render as fast
+as the platform allows).
+* 1.14
+** [Support] HTML5 Template Updated
+Better HTML5 template. Additional JS events added to handle loss of
+keyboard input within an iframe.
+** [Bugfix] ~args.outputs.screenshots~ regression fixed.
+** [Docs] Added documentation for a few more ~Numeric~ methods.
+** [Samples] Animation Creator
+Brand new advanced sample app: 99_sample_sprite_animation_creator. The
+sample app uses ~args.outputs.screenshots~ and ~render_targets~
+heavily along with in memory queues as a means to consolidate events
+coming from different parts of the app.
+* 1.13
+** [API] Sprite angle now accepts fractional degrees.
+** [Samples] Better font added to LOWREZJAM 2020 template.
+** [API] ~args.outputs[RENDER_TARGET_NAME]~
+Added ~args.outputs[RENDER_TARGET_NAME]~ as an alias to
+~args.render_target(RENDER_TARGET_NAME)~. Either of the following will
+work:
+#+begin_src ruby
+ def tick args
+ if args.state.tick_count == 1
+ args.render_target(:camera).width = 100
+ args.render_target(:camera).height = 100
+ args.render_target(:camera).solids << [0, 0, 50, 50, 255, 0, 0]
end
- def tick args
- $game.args = args
- $game.grid = args.grid
- $game.state = args.state
- $game.outputs = args.outputs
- $game.gtk = args.gtk
- $game.passes = args.passes
- $game.tick
+ if args.state.tick_count > 0
+ args.outputs.sprites << { x: 0,
+ y: 0,
+ w: 500,
+ h: 500,
+ source_x: 0,
+ source_y: 0,
+ source_w: 50,
+ source_h: 50,
+ path: :camera }
end
- ```
+ end
- You can now do:
+ $gtk.reset
+#+end_src
- ```
- class Game
- gtk_args
- attr_accessor :current_scene, :other_custom_attrs
+Is the same as:
- def tick
- end
+#+begin_src ruby
+ def tick args
+ if args.state.tick_count == 1
+ args.outputs[:camera].width = 100
+ args.outputs[:camera].height = 100
+ args.outputs[:camera].solids << [0, 0, 50, 50, 255, 0, 0]
end
- def tick args
- $game.args = args
- $game.tick
+ if args.state.tick_count > 0
+ args.outputs.sprites << { x: 0,
+ y: 0,
+ w: 500,
+ h: 500,
+ source_x: 0,
+ source_y: 0,
+ source_w: 50,
+ source_h: 50,
+ path: :camera }
+ end
+ end
+
+ $gtk.reset
+#+end_src
+* 1.12
+** [Samples] New LOWREZ Sample
+LOWREZ Jam sample app reworked in preparation for LOWREZ Jam 2020
+(starts on August 1st so hurry and join).
+** [Docs] ~GTK::Mouse.docs~
+Docs added for GTK::Mouse, you can access them via the Console by typing ~GTK::Mouse.docs~ or ~$gtk.args.inputs.mouse.docs~.
+** [MacOS] Updated minimum OS support to include MacOS 10.9+.
+* 1.11
+** [Bugfix] Fixed error in ~docs_search "TERM"~.
+* 1.10
+** [Support] Documentation infrastructure added (take a look at docs/docs.html).
+Bring up the DragonRuby Console.
+To search docs you can type ~docs_search "SEARCH TERM"~
+If you want to get fancy you can provide a ~lambda~ to filter documentation:
+#+begin_src ruby
+ docs_search { |entry| (entry.include? "Array") && (!entry.include? "Enumerable") }
+#+end_src
+** [Bugfix] ~Sprite#source_(x|y|w|h)
+Fixed sprite rendering issues with source_(x|y|w|h) properties on
+sprites.
+** [Support] Removed Double Buffering
+Removed double buffering of game if framerate drops below 60
+fps. There have been quite a few performance enhancements that make
+this method unneeded (plus there will be future enhancments to
+rendering).
+** [Support] Console Scroll Wheel Support
+Console now supports mouse wheel scrolling.
+** [Support] One Time Notification Clean Up
+One time notifications have less noise/easier to read.
+** [Bugfix] Orphaned ~app~ Directory
+Rogue ~app/main.rb~ directory will no longer be created if you run a sample app.
+* 1.9
+** [Bugfix] HTTP on windows should now work, for real this time.
+** [Bugfix] Non-720p render targets now use correct coordinate system.
+* 1.8
+** [Bugfix] HTTP on windows should now work.
+** [Bugfix] ~even?~ and ~odd?~ return the correct result for Fixnum.
+** [Bugfix] ~args.intputs.mouse_wheel~ now reports the delta change in x and y correctly.
+** [Bugfix] Improved analog joystick accuracy when converting to percentages.
+** [Support] Console Tab Completion
+Incorporated pull request from https://github.com/kfischer-okarin that adds autocompletion to the Console.
+This is the PR:
+ - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/da0fdcfbd2bd9739fe056eb646920df79a32954c
+ - https://github.com/DragonRuby/dragonruby-game-toolkit-contrib/commit/99305ca79118fa0704c8681f4019738b8c7a500d
+* 1.7
+** [BREAKING] ~args.inputs.mouse.wheel.point~
+~args.inputs.mouse.wheel.point~ is gone. Use args.inputs.mouse.x and
+.y if you need cursor position.
+** [BREAKING] ~args.inputs.mouse.wheel.(x|y)~
+~args.inputs.mouse.wheel.(x|y)~ now represent the amount the
+mousewheel/trackpad has moved since the last tick and not the mouse
+cursor position. Use args.inputs.mouse.x and .y if you need cursor
+position.
+* 1.6
+** [API] ~Sprite#source_(x|y|w|h)~
+~Sprite~ now supports source_(x|y|w|h). These properties are
+consistent with the origin being in the bottom left. The existing
+properties tile_(x|y|w|h) assumes that origin 0, 0 is in the top
+left. The code below will render the same sprite (in their respective
+coordinate systems):
+#+begin_src ruby
+ # using tile_(x|y|w|h) properties
+ args.outputs.sprites << { x: 0,
+ y: 0,
+ w: 1280,
+ h: 100,
+ path: :block,
+ tile_x: 0,
+ tile_y: 720 - 100,
+ tile_w: 1280,
+ tile_h: 100 }
+#+end_src
+
+is equivalent to:
+
+#+begin_src ruby
+ # using source_(x|y|w|h) properties
+ args.outputs.sprites << { x: 0,
+ y: 0,
+ w: 1280,
+ h: 100,
+ path: :block,
+ source_x: 0,
+ source_y: 0,
+ source_w: 1280,
+ source_h: 100 }
+#+end_src
+Note: if you provide both tile_(x|y|w|h) and source_(x|y|w|h). The
+values of tile_ will "win" so as not to break existing code out
+there.
+** [Bugfix] Duplicate Requires
+Updated require to remove duplicate requires of the same file (or
+files that have recently been required).
+** [Bugfix] Strict Entities Serialization
+Strict entities of different types/names serialize and deserialize
+correctly.
+** [Samples] Render Targets with Alphas
+Updated render targets sample app to show two render targets with
+transparencies. No really, render targets now have a transparent
+background and respect opacity.
+* 1.5
+** [API] ~$gtk.(show|hide)_cursor~
+Added ~$gtk.show_cursor~ and ~$gtk.hide_cursor~ to show and hide the mouse
+cursor. The function only needs to be called once. EG:
+#+begin_src ruby
+ def tick args
+ args.gtk.hide_cursor if args.state.tick_count == 0
+ end
+#+end_src
+The Jam Craft 2020 sample app updated to have more comments and demonstrate a custom mouse cursor.
+* 1.4
+** [Bugfix] ~$gtk.reset~
+Adding $gtk.reset at the bottom of main.rb will no longer cause an infinite loop.
+** [Samples] Jam Craft 2020.
+* 1.3
+** [Samples] Added Better Help Text/Explanations
+* 1.2
+** [Bugfix] Top-level require statements within main.rb will load before invoking the rest of the code in main.rb.
+** [Samples] Better keyboard input sample app.
+** [Samples] New sample app that shows how to use Numeric#ease_spline.
+** [Bugfix] Fixed "FFI::Draw cannot be serialized" error message.
+* 1.1
+** [Bugfix] Fixed exception associated with providing serialization related help.
+** [Bugfix] Fixed comments on how to run tests from CLI.
+** [Support] More helpful global variables added. Here's a list:
+ - $gtk
+ - $console
+ - $args
+ - $state
+ - $tests
+ - $record
+ - $replay
+** [API] inputs.keyboard.key_(down|held|up).any? and inputs.keyboard.key_(down|held|up).all? added.
+** [Support] Recording gameplay and replaying streamlined a bit more. GIVE THE REPLAY FEATURE A SHOT! IT'S AWESOME!! Bring up the console and run: $record.start SEED_NUMBER.
+** [Support] Bringing up the console will stop a replay if one is running.
+* 1.0
+** [News] DragonRuby Game Toolkit turns 1.0. Happy birthday!
+** [Bugfix] args.state.new_entity_strict serializes and deserializes correctly now.
+** [BREAKING] Entity#hash has been renamed to Entity#as_hash so as not to redefine Object#hash. This is a "private" method so you probably don't have to worry about anything breaking on your end.
+** [BREAKING] gtk.save_state and gtk.load_state have been replaced with gtk.serialize_state and gtk.deserialize_state (helpful error messages have been added).
+** [Support] Console can now render sprites (this is still in its early stages). Try $gtk.console.addsprite(w: 50, h: 50, path: "some_path.png").
+** [API] Render targets now have a transparent background and respect opacity.
+** [API] Render targets can be cached/programatically created once and reused.
+** [Samples] A new render target sample app has been created to show how to cache them.
+** [Samples] Easing sample app reworked/simplified.
+** [Support] GTK will keep a backup of your source file changes under the tmp directory. One day this feature will save your ass.
+* release-20200301
+** [Samples] Added sample app that shows how you can draw a cubic bezier curves.
+** [Support] Keyup event prints key and raw_key to the console.
+** [Support] Circumflex now opens the console.
+* release-20200227
+** [Bugfix] Game will now auto restart in the event of a syntax error.
+** [Samples] Sample app added to show how to use a sprite sheet for sprite animations: 09_sprite_animation_using_tile_sheet.
+** [Samples] Sample app added to show how to use a tile sheet for a roguelike: 20_roguelike_starting_point_two.
+** [Samples] Example code added to show how sort an array with a custom sort block: 00_intermediate_ruby_primer/07_powerful_arrays.txt
+** [OSS] The following files have been open sourced at https://github.com/DragonRuby/dragonruby-game-toolkit-contrib:
+ - modified: dragon/args.rb
+ - new file: dragon/assert.rb
+ - new file: dragon/attr_gtk.rb
+ - modified: dragon/console.rb
+ - new file: dragon/docs.rb
+ - new file: dragon/geometry.rb
+ - new file: dragon/help.rb
+ - modified: dragon/index.rb
+ - modified: dragon/inputs.rb
+ - new file: dragon/log.rb
+ - new file: dragon/numeric.rb
+ - new file: dragon/string.rb
+ - new file: dragon/tests.rb
+ - new file: dragon/trace.rb
+** [Support] Added isometric placeholder sprites.
+** [Support] Added $gtk.reset_sprite 'path' to refresh a sprite from the file system (while the game is running). Future releases will automatically auto load sprites but you can use this to reload them on demand.
+* release-20200225
+** [Bugfix] Fixed macOS compatibility back to Mac OS X 10.9 or so.
+* release-20200224
+** [Bugfix] Some of the deprecation notices where throwing an exception. This has been fixed.
+** [API] $gtk.system(cmd) has been added. You'll find this helpful for running cli programs from Heads Up Display. It's probably not a good idea to use this in a production game (since you'll be responsible for making sure it works on all platforms).
+* release-20200218
+** [API] Enhanced screenshotting api that can be used for image manipulation. Take a look at the painting sample app.
+Example usage:
+#+begin_src ruby
+ args.outputs.screenshots << [0, 0, 100, 100, 'bottom-left-corner.png']
+#+end_src
+** [BREAKING] Outputs#static_background_color has been renamed to Outputs#background_color.
+** [API] Outputs#debug and Outputs#static_debug layer has been added. You can use this layer to draw all your guide lines and helper primitives. When the game is published, this layer will not render.
+* release-20200217
+** [Bugfix] ~dragonruby-publish~ would only build html5. It now builds all of the platforms again. Ryan has given Amir a warning and has told him to be more careful releasing. Amir cackled in defiance.
+* release-20200213
+** [API] Added Float#pos? and Float#neg?.
+** [Samples] Sample added to show how to use directional_vector and sprite sheets.
+** [Samples] Updated 01_api_01_labels sample app to show how to render a label as an array or hash.
+** [Bugfix] Fixed incorrectly named value for labels in 11_hash_primitives sample app.
+* release-20200211
+** [API] Added ~args.inputs.directional_vector~ and ~args.inputs.(keyboard|controller_one|controller_two).directional_vector~. The sample app to demonstrate the use of this feature is pending.
+** [API] Added Numeric#pos? and Numeric#neg?.
+** [Bugfix] Fixed looping issues with ogg files and popping issues with playing sounds in general.
+** [Bugfix] ~args.gtk.console.toast :message, "some message"~ would fail because of an invalid method name.
+** [News] Amir (the CEO of DragonRuby LLP) wrote a 2019 year end review. You can read it here: http://www.rubymotion.com/news/2020/01/02/year-end-review.html.
+** [News] Expect the frequency of updates of GTK to increase. Ryan let Amir have the deployment passwords, so the rate limiter is now gone :3
+* release-20200202
+** [API] Hash now supports :scale_rect.
+** [Samples] Added sample app that shows how to create a hexagon based grid.
+** [Support] Initial work on CHEATSHEET.txt.
+** [API] Added args.inputs.keyboard.ctrl_* which will return true if Ctrl is combined with another key.
+** [API] Added args.inputs.click (which only returns the point or nil).
+** [API] Added Numeric#even? and Numeric#odd?.
+** [API] Added Geometry#point_inside_circle?(point, circle_point, radius).
+* release-2020130
+** [Performance] Rendering api optimizations. Initial tests show that DragonRuby Game Toolkit can now render more sprites (and calculate more collisions) than Unity 2D. Checkmate.
+** [Support] Fixed documentation for labels (the hash properties are called size_enum, and alignment_enum). The documentation can be found under mygame/documentation.
+** [Support] Improved help text for exceptions related to ambiguous use of primitives.
+** [Bugfix] Requiring multiple ruby files will no long "blip" an exception on startup.
+* release-20191201
+** [Samples] Added sample game called The Little Probe that demonstrates line collision.
+** [Samples] Experiments with squares and cubes in 3D.
+** [Support] HTML5 games now package a favicon.
+** [Samples] [Support] Quite a few of the sample apps have been updated to include an api listing at the top (expansion of documentation).
+** [API] Initial work for http has been created. Take a look at the http sample app to see how to use it. Take a look at ~samples/99_zz_gtk_unit_tests~ for a test suite that asserts async http.
+** [Support] [Samples] Added a sample app that shows how create collision detection associated with constraint points against a ramp. This sample app also demonstrates the use of ~gtk.slowmo!~ which you can use the slow down the tick execution of your game to see things frame by frame (still experimental).
+** [Support] Added sprites to default template folder. The sprites are ~sprites/square-COLOR.png~ and ~sprites/circle-COLOR.png~ where the colors are of the rainbow ROY G. BIV (eg ~sprites/square-red.png~).
+** [Sample] Added a sample app that shows how to use the ~static_sprites~ rendering api which is the fastest way to render a sprite (but also hangs on the instances by reference as opposed to treating the collection as a queue... a trade off between immutablility and speed).
+** [API] Added the ~attr_sprite~ class macro which can be mixed into a class so that it quacks like a sprite. The Sprite Limits sample app has been updated to use this macro.
+** [Support] In the event of an exception, the class hierarchy for the object that threw the exception is provided.
+** [Support] In the event of a :method_missing exception, the instance's API is searched for methods that look like the one you were trying to call. Those recommendations are printed to the console.
+** [Samples] [Support] Significant enhancements have been made to the test harness. Take a look at ~samples/99_zz_gtk_unit_tests~ to see some of the test suites that are being fleshed out. These test suites are used as regression during builds. More will come.
+** [Samples] Unit tests added for geometry apis.
+** [Samples] Unit tests added for parsing json and xml.
+** [Bugfix] HTML5 builds no longer fail at startup with an audio initialization error message.
+** [Bugfix] The $gtk.write_file API change was a mistake. The actual bug it was meant to resolve has been fixed. The responsible parties have been brutally disciplined.
+** [BREAKING] ~gtk_args~ class macro has been renamed to ~attr_gtk~. This is a little easier to remember because it follows the same pattern as ~attr_accessor~.
+** [BREAKING] ~PRIMITIVE.w(idth)_half~ and ~PRIMITIVE.h(eight)_half~ have been deprecated. Use ~PRIMITIVE.w.half~ (Numeric#half).
+** [BREAKING] ~PRIMITIVE.angle_given_point~ has been deprecated. Use ~PRIMITIVE.angle_from~.
+** [API] ~PRIMITIVE.angle_to~ has been added. Take a look at ~samples/99_zz_gtk_unit_tests~ for usages.
+** [BREAKING] ~intersects_rect?~ with an ~s~ has been deprecated. Use ~intersect_rect?~ instead.
+NOTE: Ruby's naming convention is to generally *not* include the
+\"s\" for interrogative method names (methods that end with a ?
+[question mark]). It doesn't sound grammatically correct, but that
+has been the rule for a long time (and why intersects_rect? has
+been deprecated).
+** [Samples] Added a white label version of Clepto Frog, a Ludam Dare game built by Amir, Karen, and Rye. You can see the final version (with all assets) here: https://amirrajan.itch.io/clepto-frog. The code is horrible. Who wrote this crap?
+** [Bugfix] Fixed looping issues with ~.ogg~. The follow statement will now correctly work:
+#+begin_src ruby
+ def tick args
+ if args.state.tick_count == 0
+ args.outputs.sounds << 'sounds/sample.ogg'
+ end
+ end
+#+end_src
+** [API] Added ~args.gtk.stop_music~ to stop all looping music.
+** [API] Added ~args.geometry~ which contains stateless functions that exist on primitives. For a full listing of methods open up the console and type ~args.geometry.help~. A lot of these methods are exercised in the ~samples/99_zz_gtk_unit_tests~ test suite.
+** [Support] The --no-tick switch for ./dragonruby will now hide the game window (it's a good way to run "headless" unit tests/regressions suites). Usage: ~./dragonruby mygame --eval some_ruby_file.rb --no-tick~.
+** [BREAKING] gtk.on_ticks has been deprecated, use the better named gtk.scheduled_callbacks instead.
+** [BREAKING] gtk.on_tick TICKCOUNT { BLOCK } has been deprecated, use the better named gtk.schedule_callback TICKCOUNT { BLOCK } instead.
+* release-20190930
+** [Samples] Added sample app that shows how trace can be used within a class.
+** [Support] Added $gtk.log_level. Valid values are :on, :off. When the value is set to :on, GTK log messages will show up in the DragonRuby Console *AND* be written to logs/log.txt. When the value is set to :off, GTK log messages will *NOT* show up in the console, but will *STILL* be written to logs/log.txt
+** [API] Added args.inputs.mouse.(click|up|down).(x|y) so you don't have to do args.inputs.mouse.click.point.
+** [Support] You can change your window title at runtime with $gtk.set_window_title('new title'). YOU MUST SET UP YOUR GAME'S METADATA CORRECTLY EVEN IF YOU USE THIS FUNCTION.
+** [Support] The macOS build is now compiled with Link-Time Optimization, as an experiment, which makes your games a little faster and your downloads a little smaller.
+** [Support] We've split the open source licenses out of README.txt to their own file, which is packaged with your games, to be a good citizen of the world. If you add other open source stuff, just copy open-source-licenses.txt into your game's folder and add your own stuff to it; that will package with your game instead of the original text file.
+** [Support] Added JSON parsing. Try $gtk.parse_json(myJsonString) or $gtk.parse_json_file(filename)
+** [Support] Added XML parsing. Try $gtk.parse_xml(myXmlString) or $gtk.parse_xml_file(filename)
+** [BREAKING] There is a new replay data format that is less crappy. But it breaks existing replay data. You'll need to re-record your replays (sorry T_T). To record a replay of gameplay, you can run ./dragonruby mygame --record. When you close the game, a file called last_replay.txt will be created. You can re-run a replay as a means to perform visual regression using ./dragonruby mygame --replay last_replay.txt
+** [Support] Added a --production command line option for running an unpublished game as if it were published.
+** [Support] We now offer bleeding edge builds on the "experimental" channel on itch.io. If you want those, go to where you downloaded this package, and look for the "experimental" download instead. These are expected to be less stable and pushed as we need to test things out or hotfix a bug that isn't ready to roll into an official release. If this is your jam, though, go for it.
+** [OSS] Thank you to StardragonEX, phaedryx, and pusewicz for contributing to GTK documentation located at github.com/DragonRuby/dragonruby-game-toolkit-contrib.
+** [Support] Enabling trace! on an object now outputs all trace data to a file as opposed to just standard out. This will make trace debugging significantly more useful to developers that don't have a high-buffer-history terminal running.
+** [Samples] Added platformer that deals with moving objects, jumping, and dealing with inertia.
+** [Samples] Added sample showing how to render an isometric grid (like Into The Breach).
+** [Samples] Sample added showing how to use trace! debugging when you are having trouble with why an exception is being thrown.
+** [Samples] Many of the sample apps have had their methods reorganized for consistency in reading. They also have comments added to them.
+** [Experimental] If the game has been running for over a minute, and cannot keep a stable 60 fps, the game's rendering will be skipped every other frame to save process cycles (tick method will still execute as fast as possible, but results from them method will only be rendered at 30 fps).
+* release-20190912
+** [Bugfix] dragonruby-publish now correctly builds HTML5 packages when there's a "'" character in the game's name (etc).
+** [Bugfix] dragonruby-httpd now serves paths with spaces in them correctly.
+** [Bugfix] dragonruby-publish now ignores __MACOSX directories (trash that macOS tends to generate when you double-click a .zip file to unpack it from the Finder).
+* release-20190909
+** [Bugfix] HTML5 builds' "click-to-play" UI now scales the icon.
+** [Bugfix] args.gtk.writefile(path, content [, write_to_game_dir = true]) now writes file to the game folder as opposed to the root directory. If you need to write to the root directory provide false as the third parameter to write file.
+** [Experimental] There is now a special file in mygame called mailbox.rb. When ~args.gtk.suppress_mailbox = false~, mailbox.rb will be checked for changes at a high frequency (10 times a second). Because this an experimental feature, the default value of ~args.gtk.suppress_mailbox~ is TRUE. You can use this file as a means to communicate with GTK between process. There is a sample app that shows how to use the mailbox.rb file.
+** [Support] You can now have multiple mouse buttons! args.inputs.mouse.click and .up will still be set if there was a mouse button change for the current tick, but you should look at args.inputs.mouse.button_left (or _middle or _right or _x1 or _x2) as a bool to see if it's currently pressed down. More than one might be pressed, and more than one button might have changed in the one .click you'll get. The same is true for .up
+** [Support] You can now see the mouse wheel (or your trackpad pretending to be a mouse wheel when you stroke it appropriately)! All wheel input since the last tick is added together. You can check if args.inputs.mouse.wheel isn't nil to decide if the wheel has moved for this tick.
+#+begin_src ruby
+ m = args.inputs.mouse
+ if m.wheel
+ puts("The wheel moved #{m.wheel.x} left/right and #{m.wheel.y} up/down")
+ end
+#+end_src
+* release-20190829
+** [Community] Discord link: http://discord.dragonruby.org and Youtube link: http://youtube.dragonruby.org.
+** [Support] Plugging in an unrecognized controller will now make DragonRuby pop up a UI to let the user configure it. During this time your game will receive no tick calls and so will be effectively paused. It resumes once the user has configured the controller or abandoned it. This is a work in progress, but we already think it's pretty cool.
+** [Experimental] [Advanced] You can start up ./dragonruby by passing in --eval file_path. The file passed in will execute on startup. Additionally you can pass in --eval file_path --no-tick which will exit ./dragonruby immediately after loading all source, and running the file passed to eval.
+** [Experimental] [Advanced] ~on_tick~ callback has been added to $gtk. This can be used to run some form of automation. For example, you can run the Dueling Starships sample app with the following inside of repl.rb.
+#+begin_src ruby
+ # Reset the game and sent the RNG seed to 100
+ $gtk.reset 100
+
+ # Remove any existing callbacks.
+ $gtk.on_ticks.clear
+
+ # One second into the game, hold down the right directional
+ # on controller one.
+ $gtk.on_tick 60 do
+ $gtk.args.inputs.controller_one.key_held.right = true
+ end
+
+ # On frame 80, release the right directional, and
+ # hold down R1.
+ $gtk.on_tick 80 do
+ $gtk.args.inputs.controller_one.key_held.right = false
+ $gtk.args.inputs.controller_one.key_up.right = true
+ $gtk.args.inputs.controller_one.key_held.r1 = true
+ end
+#+end_src
+There is a full blown automation script under samples/00_beginner_ruby_primer/automation.rb ./samples/00_beginner_ruby_primer $ ../../dragonruby . --eval app/automation.rb
+** [Support] Exceptions ~game_state_*.txt~ files are now written to an exceptions directory instead of cluttering up the root.
+** [Support] Launching dragonruby with --fullscreen on the command line makes the game fullscreen.
+** [Support] Launching dragonruby-publish from any directory with no command line arguments and without a "mygame" folder in the current working directory will cause it to look for "mygame" in the same directory as dragonruby-publish itself. Which is to say: it'll work in the default configuration if you double-click it from the macOS Finder.
+** [Samples] New sample app called 02_collisions_02_moving_objects has been added.
+** [Support] Previous console messages are subdued if unhandled exception is resolved. This removes visual confusion if another exception is thrown (easier to determine what the current exception is).
+** [Support] Added api documentation about truthy_keys for keyboards and controllers.
+** [API] [Experimental] Hashes now quack like render primitives. For example some_hash[:x] is the same as some_hash.x and can be interchangeable with some_array.x (this is a work in progress so there may be some geometric/collision apis that aren't covered).
+** [Support] Usability of Console and it's interaction with repl.rb is SIGNIFICANTLY better. Take a look at the new repl.rb file under mygame/repl.rb to see an interactive crash course of Ruby that shows how to use variables, functions, conditionals, loops, and arrays. Special thanks to @raulrita (https://www.twitch.tv/raulrita) for live streaming and bringing light to these enhancements.
+** [Support] ~puts~ statements that begin with "====" are rendered as teal in the Console. This provides a visual separation that will help with print line debugging.
+** [OSS] The DragonRuby Game Toolkit Console has been open sourced under an MIT license. You can find it here: https://github.com/DragonRuby/dragonruby-game-toolkit-contrib
+* release-20190823
+** [Support] The mygame directory now contains a documentation folder that provides high level APIs for the engine (it's a work in progress, but a good starting point).
+** [Samples] A sample app called "hash primitives" has been added that shows how you can use a Hash to render a primitive. This will make specifying sprite's advanced properties much easier.
+** [Samples] The sprite limits sample app shows how you can ducktype a class and render it as a sprite. Doing this is a tiny bit more work, but there is a huge performance benefit.
+** [Bugfix] Internal limits total textures/render targets/fonts is removed.
+** [BREAKING] args.dragon has been deprecated, you must now use the new property args.gtk.
+** [BREAKING] args.game has been deprecated, you must now use the new property args.state.
+** [BREAKING] args.gtk.root has been removed and all attributes have been moved to args.gtk.
+** [BREAKING] args.gtk(.root).mouse_focus has been removed, use args.inputs.mouse.has_focus.
+** [BREAKING] args.gtk(.root).keyboard_focus has been removed, use args.inputs.keyboard.has_focus.
+** [BREAKING] $dragon has been removed, you must now use $gtk.
+** [BREAKING] $view has been removed and functionality has been moved to $gtk, use that variable instead.
+* release-20190816
+** [Bugfix] HTML5: Fixed crash on startup on Chrome if the game's icon isn't tiny.
+** [Samples] Added sample app that shows how you can make a paint app (05_mouse_move_paint_app).
+** [Samples] Added sample app that shows how you can make a tile editor (05_mouse_move_tile_editor).
+** [Samples] Added LOWREZ Jam 2019 game that Amir built: Return of Serenity (99_sample_game_return_of_serenity).
+** [Samples] Added Metroidvania sample app which is a great starting point for the "Metroidvania Month" Jam on Itch.io.
+** [Support] :ordinal_indicator (º) character added to args.inputs.keyboard. It can be used to bring up the GTK console.
+* release-20190813
+** [Samples] Added sample app that shows off controller input.
+** [API] ~args.inputs.keyboard.key_down.delete~ is now available and works in the GTK console.
+** [Bugfix] Requiring a ruby file that doesn't exist will return an error instead of crashing.
+** [Support] Console coloring added for exceptions.
+** [Support] When running trace!, if an exception occurs. The last method invoked will be provided in the details.
+* release-20190806
+** [Bugfix] Having $gtk.reset at the bottom of your main.rb will not cause a recursive require of all files.
+** [Support] In the event of an exception, the source code will not be searched if the search term is less than three characters.
+** [Samples] A Roguelike starting point sample app has been added.
+** [Support] If a primitive rendering fails, the primitive type will now be included with the exception.
+** [API] The property ~args.outputs.static_background_color = [0, 0, 0]~ is now exposed. This allows you to control the color of the letterbox around your game. Some of the sample apps have been updated to use this property (for example Dueling Starships).
+* release-20190803
+** [Bugfix] ~gtk_attr~ now included the ~inputs~ attr_accessor.
+** [Website] The initial version of http://fiddle.dragonruby.org has been created. Try it out.
+** [Support] Eight new beginner sample apps have been added which breakdown the tech demo into consumable pieces (with comments).
+** [Support] The two introductory Ruby primers now contain links to video tutorials that you can use to follow along.
+** [Support] A game/sample app called Snakemoji has been added. Game development should be fun and about experimentation. This sample app was certainly built in the spirit of this. A big thank you to Anton K. (ai Doge) for this contribution.
+** [Support] Added $gtk.trace!(an_object) which will detailed print execution information. This should make it much easier to track down exceptions.
+** [Support] All source files are auto reloaded on save or when $gtk.reset is executed.
+** [Support] § (:section_sign) can now be used to open up the DragonRuby GTK Console.
+* release-20190731
+** [Bugfix] Fixed bug in DragonRuby console returning evaled value.
+** [Support] Updated collisions sample app with comments.
+** [Support] Added comments for sprite animation sample app.
+** [Support] dragonruby-publish will look for your game in the "mygame" directory if not otherwise specified on the command line.
+** [Support] dragonruby-publish now puts packaged builds in "builds" directory instead of ".dragonruby/builds" so you can actually find them.
+* release-20190712
+** [Bugfix] dragonruby-publish ignores .git/.hg/.svn directories.
+* release-20190711
+** [Bugfix] Bug fix for Easing module rename. Sorry about that!
+** [Typo] Fixed grammar in sprite limits explanation.
+* release-20190709
+** [Bugfix] Text scaling now works on Windows. Resize the window and your fonts should stay crisp now!
+** [Bugfix] dragonruby-httpd on Windows now has proper EXE metadata.
+** [API] Commonly used properties on ~args~ are now accessible as top level methods:
+#+begin_src ruby
+ def tick args
+ args.(solids|sprites|lines|labels|borders|
+ click|click_at|mouse|controller_one|controller_two|
+ keyboard)
+ end
+#+end_src
+** [BREAKING] ~args.game~ has been deprecated is favor of the better named property ~args.state~.
+** [Support] DragonRuby GTK Console now accepts input immediately (specifically while it's animating).
+** [API] Class macro ~gtk_args~ has been added. Instead of having to do:
+#+begin_src ruby
+ class Game
+ attr_accessor :args, :grid, :state, :inputs, :outputs, :gtk, :passes,
+ :current_scene, :other_custom_attrs
+
+ def tick
+ end
+ end
+
+ def tick args
+ $game.args = args
+ $game.grid = args.grid
+ $game.state = args.state
+ $game.outputs = args.outputs
+ $game.gtk = args.gtk
+ $game.passes = args.passes
+ $game.tick
+ end
+#+end_src
+
+You can now do:
+
+#+begin_src ruby
+ class Game
+ gtk_args
+ attr_accessor :current_scene, :other_custom_attrs
+
+ def tick
end
- ```
- * [API] [BREAKING] The globally accessible GTK Runtime has been renamed `$dragon` to
- `$gtk` (you can still use $dragon for now, but it is strongly
- recommended that you update your usages to $gtk).
- * [API] A new entity type has been introduced and is accessible via `args.state.new_entity_strict`
- the usage of StrictEntity over OpenEntity (`args.state.new_entity`) yield significantly faster
- property access. The downside is that `args.state.new_entity_strict` requires
- you to define all properties upfront within the implicit block. You will receive
- an exception if you attempt to access a property that hasn't be
- pre-defined. For usage info and performance differences, take a look at the Sprite Limit
- sample app.
- * [Support] Exception messages have been significantly improved. Hashes and Type .to_s
- information is well formatted. "stack too deep" exceptions resolved.
- * [API] [BREAKING] `args.outputs.PRIMITIVES +=` is no longer supported. Use `args.outputs.PRIMITIVES <<`
- for all concatenation of primitives to the outputs collection (trying to pick between += and << was confusing,
- we settled on <<).
- * [Support] Framerate warnings wait 10 seconds before calculating the moving average. If your
- framerates begin to drop, consider using `args.state.new_entity_static` for game structures that have been
- fleshed out.
- * [Performance] Rendering of primitives is can support over twice as many sprites at 60 fps (see Sprite Limits
- sample app for demonstration).
- * [Support] Headless testing has been added. Take a look at the Basic Gorillas sample app to see
- how headless testing can help you dial into frame-by-frame problems within your game.
- * [Samples] The "Controller Analog Usage Advanced Sprites" sample
- app now has a helper function with named parameters to create the
- sprite. For example, if you needed to flip a sprite vertically,
- you'd have to do the following:
-
- ```
- args.outputs.sprites << [0, 0, 100, 100,
- 'fighter.png',
- 0,
- 255, 255, 255, 255,
- 0, 0, -1, -1, false, true]
- ```
-
- With the helper method, you can write the following:
-
- ```
- args.outputs.sprites << create_sprite(x: 0, y: 0, w: 100, h: 100, vflip: true)
- ```
-
- We're still chewing on the API above before it gets integrated
- into GTK proper.
- * [API] "Superscript Two" can be used to bring up the DragonRuby
- Console. People with international keyboards (which don't have a ~
- key) can now use the `superscript_two` key (which is in the same
- place as the ~).
- * [API] All keyboard attributes now have a `!` variant which will
- clear the key if the value was true. Example:
-
- ```
- args.inputs.keyboard.key_down.up # returns true
- args.inputs.keyboard.key_down.up # still returns true
- ```
-
- VS
-
- ```
- args.inputs.keyboard.key_down.up! # returns true
- args.inputs.keyboard.key_down.up # now returns false for the rest of this tick
- ```
- * [Samples] Added a sample app called "Sprite Animation and Keyboard
- Input" that shows how to do repeating and one-time sprite
- animations driven by keyboard input.
- * [Samples] All sample apps have the MIT License added to them (to
- remove any ambiguity with regards to if you can use them for
- commercial purposes).
- * [HTML5] Games published to HTML5 now has a loading progress bar.
- * [Samples] Added sample app called "Coordinate Systems" that show
- the two coordinate systems supported by the GTK.
- * [API] `args.inputs.mouse` now respects `args.dragon.origin_center!`.
- * [Samples] Added two sample apps called "Collision" and "Collision
- and Entities" that show how to perform collision detection with
- draw primitives and `args.state.new_entity`.
- * [Samples] Added an interactive sample app called "Beginner Ruby
- Primer" that does a better job of introducing you to the language.
- * [Samples] [Video] Amir facilitated a workshop at a local user
- group. The source code for the workshop is located in a sample app
- called "NDDNUG Workshop". The video was recorded and you can use
- that to code along: (https://www.youtube.com/watch?v=S3CFce1arC8).
- * [Bugfix] Windows and Mac icon generation in dragonruby-publish was
- broken in the previous build. Sorry! Fixed now.
- * [Bugfix] DragonRuby binaries are now codesigned on macOS. We are still
- working on signing games packaged by dragonruby-publish, but stay tuned!
-
-= release-20190604 =
-
- * [BREAKING] `perc_to_zero` and `perc_to_one` have been deprecated
- and now throw and informative exception that will help you fix the
- problem. Moving forward, you'll need to use the new `lerp` APIs
- (details further down).
- * [BREAKING] `intersects_rect?` now takes in an optional parameter
- called `tolerance`. This parameter's default is set to `0.1`. The
- original tolerance value was set to `0`. So if you still want a
- tolerance of `0`, you'll need to update your `intersect_rect?`
- calls to: `intersects_rect?(other_rect, 0)`.
- * [IMPORTANT] [API] [Video] A Quake-style Heads Up Display (HUD),
- has been added. You can access this console by pressing the "~"
- key. This console can be used to experiment with Ruby, print debug
- logging, and diagnose errors. Here is Ryan showing the console in
- action: (https://www.youtube.com/watch?v=hHgV11F2ZPY)
- * [IMPORTANT] [API] [Video] Added the ability to create replays so you can
- do visual regression of your game. Here is this record/replay capability in
- action: (https://www.youtube.com/watch?v=ev0UMVBe-fY)
- ```
- args.dragon.start_recording(RNG_SEED)
- args.dragon.stop_recording(filename)
- args.dragon.start_replay(filename)
- args.dragon.stop_replay
- ```
-
- You can record your game on startup using the following command
- (it'll automatically save when you close the game):
-
- ```
- ./dragonruby(.exe) --record
- ```
- * [API] Rendering primitives now support `float` values for position
- and size.
- * [API] [Sample] [Video] Lerping/Easing APIs have been added. There is a
- sample app that shows all the things you can do with them. For
- philosophical motivations as to why the APIs look the way they do
- (and just simply a fantastic presentation), watch this
- presentation given by Squirrel Esierloh *NO REALLY YOU SHOULD WATCH THIS PRESENTATION*:
- "Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations" (https://www.youtube.com/watch?v=mr5xkf6zSzk)
- * [API] CTAG files now ship with releases. This will let you quickly
- see the APIs available in DragonRuby GTK.
- * [Sample] Added a "prerequisite" sample app that gives you a crash
- course of Ruby the programming language.
- * [Sample] The composition of primitives in DragonRuby GTK are
- incredibly flexible. A sample app called "Fluid Primitives" has
- been added to show this flexibility.
- * [MacOS] [Linux] [Windows] If your screen resolution is below 720p,
- the game will start at a smaller (but still aspect-correct) resolution.
- * [Sample] Sample added showing `intersects_rect?` collision
- tolerances as a topdown level (similar to what's
- in Zelda for the NES).
-
-= release-20190516 =
-
- * [Community] A big thank you to Nick Culbertson (@mobypixel) for
- creating the art and music for these games.
- * [HTML5] [Demo] [Experimental] Experimental deployment to HTML5 added. You can
- play the HTML5 version here: (https://dragonruby.itch.io/flappydragon).
- * [HTML5] `dragonruby-httpd` binary added so that you can test your
- HTML5 game locally.
- * [RaspberryPI] [Video] [Experimental] Experimental support added to Rasberry Pi. You can
- play DragonRuby GTK games, _develop them and publish them_.
- Here's a video of Ryan playing Flappy Dragon on his DIY Arcade
- Machine: (https://www.youtube.com/watch?v=DCvFMKsvG-Q).
- * [API] Mouse movement can now be tracked: `args,inputs.mouse.position`.
- * [API] Experimental API added for taking screenshots: `args.dragon.root.take_screenshot = true`.
- * [API] Analog support for controllers added: `args.inputs.controller_one.left_analog_x_perc`.
- * [API] [Experimental] Mouse and keyboard focus status are available for use:
- ```
- args.dragon.root.mouse_focus
- args.dragon.root.keyboard_focus
- ```
- * [Samples] Added sample app that shows how to use mouse position.
- * [Samples] Flappy Dragon reference implementation significantly polished.
- * [Samples] [Demo] Added BASIC Gorillas reference implementation. Playable
- here: (https://dragonruby.itch.io/basicgorillas).
- * [Samples] Added sample app that shows analog controller support in
- action. The sample also shows how to manipulate a sprite's
- center of rotation, crop, and horizontal/vertical orientation:
- ```
- [
- x, y, w, h, # decimal values (scales implicitly)
- path, # string
- angle, # in degrees
- a, # alpha (0 to 255)
- r, g, b, # color *saturation*
- source_x, source_y, source_w, source_h, (crop, must be given in original pixels)
- flip_h, flip_v, (boolean values)
- rotation_anchor_x, rotation_anchor_y (decimal between 0 and 1/ratio from bottom left)
- ]
- ```
- * [API] Added `args.dragon.calcstringbox(str, size_enum, font)`
- function that can be used to calculate the `rect` for a string.
-
-= release-20190427 =
-
- * [Packaging] [Windows] Packaging Windows builds of your game now sets a proper icon and
- metadata in the final .exe.
- * [API] Keyboard input is improved dramatically, so you can get reasonable
- key state in your game.
- * [Packaging] You can now specify an application icon in your game_metadata.txt
- file instead of possibly having a second copy of the same file in
- metadata/icon.png.
- * [Sample] [Video] [Demo] Added a full-blown game/reference implementation called
- `flappy_dragon` under the `samples` directory. Here's a quick five
- second video showing the game in action:
- (https://www.youtube.com/watch?v=ZQYRlVA1ru0). You can play it
- yourself here: (https://dragonruby.itch.io/flappydragon).
-
-= release-20190422 =
-
- * [Packaging] Version.txt file added that shows the GIT commit that was
- deployed.
- * [Packaging] Fixed duplicate "Copying x to y ..." message in `dragon-publish`.
- * [Packaging] Automatically package DragonRuby's font and logo so copying the
- DragonRuby GTK binary around doesn't cause errors.
- * [Linux] [Windows] Line rendering fixes on Linux and Windows.
- * [Windows] Bug fix to `golf_with_musical_note` (sound tech demo) sample app where sound
- wouldn't play on Windows.
- * [Windows] README.txt file formatting updated so that it looks correct in
- `notepad.exe`.
- * [Packaging] Default icon added to `mygame`.
- * [Samples] Reworked `doomwipe` (render targets tech demo) sample app so that
- it's less erratic before the effect is revealed.
- * [Windows] Fixed bug where rendering would stop on Windows if the screen was
- resized.
- * [Size] Deleted files that don't need to be packaged with DragonRuby GTK.
-
-= release-20190419 =
-
- * [IMPORTANT] First release. Hot off the presses. Ready to take over the world! As
- soon as we fix that one bug. Oh and that one. Oh and that one too.
- * [Community] The community forum is here: (https://dragonruby.itch.io/dragonruby-gtk/community).
- * [Community] Or you can join the Slack channel at: (http://slack.rubymotion.com/).
- * [Community] Ryan (@icculus) and Amir (@amirrajan) are both on
- Twitter and always happy to help anyone that reaches out to them.
+ end
+
+ def tick args
+ $game.args = args
+ $game.tick
+ end
+#+end_src
+** [API] [BREAKING] The globally accessible GTK Runtime has been renamed ~$dragon~ to ~$gtk~ (you can still use $dragon for now, but it is strongly recommended that you update your usages to $gtk).
+** [API] A new entity type has been introduced and is accessible via ~args.state.new_entity_strict~ the usage of StrictEntity over OpenEntity (~args.state.new_entity~) yield significantly faster property access. The downside is that ~args.state.new_entity_strict~ requires you to define all properties upfront within the implicit block. You will receive an exception if you attempt to access a property that hasn't be pre-defined. For usage info and performance differences, take a look at the Sprite Limit sample app.
+** [Support] Exception messages have been significantly improved. Hashes and Type .to_s information is well formatted. "stack too deep" exceptions resolved.
+** [API] [BREAKING] ~args.outputs.PRIMITIVES +=~ is no longer supported. Use ~args.outputs.PRIMITIVES <<~ for all concatenation of primitives to the outputs collection (trying to pick between += and << was confusing, we settled on <<).
+** [Support] Framerate warnings wait 10 seconds before calculating the moving average. If your framerates begin to drop, consider using ~args.state.new_entity_static~ for game structures that have been fleshed out.
+** [Performance] Rendering of primitives is can support over twice as many sprites at 60 fps (see Sprite Limits sample app for demonstration).
+** [Support] Headless testing has been added. Take a look at the Basic Gorillas sample app to see how headless testing can help you dial into frame-by-frame problems within your game.
+** [Samples] The "Controller Analog Usage Advanced Sprites" sample app now has a helper function with named parameters to create the sprite. For example, if you needed to flip a sprite vertically, you'd have to do the following:
+#+begin_src ruby
+ args.outputs.sprites << [0, 0, 100, 100,
+ 'fighter.png',
+ 0,
+ 255, 255, 255, 255,
+ 0, 0, -1, -1, false, true]
+#+end_src
+
+With the helper method, you can write the following:
+
+#+begin_src ruby
+ args.outputs.sprites << create_sprite(x: 0, y: 0, w: 100, h: 100, vflip: true)
+#+end_src
+We're still chewing on the API above before it gets integrated into GTK proper.
+** [API] "Superscript Two" can be used to bring up the DragonRuby Console. People with international keyboards (which don't have a ~ key) can now use the ~superscript_two~ key (which is in the same place as the ~).
+** [API] All keyboard attributes now have a ~!~ variant which will clear the key if the value was true. Example:
+#+begin_src ruby
+ args.inputs.keyboard.key_down.up # returns true
+ args.inputs.keyboard.key_down.up # still returns true
+#+end_src
+
+VS
+
+#+begin_src ruby
+ args.inputs.keyboard.key_down.up! # returns true
+ args.inputs.keyboard.key_down.up # now returns false for the rest of this tick
+#+end_src
+** [Samples] Added a sample app called "Sprite Animation and Keyboard Input" that shows how to do repeating and one-time sprite animations driven by keyboard input.
+** [Samples] All sample apps have the MIT License added to them (to remove any ambiguity with regards to if you can use them for commercial purposes).
+** [HTML5] Games published to HTML5 now has a loading progress bar.
+** [Samples] Added sample app called "Coordinate Systems" that show the two coordinate systems supported by the GTK.
+** [API] ~args.inputs.mouse~ now respects ~args.dragon.origin_center!~.
+** [Samples] Added two sample apps called "Collision" and "Collision and Entities" that show how to perform collision detection with draw primitives and ~args.state.new_entity~.
+** [Samples] Added an interactive sample app called "Beginner Ruby Primer" that does a better job of introducing you to the language.
+** [Samples] [Video] Amir facilitated a workshop at a local user group. The source code for the workshop is located in a sample app called "NDDNUG Workshop". The video was recorded and you can use that to code along: (https://www.youtube.com/watch?v=S3CFce1arC8).
+** [Bugfix] Windows and Mac icon generation in dragonruby-publish was broken in the previous build. Sorry! Fixed now.
+** [Bugfix] DragonRuby binaries are now codesigned on macOS. We are still working on signing games packaged by dragonruby-publish, but stay tuned!
+* release-20190604
+** [BREAKING] ~perc_to_zero~ and ~perc_to_one~ have been deprecated and now throw and informative exception that will help you fix the problem. Moving forward, you'll need to use the new ~lerp~ APIs (details further down).
+** [BREAKING] ~intersects_rect?~ now takes in an optional parameter called ~tolerance~. This parameter's default is set to ~0.1~. The original tolerance value was set to ~0~. So if you still want a tolerance of ~0~, you'll need to update your ~intersect_rect?~ calls to: ~intersects_rect?(other_rect, 0)~.
+** [IMPORTANT] [API] [Video] A Quake-style Heads Up Display (HUD), has been added. You can access this console by pressing the "~" key. This console can be used to experiment with Ruby, print debug logging, and diagnose errors. Here is Ryan showing the console in action: (https://www.youtube.com/watch?v=hHgV11F2ZPY)
+** [IMPORTANT] [API] [Video] Added the ability to create replays so you can do visual regression of your game. Here is this record/replay capability in action: (https://www.youtube.com/watch?v=ev0UMVBe-fY)
+#+begin_src ruby
+ args.dragon.start_recording(RNG_SEED)
+ args.dragon.stop_recording(filename)
+ args.dragon.start_replay(filename)
+ args.dragon.stop_replay
+#+end_src
+You can record your game on startup using the following command (it'll automatically save when you close the game):
+#+begin_src sh
+ ./dragonruby(.exe) --record
+#+end_src
+** [API] Rendering primitives now support ~float~ values for position and size.
+** [API] [Sample] [Video] Lerping/Easing APIs have been added. There is a sample app that shows all the things you can do with them. For philosophical motivations as to why the APIs look the way they do (and just simply a fantastic presentation), watch this presentation given by Squirrel Esierloh *NO REALLY YOU SHOULD WATCH THIS PRESENTATION*: "Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations" (https://www.youtube.com/watch?v=mr5xkf6zSzk)
+** [API] CTAG files now ship with releases. This will let you quickly see the APIs available in DragonRuby GTK.
+** [Sample] Added a "prerequisite" sample app that gives you a crash course of Ruby the programming language.
+** [Sample] The composition of primitives in DragonRuby GTK are incredibly flexible. A sample app called "Fluid Primitives" has been added to show this flexibility.
+** [MacOS] [Linux] [Windows] If your screen resolution is below 720p, the game will start at a smaller (but still aspect-correct) resolution.
+** [Sample] Sample added showing ~intersects_rect?~ collision tolerances as a topdown level (similar to what's in Zelda for the NES).
+* release-20190516
+** [Community] A big thank you to Nick Culbertson (@mobypixel) for creating the art and music for these games.
+** [HTML5] [Demo] [Experimental] Experimental deployment to HTML5 added. You can play the HTML5 version here: (https://dragonruby.itch.io/flappydragon).
+** [HTML5] ~dragonruby-httpd~ binary added so that you can test your HTML5 game locally.
+** [RaspberryPI] [Video] [Experimental] Experimental support added to Rasberry Pi. You can play DragonRuby GTK games, _develop them and publish them_. Here's a video of Ryan playing Flappy Dragon on his DIY Arcade Machine: (https://www.youtube.com/watch?v=DCvFMKsvG-Q).
+** [API] Mouse movement can now be tracked: ~args,inputs.mouse.position~.
+** [API] Experimental API added for taking screenshots: ~args.dragon.root.take_screenshot = true~.
+** [API] Analog support for controllers added: ~args.inputs.controller_one.left_analog_x_perc~.
+** [API] [Experimental] Mouse and keyboard focus status are available for use:
+#+begin_src ruby
+ args.dragon.root.mouse_focus
+ args.dragon.root.keyboard_focus
+#+end_src
+** [Samples] Added sample app that shows how to use mouse position.
+** [Samples] Flappy Dragon reference implementation significantly polished.
+** [Samples] [Demo] Added BASIC Gorillas reference implementation. Playable here: (https://dragonruby.itch.io/basicgorillas).
+** [Samples] Added sample app that shows analog controller support in action. The sample also shows how to manipulate a sprite's center of rotation, crop, and horizontal/vertical orientation:
+#+begin_src ruby
+ [
+ x, y, w, h, # decimal values (scales implicitly)
+ path, # string
+ angle, # in degrees
+ a, # alpha (0 to 255)
+ r, g, b, # color *saturation*
+ source_x, source_y, source_w, source_h, (crop, must be given in original pixels)
+ flip_h, flip_v, (boolean values)
+ rotation_anchor_x, rotation_anchor_y (decimal between 0 and 1/ratio from bottom left)
+ ]
+#+end_src
+** [API] Added ~args.dragon.calcstringbox(str, size_enum, font)~ function that can be used to calculate the ~rect~ for a string.
+* release-20190427
+** [Packaging] [Windows] Packaging Windows builds of your game now sets a proper icon and metadata in the final .exe.
+** [API] Keyboard input is improved dramatically, so you can get reasonable key state in your game.
+** [Packaging] You can now specify an application icon in your game_metadata.txt file instead of possibly having a second copy of the same file in metadata/icon.png.
+** [Sample] [Video] [Demo] Added a full-blown game/reference implementation called ~flappy_dragon~ under the ~samples~ directory. Here's a quick five second video showing the game in action: (https://www.youtube.com/watch?v=ZQYRlVA1ru0). You can play it yourself here: (https://dragonruby.itch.io/flappydragon).
+* release-20190422
+** [Packaging] Version.txt file added that shows the GIT commit that was deployed.
+** [Packaging] Fixed duplicate "Copying x to y ..." message in ~dragon-publish~.
+** [Packaging] Automatically package DragonRuby's font and logo so copying the DragonRuby GTK binary around doesn't cause errors.
+** [Linux] [Windows] Line rendering fixes on Linux and Windows.
+** [Windows] Bug fix to ~golf_with_musical_note~ (sound tech demo) sample app where sound wouldn't play on Windows.
+** [Windows] README.txt file formatting updated so that it looks correct in ~notepad.exe~.
+** [Packaging] Default icon added to ~mygame~.
+** [Samples] Reworked ~doomwipe~ (render targets tech demo) sample app so that it's less erratic before the effect is revealed.
+** [Windows] Fixed bug where rendering would stop on Windows if the screen was resized.
+** [Size] Deleted files that don't need to be packaged with DragonRuby GTK.
+* release-20190419
+** [IMPORTANT] First release. Hot off the presses. Ready to take over the world! As soon as we fix that one bug. Oh and that one. Oh and that one too.
+** [Community] The community forum is here: (https://dragonruby.itch.io/dragonruby-gtk/community).
+** [Community] Or you can join the Slack channel at: (http://slack.rubymotion.com/).
+** [Community] Ryan (@icculus) and Amir (@amirrajan) are both on Twitter and always happy to help anyone that reaches out to them.
diff --git a/deploy_template/CHEATSHEET.txt b/deploy_template/CHEATSHEET.txt
deleted file mode 100644
index e35f38f..0000000
--- a/deploy_template/CHEATSHEET.txt
+++ /dev/null
@@ -1,232 +0,0 @@
-# DragonRuby Game Toolkit Cheatsheet
-
-A detailed documentation listing is located at
-`mygame/documentation`. For real world sample usages of GTK's APIs,
-take a look at the `samples` directory. The sample apps are ordered by
-beginner to advanced. So look at them in order to get the most out of
-them.
-
-# Minimum Code for Game
-
-The minimum amount of code required for a game is a file named
-`mygame/main.rb` with the following:
-
-```ruby
-def tick args
- args.outputs.labels << [640, 360, "Hello World"]
-end
-```
-
-# Args: `args`
-
-All of GTK's functionality hangs off of `args`.
-
-## Args' Outputs: `args.outputs`
-
-All render `primitive`s are accessible under `args.outputs`.
-
-### Labels: `args.outputs.labels`
-
-`args.outputs.labels` is used to render labels.
-
-Labels are how you display text. This code will go directly inside of the `def tick args` method.
-
-- **Minimum Code**
-
-```ruby
-# X Y TEXT
-args.outputs.labels << [640, 360, "I am a black label."]
-```
-
-- **A Colored Label**
-
-```ruby
-# A colored label
-# X Y TEXT, RED GREEN BLUE ALPHA
-args.outputs.labels << [640, 360, "I am a redish label.", 255, 128, 128, 255]
-```
-
-- **Extended Capabilities**
-
-```ruby
-# A colored label
-# X Y TEXT SIZE ALIGNMENT RED GREEN BLUE ALPHA FONT FILE
-args.outputs.labels << [640, 360, "Hello world", 0, 1, 0, 0, 0, 255, "fonts/coolfont.ttf"]
-```
-
-A `SIZE` of `0` represents "default size". A negative value will decrease
-the label size. A positive value will increase the label's size.
-
-An `ALIGNMENT` of `0` represents "left aligned". `1` represents "center aligned". `2` represents "right aligned".
-
-- **Named Parameters/Additional Metadata**
-
-You can add additional metadata about your game within a label, which requires you to use a `Hash` instead.
-
-```ruby
-args.outputs.labels << {
- x: 200,
- y: 550,
- text: "dragonruby",
- size_enum: 2,
- alignment_enum: 1,
- r: 155,
- g: 50,
- b: 50,
- a: 255,
- font: "fonts/manaspc.ttf",
- # You can add any properties you like (this will be ignored/won't cause errors)
- game_data_one: "Something",
- game_data_two: {
- value_1: "value",
- value_2: "value two",
- a_number: 15
- }
-}
-```
-
-- **Getting The Size of a Piece of Text: `args.gtk.calcstringbox`**
-
-```ruby
-def tick args
- # local variable
- # TEXT SIZE_ENUM FONT
- text_size = args.gtk.args.calcstringbox("some string", 0, "font.ttf")
-
- # print size of a label to screen using Ruby's string formatting capabilities: #{}
- args.outputs.labels << [640, 360, "the label's size is: #{text_size.x}, #{text_size.y}, #{text_size.w}, #{text_size.h}"]
-end
-```
-
-### Sprites: `args.outputs.sprites`
-
-`args.outputs.sprites` is used to render sprites.
-
-All primitives in GTK have the same considerations as detailed in the Labels section.
-
-- **Minimum Code**
-
-```ruby
-# X Y WIDTH HEIGHT PATH
-args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png"]
-```
-
-- **Extended Capabilities**
-
-```ruby
-args.outputs.sprites << [
- 100, # X
- 100, # Y
- 32, # W
- 64, # H
- "player.png", # PATH
- 0, # ANGLE
- 255, # ALPHA
- 0, # RED_SATURATION
- 255, # GREEN_SATURATION
- 0, # BLUE_SATURATION
- 0, # TILE_X
- 0, # TILE_Y
- 32, # TILE_W
- 32 # TILE_H
-]
-```
-
-- **Named Parameters/Additional Metadata**
-
-Here are all the properties for `sprites`:
-
-```ruby
-args.outputs.sprites << {
- x: 100,
- y: 100,
- w: 100,
- h: 100,
- path: "sprites/player.png",
- angle: 0,
- a, 255
- r: 255,
- g: 255,
- b: 255,
- tile_x: 0,
- tile_y: 0,
- tile_w: -1,
- tile_h: -1,
- flip_vertically: false,
- flip_horizontally: false,
- angle_anchor_x: 0.5,
- angle_anchor_y: 1.0
-}
-```
-
-### Sounds `args.outputs.sounds`
-
-Sounds that end `.wav` will play once:
-`args.outputs.sounds << 'something.wav'`.
-
-Sounds that end `.ogg` is considered background music and will loop:
-`args.outputs.sounds << 'background_music.ogg'`.
-
-If you want to play a `.ogg` once as if it were a sound effect, you can do:
-`args.gtk.queue_sound 'some-ogg.ogg'`
-
-## Args' State `args.state`
-
-`args.state` is where you can put all of your game state.
-
-- **Tick Count `args.state.tick_count`**
-
-GTK has a fixed time step of 60 frames per second. You can access the current `tick_count` using `args.state.tick_count`:
-
-```ruby
-def tick args
- # Render a label showing the current tick_count.
- args.outputs.labels << [360, 640, args.state.tick_count]
-end
-```
-
-- **Working With "Open" Game State**
-
-`args.state` is a "open" data structure that allows you to define
-properties of any structure. You don't need to define any kind of
-`class`.
-
-To initialize your game state, use the `||=` operator. Any value on
-the right side of `||=` will only be assigned `once`.
-
-To assign a value every frame, just use the `=` operator, but _make
-sure_ you've initalized a default value.
-
-```ruby
-def tick args
- # initialize your game state ONCE
- args.player.x ||= 0
- args.player.y ||= 0
- args.player.hp ||= 100
-
- # increment the x position of the character by one every frame
- args.player.x += 1
-
- # Render a sprite with a label above the sprite
-
- # X Y W H PATH
- args.outputs.sprites << [args.player.x, args.player.y, 32, 32 "player.png"]
-
- # X Y TEXT
- args.outputs.labels << [args.player.x, args.player.y - 50, args.player.hp]
-end
-```
-
-## Args' Inputs: `args.inputs`
-
-# Numeric
-
-## Numeric#elapsed?
-
-Returns true if a numeric value plus an offset represents a point
-in time that has elapsed. This is related to args.state.tick_count.
-
-```
-args.state.attacked_at ||= args.state.tick_count
-puts args.state.attacked_at.elapsed? 60 # will print false after one second.
-```
diff --git a/deploy_template/README-raspberrypi.txt b/deploy_template/README-raspberrypi.txt
deleted file mode 100644
index 4f7b5ab..0000000
--- a/deploy_template/README-raspberrypi.txt
+++ /dev/null
@@ -1,33 +0,0 @@
-We have only tested DragonRuby on a Raspberry Pi 3, Models B and B+, but we
-believe it _should_ work on any model, including the Pi Zero.
-
-If you're running DragonRuby Game Toolkit on a Raspberry Pi, or trying to run
-a game made with the Toolkit on a Raspberry Pi, and it's really really slow--
-like one frame every few seconds--then there's likely a simple fix.
-
-You're proabably running a desktop environment: menus, apps, web browsers,
-etc. This is okay! Launch the terminal app and type:
-
- sudo raspi-config
-
-It'll ask you for your password (if you don't know, try "raspberry"), and then
-give you a menu of options. Find your way to "Advanced Options", then "GL
-Driver", and change this to "GL (Full KMS)" ... not "fake KMS," which is
-also listed there. Save and reboot. In theory, this should fix the problem.
-
-If you're _still_ having problems and have a Raspberry Pi 2 or better, go back
-to raspi-config and head over to "Advanced Options", "Memory split," and give
-the GPU 256 megabytes. You might be able to avoid this for simple games, as
-this takes RAM away from the system and reserves it for graphics. You can
-also try 128 megabytes as a gentler option.
-
-
-Note that you can also run DragonRuby without X11 at all: if you run it from
-a virtual terminal it will render fullscreen and won't need the "Full KMS"
-option. This might be attractive if you want to use it as a game console
-sort of thing, or develop over ssh, or launch it from RetroPie, etc.
-
-If you have questions or problems, please let us know! You can find us on
-the forums at https://dragonruby.itch.io/dragonruby-gtk or our Discord channel
-at https://discord.dragonruby.org/ ...
-
diff --git a/deploy_template/README.txt b/deploy_template/README.txt
deleted file mode 100644
index 2d00b4c..0000000
--- a/deploy_template/README.txt
+++ /dev/null
@@ -1,369 +0,0 @@
-* Introduction
-
- Hello world! Do the things in this README file and you'll be well on your way to
- building video games!
-
-* Join the community!
-
- Those who use DragonRuby are called Dragon Riders. This identity is
- incredibly important to us. When someone asks you:
-
- > What game engine do you use?
-
- You can proudly reply with:
-
- > I am a Dragon Rider.
-
-** Subscribe to the News Letter
-
- The News Letter will keep you in the loop with regards to
- http://dragonrubydispatch.com/
-
-** Join the Discord
-
- Amir (one of the creators of DragonRuby) is always available to help
- you out. So take the time to join the community Discord. The invite linke is located at:
-
- DragonRuby Discord: http://discord.dragonruby.org
-
-** Introduce Yourself on the Forums
-
- Take a moment to introducing yourself on the community forum:
-
- Stickied Community Post: https://itch.io/t/526689/dragonruby-gtk-discord-server-created-join-it-dammit
-
- This provides community members a registry of everyone using
- DragonRuby. Itch.io holds a lot of game jams, and it'd be awesome if
- Dragon Riders had a central place to find each other.
-
-* Determine how you want to start learning based on your experience level!
-
- Follows are sections pertaining to your experience level as a
- programer and experience level with coding in a dynamic language.
-
-** If you have zero experience with programming.
-
- If you have no programing experience at all. You'll want to take the
- time to see what DragonRuby is like before jumping in to code. Watch
- the following videos in order (each one is only ~20 minutes long).
-
- Don't attempt to code anything shown in the video yet, just watch them to
- get familiar with the language and how games are built.
-
- 1. Beginner Introduction to Ruby: https://www.youtube.com/watch?v=ixw7TJhU08E
- 2. Intermediate Introduction to Ruby Syntax: https://www.youtube.com/watch?v=HG-XRZ5Ppgc
- 3. Intermediate Introduction to Arrays in Ruby: https://www.youtube.com/watch?v=N72sEYFRqfo
-
- Once you have watched all the videos. Then (and only then) go back
- through the videos and follow along. Here are the locations for the
- samples:
-
- 1. Beginner Introduction to Ruby: samples/00_beginner_ruby_primer
- 2. Intermediate Tutorials: samples/00_intermediate_ruby_primer
-
-** If you do not know Ruby, but have experience with C# (Unity) or GML (GameMaker)
-
- Those engines rot your brain. Forget the concepts that the forced you
- to learn. Game development is so much simpler than what they make you
- do. Please, try your best to set aside the concepts those engines
- teach (we promise our approach to game development is much much easier).
-
- Watch these videos to get familiar with the Ruby language and
- programming environment (they are ~20 min each so it'll be quick):
-
- 1. Beginner Introduction to Ruby: https://www.youtube.com/watch?v=ixw7TJhU08E
- 2. Intermediate Introduction to Ruby Syntax: https://www.youtube.com/watch?v=HG-XRZ5Ppgc
- 3. Intermediate Introduction to Arrays in Ruby: https://www.youtube.com/watch?v=N72sEYFRqfo
-
- You may also want to try this free course provided at http://dragonruby.school.
-
- After you've watch the videos, you'll be ready to go to the next section.
-
-** You are a dev that is familiar with a dynamically typed language (Ruby, Lua, Python, or JavaScript).
-
-*** STEP 1: Work through this Hello World tutorial
-
- This tutorial is provided by Ryan C Gordon (check out his wikipedia
- page). We call him "The Juggernaut":
-
- Welcome!
-
- Here's just a little push to get you started if you're new to programming or
- game development.
-
- If you want to write a game, it's no different than writing any other
- program for any other framework: there are a few simple rules that might be
- new to you, but more or less programming is programming no matter what you
- are building.
-
- Did you not know that? Did you think you couldn't write a game because you're
- a "web guy" or you're writing Java at a desk job? Stop letting people tell
- you that you can't, because you already have everything you need.
-
- Here, we're going to be programming in a language called "Ruby." In the
- interest of full disclosure, I (Ryan "The Juggernaut" Gordon) wrote the C
- parts of this toolkit and Ruby looks a little strange to me (Amir Rajan wrote the
- Ruby parts), but I'm going to walk you through the basics because we're all
- learning together, and if you mostly think of yourself as someone that writes
- C (or C++, C#, Objective-C), PHP, or Java, then you're only a step behind me right now.
-
- Here's the most important thing you should know: Ruby lets you do some
- complicated things really easily, and you can learn that stuff later. I'm
- going to show you one or two cool tricks, but that's all.
-
- Do you know what an if statement is? A for-loop? An array? That's all you'll
- need to start.
-
- Ok, here are few rules with regards to game development with GTK:
-
- - Your game is all going to happen under one function...
- - ...that runs 60 times a second...
- - ...and has to tell the computer what to draw each time.
-
- That's an entire video game in one run-on sentence.
-
- Here's that function. You're going to want to put this in mygame/app/main.rb,
- because that's where we'll look for it by default. Load it up in your favorite
- text editor.
-
- #+begin_src ruby
- def tick args
- args.outputs.labels << [ 580, 400, 'Hello World!' ]
- end
- #+end_src
-
- Now run `dragonruby` ...did you get a window with "Hello World!" written in
- it? Good, you're officially a game developer!
-
- `mygame/app/main.rb`, is where the Ruby source code is located. This looks a little strange, so
- I'll break it down line by line. In Ruby, a '#' character starts a single-line
- comment, so I'll talk about this inline.
-
- #+begin_src ruby
-
- # This "def"ines a function, named "tick," which takes a single argument
- # named "args". DragonRuby looks for this function and calls it every
- # frame, 60 times a second. "args" is a magic structure with lots of
- # information in it. You can set variables in there for your own game state,
- # and every frame it will updated if keys are pressed, joysticks moved,
- # mice clicked, etc.
- def tick args
-
- # One of the things in "args" is the "outputs" object that your game uses
- # to draw things. Afraid of rendering APIs? No problem. In DragonRuby,
- # you use arrays to draw things and we figure out the details.
- # If you want to draw text on the screen, you give it an array (the thing
- # in the [ brackets ]), with an X and Y coordinate and the text to draw.
- # The "<<" thing says "append this array onto the list of them at
- # args.outputs.labels)
- args.outputs.labels << [ 580, 400, 'Hello World!' ]
- end
-
- #+end_src
-
- Once your `tick` function finishes, we look at all the arrays you made and
- figure out how to draw it. You don't need to know about graphics APIs.
- You're just setting up some arrays! DragonRuby clears out these arrays
- every frame, so you just need to add what you need _right now_ each time.
-
- Now let's spice this up a little.
-
- We're going to add some graphics. Each 2D image in DragonRuby is called a
- "sprite," and to use them, you just make sure they exist in a reasonable file
- format (png, jpg, gif, bmp, etc) and specify them by filename. The first time
- you use one, DragonRuby will load it and keep it in video memory for fast
- access in the future. If you use a filename that doesn't exist, you get a fun
- checkerboard pattern!
-
- There's a "dragonruby.png" file included, just to get you started. Let's have
- it draw every frame with our text:
-
- #+begin_src ruby
-
- def tick args
- args.outputs.labels << [ 580, 400, 'Hello World!' ]
- args.outputs.sprites << [ 576, 100, 128, 101, 'dragonruby.png' ]
- end
-
- #+end_src
-
- (ProTip: you don't have to restart DragonRuby to test your changes; when you
- save main.rb, DragonRuby will notice and reload your program.)
-
- That `.sprites` line says "add a sprite to the list of sprites we're drawing,
- and draw it at position (576, 100) at a size of 128x101 pixels". You can
- find the image to draw at dragonruby.png.
-
- Quick note about coordinates: (0, 0) is the bottom left corner of the screen,
- and positive numbers go up and to the right. This is more "geometrically
- correct," even if it's not how you remember doing 2D graphics, but we chose
- this for a simpler reason: when you're making Super Mario Brothers and you
- want Mario to jump, you should be able to add to Mario's y position as he
- goes up and subtract as he falls. It makes things easier to understand.
-
- Also: your game screen is _always_ 1280x720 pixels. If you resize the window,
- we will scale and letterbox everything appropriately, so you never have to
- worry about different resolutions.
-
- Ok, now we have an image on the screen, let's animate it:
-
- #+begin_src ruby
-
- def tick args
- args.state.rotation ||= 0
- args.outputs.labels << [ 580, 400, 'Hello World!' ]
- args.outputs.sprites << [ 576, 100, 128, 101, 'dragonruby.png', args.state.rotation ]
- args.state.rotation -= 1
- end
-
- #+end_src
-
- Now you can see that this function is getting called a lot!
-
- Here's a fun Ruby thing: `args.state.rotation ||= 0` is shorthand for "if
- args.state.rotation isn't initialized, set it to zero." It's a nice way to
- embed your initialization code right next to where you need the variable.
-
- `args.state` is a place you can hang your own data and have it survive past the
- life of the function call. In this case, the current rotation of our sprite,
- which is happily spinning at 60 frames per second. If you don't specify
- rotation (or alpha, or color modulation, or a source rectangle, etc),
- DragonRuby picks a reasonable default, and the array is ordered by the most
- likely things you need to tell us: position, size, name.
-
- One thing we decided to do in DragonRuby is not make you worry about delta
- time: your function runs at 60 frames per second (about 16 milliseconds) and
- that's that. Having to worry about framerate is something massive triple-AAA
- games do, but for fun little 2D games? You'd have to work really hard to not
- hit 60fps. All your drawing is happening on a GPU designed to run Fortnite
- quickly; it can definitely handle this.
-
- Since we didn't make you worry about delta time, you can just move the
- rotation by 1 every time and it works without you having to keep track of
- time and math. Want it to move faster? Subtract 2.
-
- Now, let's move that image around.
-
- #+begin_src ruby
-
- def tick args
- args.state.rotation ||= 0
- args.state.x ||= 576
- args.state.y ||= 100
-
- if args.inputs.mouse.click
- args.state.x = args.inputs.mouse.click.point.x - 64
- args.state.y = args.inputs.mouse.click.point.y - 50
- end
-
- args.outputs.labels << [ 580, 400, 'Hello World!' ]
- args.outputs.sprites << [ args.state.x, args.state.y, 128, 101, 'dragonruby.png', args.state.rotation ]
-
- args.state.rotation -= 1
- end
-
- #+end_src
-
- Everywhere you click your mouse, the image moves there. We set a default
- location for it with args.state.x ||= 576, and then we change those variables
- when we see the mouse button in action. You can get at the keyboard and game
- controllers in similar ways.
-
- There is a lot more you can do with DragonRuby, but now you've already got
- just about everything you need to make a simple game. After all, even the
- most fancy games are just creating objects and moving them around. Experiment
- a little. Add a few more things and have them interact in small ways. Want
- something to go away? Just don't add it to args.output anymore.
-
-*** STEP 2: Read the CHEATSHEET.txt
-
- Go to the file CHEATSHEET.txt and skim through it quickly to get a
- feel for some of the other APIs you have access to. If you need even
- more details you'll find them at `mygame/documentation`.
-
-*** STEP 3: Run each sample app in order and read the code.
-
- The sample apps located in the `sample` directory are ordered by
- increasing complexity. Run each one of them and read through the
- code. Play around by changing values and see how they change the game.
-
-*** STEP 4: Editor integration.
-
- There is a file called `vim-ctags` and `emacs-ctags`. The data in
- these files are standard output provided by Exuberent CTAGS. Most
- editors have a "ctags plugin" so just search for that plugin for your
- editor and point it to these files.
-
-*** STEP 5: Get in the habit of reading the CHANGELOG
-
- We are constantly adding new features to the engine. Be sure to read
- the changelog with every release.
-
-* How to publish your game.
-
- Once you've built your game, you're all set to deploy! Good luck in
- your game dev journey and if you get stuck, come to the Discord
- channel!
-
-** STEP 1: Create a new Game in Itch.io.
-
- Log into Itch.io and go to https://itch.io/game/new.
-
- - Title: Give your game a Title. This value represents your `gametitle`.
- - Project URL: Set your project url. This value represents your `gameid`.
- - Classification: Keep this as Game.
- - Kind of Project: Select HTML from the drop down list. Dont worry,
- the HTML project type _aslo supports binary downloads_.
- - Uploads: Skip this section for now.
- - Embed Options: Set the dropdown value to "Click to launch in fullscreen".
- DO NOT use the Embed in page option. iFrames are not reliable with
- regards to capturing input.
-
- You can fill out all the other options later.
-
-** STEP 2: Go to mygame/metadata/metadata.txt and update it.
-
- Point your text editor at mygame/metadata/game_metadata.txt and
- make it look like this: (Remove the `#` at the beginning of each line).
-
- #+begin_src text
- devid=bob
- devtitle=Bob The Game Developer
- gameid=mygame
- gametitle=My Game
- version=0.1
- #+end_src
-
- The `devid` property is the username you use to log into Itch.io.
- The `devtitle` is your name or company name (it can contain spaces).
- The `gameid` is the Project URL value (see details in STEP 1).
- The `gametitle` is the name of your game (it can contain spaces).
- The `version` can be any `major.minor` number format.
-
-** STEP 3: Build your game for distribution.
-
- Open up the terminal and run this from the command line:
-
- #+begin_src sh
- ./dragonruby-publish --only-package mygame
- #+end_src
-
- (if you're on Windows, don't put the "./" on the front. That's a Mac and
- Linux thing.)
-
- A directory called `./build` will be created that contains your
- binaries. You can upload this to Itch.io manually. For the HTML
- version of your game after you upload it. Check the checkbox labeled
- "This file will be played in the browser".
-
- For subsequent updates you can use an automated deployment to Itch.io:
-
- #+begin_src sh
- ./dragonruby-publish mygame
- #+end_src
-
- DragonRuby will package _and publish_ your game to itch.io! Tell your
- friends to go to your game's very own webpage and buy it!
-
- If you make changes to your game, just re-run dragonruby-publish and it'll
- update the downloads for you.
diff --git a/deploy_template/mygame/app/main.rb b/deploy_template/mygame/app/main.rb
index 5683cc2..0ebdc6b 100644
--- a/deploy_template/mygame/app/main.rb
+++ b/deploy_template/mygame/app/main.rb
@@ -1,5 +1,6 @@
def tick args
- args.outputs.labels << [ 580, 500, 'Hello World!' ]
- args.outputs.labels << [ 640, 460, 'Go to docs/docs.html and read it!', 5, 1 ]
- args.outputs.sprites << [ 576, 310, 128, 101, 'dragonruby.png' ]
+ args.outputs.labels << [640, 500, 'Hello World!', 5, 1]
+ args.outputs.labels << [640, 460, 'Go to docs/docs.html and read it!', 5, 1]
+ args.outputs.labels << [640, 420, 'Join the Discord! http://discord.dragonruby.org', 5, 1]
+ args.outputs.sprites << [576, 280, 128, 101, 'dragonruby.png']
end
diff --git a/deploy_template/mygame/data/.gitkeep b/deploy_template/mygame/data/.gitkeep
new file mode 100644
index 0000000..c1ffee3
--- /dev/null
+++ b/deploy_template/mygame/data/.gitkeep
@@ -0,0 +1 @@
+Put level data and other txt files here. \ No newline at end of file
diff --git a/deploy_template/mygame/documentation/01-high-level.md b/deploy_template/mygame/documentation/01-high-level.md
deleted file mode 100644
index 7206d8d..0000000
--- a/deploy_template/mygame/documentation/01-high-level.md
+++ /dev/null
@@ -1,31 +0,0 @@
-# General Stuff
-
-- You have 1280x720 pixels to work with. The bottom left corner is 0, 0
- with X increasing going right, and Y increasing going up.
-- The game is on a fixed 60 fps cycle (no delta time needed).
-- Come to the Discord if you need help: http://discord.dragonruby.org
-- Going through all the sample apps is a REALLY GOOD IDEA. Most sample apps
- contain a recorded replay/demo. So just double click `watch-recording` to
- see a full presentation of the sample.
-
-# Entry Point
-
-For all the examples in the other documentation files. It's assumed they
-are being placed into the follow code block:
-
-```
-# Entry point placed in main.rb
-def tick args
- args.outputs.labels << [100, 100, 'hello world']
-end
-```
-
-# New to Ruby
-
-If you are a complete beginner and have never coded before:
-
-1. Run the 00_beginner_ruby_primer sample app and work through it.
- Video walkthrough: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-gtk-primer.mp4
-2. Read all the code in the 00_intermediate_ruby_primer sample app.
- Video walkthrough: https://s3.amazonaws.com/s3.dragonruby.org/dragonruby-gtk-intermediate.mp4
-3. There is also a free course you can sign up for at http://dragonruby.school
diff --git a/deploy_template/mygame/documentation/02-labels.md b/deploy_template/mygame/documentation/02-labels.md
deleted file mode 100644
index 8cfa35e..0000000
--- a/deploy_template/mygame/documentation/02-labels.md
+++ /dev/null
@@ -1,132 +0,0 @@
-# Labels
-
-Labels display text.
-
-## Sample Apps Related to Label Usage (ordered by size of codebase increasing)
-
-- 01_api_01_labels
-- 01_api_99_tech_demo (includes recording)
-- 10_save_load_game (includes recording)
-- 18_moddable_game
-- 19_lowrez_jam_01_hello_world
-- 99_sample_game_return_of_serenity
-
-## Minimum Code
-
-Creates a label with black text at location 100, 100.
-
-```ruby
-# X Y TEXT
-args.outputs.labels << [100, 100, "Hello world"]
-```
-
-## Font Size
-
-The size can be a number between `-10` and `+10`. The default size is `0`.
-
-```ruby
-# X Y TEXT SIZE
-args.outputs.labels << [100, 100, "Hello world", 5]
-```
-
-## Alignment
-
-Alignment values are `0` (left, default), `1` (center), and `2`
-(right). The value must come after the size.
-
-A label smack dab in the center of the screen, with a center alignment:
-
-```ruby
-# X Y TEXT SIZE ALIGNMENT
-args.outputs.labels << [640, 360, "Hello world", 0, 1]
-```
-
-## RGBA - Colors and Alpha
-
-Labels can have colors. The value for the color is a number between
-`0` and `255`.
-
-A green label with 50% opacity.
-
-```ruby
-# X Y TEXT RED GREEN BLUE ALPHA
-args.outputs.labels << [640, 360, "Hello world", 0, 255, 0, 128]
-```
-
-A green label with size and alignment.
-
-```ruby
-# X Y TEXT SIZE ALIGNMENT RED GREEN BLUE ALPHA
-args.outputs.labels << [640, 360, "Hello world", 0, 1, 0, 255, 0, 128]
-```
-
-## Custom Font
-
-You can override the font for a label. The font needs to be under the
-`mygame` directory. It's recommended that you create a `fonts` folder
-to keep things organized.
-
-Here is how you create a label with a font named `coolfont.ttf` under a directory `mygame/fonts`.
-
-```ruby
-# X Y TEXT SIZE ALIGNMENT RED GREEN BLUE ALPHA FONT FILE
-args.outputs.labels << [640, 360, "Hello world", 0, 1, 0, 0, 0, 255, "fonts/coolfont.ttf"]
-```
-
-## Hashes (Advanced)
-
-If you want a more readable invocation. You can use the following hash to create a label.
-Any parameters that are not specified will be given a default value. The keys of the hash can
-be provided in any order.
-
-Here is how you create a green label with a font named `coolfont.ttf` under a directory `mygame/fonts`
-using the helper method (providing all the parameters).
-
-```ruby
-args.outputs.labels << {
- x: 200,
- y: 550,
- text: "dragonruby",
- size_enum: 2,
- alignment_enum: 1,
- r: 155,
- g: 50,
- b: 50,
- a: 255,
- font: "fonts/manaspc.ttf"
-}
-```
-
-## Duck Typing (Advanced)
-
-You can also create a class with line properties and render it as a primitive.
-ALL properties must be on the class. ADDITIONALLY, a method called
-`primitive_marker` must be defined on the class.
-
-Here is an example:
-
-```ruby
-# Create type with ALL sprite properties AND primitive_marker
-class Label
- attr_accessor :x, :y, :text, :size_enum, :alignment_enum, :font, :r, :g, :b, :a
-
- def primitive_marker
- :label
- end
-end
-
-# Inherit from type
-class TitleLabel < Label
-
- # constructor
- def initialize x, y, text
- self.x = x
- self.y = y
- self.text = text
- end
-end
-
-# render layer label
-
-args.outputs.label << TitleLabel.new(10, 10, "The Game")
-```
diff --git a/deploy_template/mygame/documentation/03-solids-and-borders.md b/deploy_template/mygame/documentation/03-solids-and-borders.md
deleted file mode 100644
index fb51e3a..0000000
--- a/deploy_template/mygame/documentation/03-solids-and-borders.md
+++ /dev/null
@@ -1,126 +0,0 @@
-# Solids and Borders
-
-Solids and Borders are great to use as place holders for sprites.
-
-## Sample Apps Related to Solid/Borders Usage (ordered by size of codebase increasing)
-
-- 01_api_03_rects
-- 01_api_99_tech_demo (includes recording)
-- 02_collisions
-- 12_top_down_area (includes recording)
-- 99_sample_game_flappy_dragon (includes recording)
-- 08_platformer_collisions
-- 20_roguelike_starting_point
-- 99_sample_game_pong (includes recording)
-
-## Minimum Code
-
-Creates a solid black rectangle located at 100, 100. 160 pixels
-wide and 90 pixels tall.
-
-```ruby
-# X Y WIDTH HEIGHT
-args.outputs.solids << [100, 100, 160, 90]
-```
-
-Creates an unfilled black-bordered rectangle located at 100, 100.
-160 pixels wide and 90 pixels tall.
-
-```ruby
-# X Y WIDTH HEIGHT
-args.outputs.borders << [100, 100, 160, 90]
-```
-
-## RGBA - Colors and Alpha
-
-The value for the color and alpha is a number between `0` and `255`. The
-alpha property is optional and will be set to `255` if not specified.
-
-Creates a green solid rectangle with an opacity of 50%.
-
-```ruby
-# X Y WIDTH HEIGHT RED GREEN BLUE ALPHA
-args.outputs.solids << [100, 100, 160, 90, 0, 255, 0, 128]
-```
-
-Creates an unfilled green-bordered rectangle located at 100, 100.
-160 pixels wide and 90 pixels tall and an opacity of 50%.
-
-```ruby
-# X Y WIDTH HEIGHT RED GREEN BLUE ALPHA
-args.outputs.borders << [100, 100, 160, 90, 0, 255, 0, 128]
-```
-
-Creates a solid gray rectangle that covers the entire scene. Like a background.
-The opacity is excluded because it's 100% opaque (which has a value of 255).
-
-```ruby
-# X Y WIDTH HEIGHT RED GREEN BLUE
-args.outputs.solids << [ 0, 0, 1280, 720, 128, 128, 128]
-```
-
-## Hash (Advanced)
-
-If you want a more readable invocation. You can use the following hash to create a solid.
-Any parameters that are not specified will be given a default value. The keys of the hash can
-be provided in any order.
-
-```ruby
-args.outputs.solids << {
- x: 0,
- y: 0,
- w: 100,
- h: 100,
- r: 0,
- g: 255,
- b: 0,
- a: 255
-}
-
-
-args.outputs.borders << {
- x: 0,
- y: 0,
- w: 100,
- h: 100,
- r: 0,
- g: 255,
- b: 0,
- a: 255
-}
-```
-
-## Duck Typing (Advanced)
-
-You can also create a class with solid/border properties and render it as a primitive.
-ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
-must be defined on the class.
-
-Here is an example:
-
-```ruby
-# Create type with ALL solid/border properties AND primitive_marker
-class Solid (or Border)
- attr_accessor :x, :y, :w, :h, :r, :g, :b, :a_x
-
- def primitive_marker
- :solid (or :border)
- end
-end
-
-# Inherit from type
-class Square < Solid (or Border)
- # constructor
- def initialize x, y, size
- self.x = x
- self.y = y
- self.w = size
- self.h = size
- end
-end
-
-# render solid/border
-
-args.outputs.solids << Square.new(10, 10, 32)
-args.outputs.borders << Square.new(10, 10, 32)
-```
diff --git a/deploy_template/mygame/documentation/04-lines.md b/deploy_template/mygame/documentation/04-lines.md
deleted file mode 100644
index 20faa44..0000000
--- a/deploy_template/mygame/documentation/04-lines.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# Lines
-
-Lines are 1 pixel wide and can be diagonal.
-
-## Sample Apps Related to Line Usage (ordered by size of codebase increasing)
-
-- 01_api_02_lines
-- 01_api_99_tech_demo (includes recording)
-- 06_coordinate_systems (includes recording)
-- 19_lowrez_jam_01_hello_world
-- 99_sample_game_pong (includes recording)
-
-## Minimum Code
-
-Creates a black line from the bottom left corner to the top right corner.
-
-```ruby
-# X1 Y1 X2 Y2
-args.outputs.lines << [ 0, 0, 1280, 720]
-```
-
-Creates a black vertical line through the center of the scene.
-
-```ruby
-# X1 Y1 X2 Y2
-args.outputs.lines << [ 640, 0, 640, 720]
-```
-
-Creates a black horizontal line through the center of the scene.
-
-```ruby
-# X1 Y1 X2 Y2
-args.outputs.lines << [ 0, 360, 1280, 360]
-```
-
-## RGBA - Colors and Alpha
-
-The value for the color and alpha is a number between `0` and `255`. The
-alpha property is optional and will be set to `255` if not specified.
-
-Creates a green horizontal line through the center of the scene with an opacity of 50%.
-
-```ruby
-# X1 Y1 X2 Y2 RED GREEN BLUE ALPHA
-args.outputs.lines << [ 0, 360, 1280, 360, 0, 255, 0, 128]
-```
-
-Creates a green vertical line through the center of the scene.
-The opacity is excluded because it's 100% opaque (which has a value of 255).
-
-```ruby
-# X1 Y1 X2 Y2 RED GREEN BLUE
-args.outputs.lines << [ 640, 0, 640, 720, 0, 255, 0]
-```
-
-## Hash (Advanced)
-
-If you want a more readable invocation. You can use the following hash to create a line.
-Any parameters that are not specified will be given a default value. The keys of the hash can
-be provided in any order.
-
-```ruby
-args.outputs.lines << {
- x: 0,
- y: 0,
- x2: 1280,
- y2: 720,
- r: 0,
- g: 255,
- b: 0,
- a: 255
-}
-```
-
-## Duck Typing (Advanced)
-
-You can also create a class with line properties and render it as a primitive.
-ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
-must be defined on the class.
-
-Here is an example:
-
-```ruby
-# Create type with ALL line properties AND primitive_marker
-class Line
- attr_accessor :x, :y, :x2, :y2, :r, :g, :b, :a
-
- def primitive_marker
- :line
- end
-end
-
-# Inherit from type
-class VerticalLine < Line
-
- # constructor
- def initialize x, y, h
- self.x = x
- self.y = y
- self.x2 = x
- self.y2 = y + h
- end
-end
-
-# render line
-
-args.outputs.lines << VerticalLine.new(10, 10, 100)
-```
diff --git a/deploy_template/mygame/documentation/05-sprites.md b/deploy_template/mygame/documentation/05-sprites.md
deleted file mode 100644
index 973ff29..0000000
--- a/deploy_template/mygame/documentation/05-sprites.md
+++ /dev/null
@@ -1,239 +0,0 @@
-# Sprites
-
-Sprites are the most important visual component of a game.
-
-## Sample Apps Related to Sprite Usage (ordered by size of codebase increasing)
-
-- 01_api_04_sprites
-- 01_api_99_tech_demo (includes recording)
-- 02_sprite_animation_and_keyboard_input (includes recording)
-- 08_platformer_collisions_metroidvania
-- 09_controller_analog_usage_advanced_sprites
-- 99_sample_game_basic_gorillas (includes recording)
-- 99_sample_game_dueling_starships (includes recording)
-- 99_sample_game_flappy_dragon (includes recording)
-- 99_sample_game_return_of_serenity
-
-## Minimum Code
-
-Sprites need to be under the `mygame` directory. It's recommended that you create a `sprites` folder
-to keep things organized. All sprites must be `.png` files
-
-Here is how you create an sprite with located at 100, 100, that is 32 pixels wide and 64 pixels tall.
-In this example the sprite name is `player.png` and is located under a directory `mygame/sprites`.
-
-```ruby
-# X Y WIDTH HEIGHT PATH
-args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png"]
-```
-
-## Rotation / Angle
-
-Unlike `solids` and `borders`, sprites can be rotated. This is how you rotate a sprite 90 degrees.
-
-Note: All angles in DragonRuby Game Toolkit are represented in degrees (not radians).
-
-```ruby
-# X Y WIDTH HEIGHT PATH ANGLE
-args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png", 90]
-```
-
-## Alpha
-
-Sprites can also have a transparency associated with them. The transparency value must come after
-the angle value and supports a number between 0 and 255.
-
-This is how you would define a sprite with no rotation, and a 50% transparency.
-
-```ruby
-# X Y WIDTH HEIGHT PATH ANGLE ALPHA
-args.outputs.sprites << [100, 100, 32, 64, "sprites/player.png", 0, 128]
-```
-
-## Color Saturations
-
-A Sprite's color levels can be changed. The color saturations must come after `angle` and
-`alpha` values.
-
-This is a sprite with no rotation, fully opaque, and with a green tint.
-
-```ruby
-args.outputs.sprites << [100, # X
- 100, # Y
- 32, # W
- 64, # H
- "sprites/player.png", # PATH
- 0, # ANGLE
- 255, # ALPHA
- 0, # RED_SATURATION
- 255, # GREEN_SATURATION
- 0] # BLUE_SATURATION
-```
-
-## Sprite Sub Division / Tile
-
-You can render a portion of a sprite (a tile). The sub division of the sprite is denoted as a rectangle
-directly related to the original size of the png.
-
-This is a sprite scaled to 100 pixels where the source "tile" is located at the bottom left corner
-within a 32 pixel square. The angle, opacity, and color levels of the tile are unaltered.
-
-```ruby
-args.outputs.sprites << [ 100, # X
- 100, # Y
- 32, # W
- 64, # H
- "sprites/player.png", # PATH
- 0, # ANGLE
- 255, # ALPHA
- 0, # RED_SATURATION
- 255, # GREEN_SATURATION
- 0, # BLUE_SATURATION
- 0, # TILE_X
- 0, # TILE_Y
- 32, # TILE_W
- 32] # TILE_H
-```
-
-## Flipping a Sprite Horizontally and Vertically
-
-A sprite can be flipped horizontally and vertically.
-
-This is a sprite that has been flipped horizontally. The sprite's angle, alpha, color saturations,
-and tile subdivision are unaltered.
-
-```ruby
-args.outputs.sprites << [ 100, # X
- 100, # Y
- 32, # W
- 64, # H
- "sprites/player.png", # PATH
- 0, # ANGLE
- 255, # ALPHA
- 0, # RED_SATURATION
- 255, # GREEN_SATURATION
- 0, # BLUE_SATURATION
- 0, # TILE_X
- 0, # TILE_Y
- 32, # TILE_W
- 32, # TILE_H
- true, # FLIP_HORIZONTALLY
- false] # FLIP_VERTICALLY
-```
-
-This is a sprite that has been flipped vertically. The sprite's angle, alpha, color saturations,
-and tile subdivision are unaltered.
-
-```ruby
-args.outputs.sprites << [ 100, # X
- 100, # Y
- 32, # W
- 64, # H
- "sprites/player.png", # PATH
- 0, # ANGLE
- 255, # ALPHA
- 0, # RED_SATURATION
- 255, # GREEN_SATURATION
- 0, # BLUE_SATURATION
- 0, # TILE_X
- 0, # TILE_Y
- 32, # TILE_W
- 32, # TILE_H
- false, # FLIP_HORIZONTALLY
- true] # FLIP_VERTICALLY
-```
-
-## Rotation Center
-
-A sprites center of rotation can be altered.
-
-This is a sprite that has its rotation center set to the top-middle. The sprite's angle, alpha, color saturations,
-tile subdivision, and projections are unaltered.
-
-```ruby
-args.outputs.sprites << [ 100, # X
- 100, # Y
- 32, # W
- 64, # H
- "sprites/player.png", # PATH
- 0, # ANGLE
- 255, # ALPHA
- 255, # RED_SATURATION
- 255, # GREEN_SATURATION
- 0, # BLUE_SATURATION
- 0, # TILE_X
- 0, # TILE_Y
- -1, # TILE_W
- -1, # TILE_H
- false, # FLIP_HORIZONTALLY
- false, # FLIP_VERTICALLY
- 0.5, # ANGLE_ANCHOR_X
- 1.0] # ANCHOR_Y
-```
-
-## Hash (Advanced)
-
-If you want a more readable invocation. You can use the following hash to create a sprite.
-Any parameters that are not specified will be given a default value. The keys of the hash can
-be provided in any order.
-
-```ruby
-args.outputs.sprites << {
- x: 100,
- y: 100,
- w: 100,
- h: 100,
- path: "sprites/player.png",
- angle: 0,
- a, 255
- r: 255,
- g: 255,
- b: 255,
- tile_x: 0,
- tile_y: 0,
- tile_w: -1,
- tile_h: -1,
- flip_vertically: false,
- flip_horizontally: false,
- angle_anchor_x: 0.5,
- angle_anchor_y: 1.0
-}
-```
-
-## Duck Typing (Advanced)
-
-You can also create a class with sprite properties and render it as a primitive.
-ALL properties must be on the class. ADDITIONALLY, a method called `primitive_marker`
-must be defined on the class.
-
-Here is an example:
-
-```ruby
-# Create type with ALL sprite properties AND primitive_marker
-class Sprite
- attr_accessor :x, :y, :w, :h, :path, :angle, :a, :r, :g, :b, :tile_x,
- :tile_y, :tile_w, :tile_h, :flip_horizontally,
- :flip_vertically, :angle_anchor_x, :angle_anchor_y
-
- def primitive_marker
- :sprite
- end
-end
-
-# Inherit from type
-class PlayerSprite < Sprite
-
- # constructor
- def initialize x, y, w, h
- self.x = x
- self.y = y
- self.w = w
- self.h = h
- self.path = 'sprites/player.png'
- end
-end
-
-#render player sprite
-
-args.outputs.sprites << PlayerSprite.new(10, 10, 32, 64)
-```
diff --git a/deploy_template/mygame/documentation/06-keyboard.md b/deploy_template/mygame/documentation/06-keyboard.md
deleted file mode 100644
index e226d16..0000000
--- a/deploy_template/mygame/documentation/06-keyboard.md
+++ /dev/null
@@ -1,150 +0,0 @@
-# Keyboard
-
-Determining if `a` key is in the down state (pressed). This happens once each time the key is pressed:
-
-```
-if args.inputs.keyboard.key_down.a
- puts 'The key is pressed'
-end
-```
-
-Determining if a key is being held. This happens every tick while the key is held down:
-
-```
-if args.inputs.keyboard.key_held.a
- puts 'The key is being held'
-end
-```
-
-Determining if a key is in the down state or is being held:
-
-```
-if args.inputs.keyboard.a
- puts 'The key is pressed or being held'
-end
-```
-
-Determining if a key is in the up state (released). This happens once each time the key is released:
-
-```
-if args.inputs.keyboard.key_up.a
- puts 'The key is released'
-end
-```
-
-# Truthy Keys
-
-You can access all triggered keys through `truthy_keys` on `keyboard`, `controller_one`, and `controller_two`.
-
-This is how you would right all keys to a file. The game must be in the foreground and have focus for this data
-to be recorded.
-
-```
-def tick args
- [
- [args.inputs.keyboard, :keyboard],
- [args.inputs.controller_one, :controller_one],
- [args.inputs.controller_two, :controller_two]
- ].each do |input, name|
- if input.key_down.truthy_keys.length > 0
- args.gtk.write_file("mygame/app/#{name}_key_down_#{args.state.tick_count}", input.key_down.truthy_keys.to_s)
- end
- end
-end
-```
-
-# List of keys:
-
-These are the character and associated properties that will
-be set to true.
-
-For example `A => :a, :shift` means that `args.inputs.keyboard.a`
-would be true and so would `args.inputs.keyboard.shift`
-(if both keys were being held or in the down state).
-
-```
-A => :a, :shift
-B => :b, :shift
-C => :c, :shift
-D => :d, :shift
-E => :e, :shift
-F => :f, :shift
-G => :g, :shift
-H => :h, :shift
-I => :i, :shift
-J => :j, :shift
-K => :k, :shift
-L => :l, :shift
-M => :m, :shift
-N => :n, :shift
-O => :o, :shift
-P => :p, :shift
-Q => :q, :shift
-R => :r, :shift
-S => :s, :shift
-T => :t, :shift
-U => :u, :shift
-V => :v, :shift
-W => :w, :shift
-X => :x, :shift
-Y => :y, :shift
-Z => :z, :shift
-! => :exclamation_point
-0 => :zero
-1 => :one
-2 => :two
-3 => :three
-4 => :four
-5 => :five
-6 => :six
-7 => :seven
-8 => :eight
-9 => :nine
-\b => :backspace
-\e => :escape
-\r => :enter
-\t => :tab
-( => :open_round_brace
-) => :close_round_brace
-{ => :open_curly_brace
-} => :close_curly_brace
-[ => :open_square_brace
-] => :close_square_brace
-: => :colon
-; => :semicolon
-= => :equal_sign
-- => :hyphen
- => :space
-$ => :dollar_sign
-" => :double_quotation_mark
-' => :single_quotation_mark
-` => :backtick
-~ => :tilde
-. => :period
-, => :comma
-| => :pipe
-_ => :underscore
-# => :hash
-+ => :plus
-@ => :at
-/ => :forward_slash
-\ => :back_slash
-* => :asterisk
-< => :less_than
-> => :greater_than
-^ => :greater_than
-& => :ampersand
-² => :superscript_two
-§ => :section_sign
-? => :question_mark
-% => :percent_sign
-º => :ordinal_indicator
-right arrow => :right
-left arrow => :left
-down arrow => :down
-up arrow => :up
-delete key => :delete
-control key => :control
-windows key/command key => :meta
-alt key => :alt
-```
diff --git a/deploy_template/mygame/documentation/07-mouse.md b/deploy_template/mygame/documentation/07-mouse.md
deleted file mode 100644
index 2af8854..0000000
--- a/deploy_template/mygame/documentation/07-mouse.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Mouse
-
-Determining current position of mouse:
-
-```
-args.inputs.mouse.x
-args.inputs.mouse.y
-```
-
-Determining if the mouse has been clicked, and it's position. Note:
-`click` and `down` are aliases for each other.
-
-```
-if args.inputs.mouse.click
- puts "click: #{args.inputs.mouse.click}"
- puts "x: #{args.inputs.mouse.click.point.x}"
- puts "y: #{args.inputs.mouse.click.point.y}"
-end
-```
-
-Determining if the mouse button has been released:
-
-```
-if args.inputs.mouse.up
- puts "up: #{args.inputs.mouse.up}"
- puts "x: #{args.inputs.mouse.up.point.x}"
- puts "y: #{args.inputs.mouse.up.point.y}"
-end
-```
-
-Determine which mouse button(s) have been clicked (also works for up):
-```
-if args.inputs.mouse.click
- puts "left: #{args.inputs.mouse.button_left}"
- puts "middle: #{args.inputs.mouse.button_middle}"
- puts "right: #{args.inputs.mouse.button_right}"
- puts "x1: #{args.inputs.mouse.button_x1}"
- puts "x2: #{args.inputs.mouse.button_x2}"
-end
-```
-
-Determine if the mouse wheel is being used and its values for this tick:
-```
-if args.inputs.mouse.wheel
- puts "The wheel moved #{args.inputs.mouse.wheel.x} left/right"
- puts "The wheel moved #{args.inputs.mouse.wheel.y} up/down"
-end
-```
diff --git a/deploy_template/mygame/documentation/08-controllers.md b/deploy_template/mygame/documentation/08-controllers.md
deleted file mode 100644
index fca575f..0000000
--- a/deploy_template/mygame/documentation/08-controllers.md
+++ /dev/null
@@ -1,86 +0,0 @@
-# Controllers
-
-There are two controllers you have access to:
-
-```
-args.inputs.controller_one
-args.inputs.controller_two
-```
-
-Determining if a key was down:
-
-```
-if args.inputs.controller_one.key_down.a
- puts 'The key was in the down state'
-end
-```
-
-Determining if a key is being held:
-
-```
-if args.inputs.controller_one.key_held.a
- puts 'The key is being held'
-end
-```
-
-Determining if a key is released:
-
-```
-if args.inputs.controller_one.key_up.a
- puts 'The key is being held'
-end
-```
-
-# Truthy Keys
-
-You can access all triggered keys through `truthy_keys` on `keyboard`, `controller_one`, and `controller_two`.
-
-This is how you would right all keys to a file. The game must be in the foreground and have focus for this data
-to be recorded.
-
-```
-def tick args
- [
- [args.inputs.keyboard, :keyboard],
- [args.inputs.controller_one, :controller_one],
- [args.inputs.controller_two, :controller_two]
- ].each do |input, name|
- if input.key_down.truthy_keys.length > 0
- args.gtk.write_file("mygame/app/#{name}_key_down_#{args.state.tick_count}", input.key_down.truthy_keys.to_s)
- end
- end
-end
-```
-
-# List of keys:
-
-```
-args.inputs.controller_one.key_held.up
-args.inputs.controller_one.key_held.down
-args.inputs.controller_one.key_held.left
-args.inputs.controller_one.key_held.right
-args.inputs.controller_one.key_held.a
-args.inputs.controller_one.key_held.b
-args.inputs.controller_one.x
-args.inputs.controller_one.y
-args.inputs.controller_one.key_held.l1
-args.inputs.controller_one.key_held.r1
-args.inputs.controller_one.key_held.l2
-args.inputs.controller_one.key_held.r2
-args.inputs.controller_one.key_held.l3
-args.inputs.controller_one.key_held.r3
-args.inputs.controller_one.key_held.start
-args.inputs.controller_one.key_held.select
-args.inputs.controller_one.key_held.directional_up
-args.inputs.controller_one.key_held.directional_down
-args.inputs.controller_one.key_held.directional_left
-args.inputs.controller_one.key_held.directional_right
-args.inputs.controller_one.left_analog_x_raw,
-args.inputs.controller_one.left_analog_y_raw,
-args.inputs.controller_one.left_analog_x_perc,
-args.inputs.controller_one.left_analog_y_perc,
-args.inputs.controller_one.right_analog_x_raw,
-args.inputs.controller_one.right_analog_y_raw,
-args.inputs.controller_one.right_analog_x_perc,
-args.inputs.controller_one.right_analog_y_perc
-```
diff --git a/deploy_template/mygame/documentation/99-todo.md b/deploy_template/mygame/documentation/99-todo.md
deleted file mode 100644
index f02df2d..0000000
--- a/deploy_template/mygame/documentation/99-todo.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# Documentation That Needs to be Organized
-
-## Class macro attr_gtk
-
-Use the `attr_gtk` class method to help access the different variables provided via `args`:
-
-```ruby
-class Game
- attr_gtk
- attr_accessor :current_scene, :other_custom_attrs
-
- def tick
- end
-end
-
-$game = Game.new
-
-def tick args
- $game.args = args
- $game.tick
-end
-```
-
-The code above is the similar to:
-
-```ruby
-class Game
- attr_accessor :args, :grid, :state, :inputs, :outputs, :gtk, :passes,
- :current_scene, :other_custom_attrs
-
- def tick
- end
-end
-
-$game = Game.new
-
-def tick args
- $game.args = args
- $game.grid = args.grid
- $game.state = args.state
- $game.outputs = args.outputs
- $game.gtk = args.gtk
- $game.passes = args.passes
- $game.tick
-end
-```
-
-## Monkey patching the runtime
-
-You're on your own if you do this :grimacing:
-
-```ruby
-module GTK
- class Runtime
- alias_method :__original_tick_core__, :tick_core unless Runtime.instance_methods.include?(:__original_tick_core__)
-
- def tick_core
- __original_tick_core__
- $top_level.oh @args
- $top_level.god @args
- $top_level.why @args
- end
- end
-end
-
-def tick args
-end
-
-def oh args
-end
-
-def god args
-end
-
-def why args
-end
-```
-
-## MP3's to Wav converstion script:
-
-```ruby
-`ls .`.each_line.to_a.map do |l|
- l = l.strip
- if l.end_with? "mp3"
- `ffmpeg -i #{l} -acodec pcm_s16le -ar 44100 prep-#{l.split(".")[0]}.wav`
- `ffmpeg -y -i prep-#{l.split(".")[0]}.wav -f wav -bitexact -acodec pcm_s16le -ar 44100 -ac 1 #{l.split(".")[0]}.wav`
- end
-end
-```
diff --git a/deploy_template/mygame/fonts/.gitkeep b/deploy_template/mygame/fonts/.gitkeep
new file mode 100644
index 0000000..a03e35e
--- /dev/null
+++ b/deploy_template/mygame/fonts/.gitkeep
@@ -0,0 +1 @@
+Put your custom fonts here. \ No newline at end of file
diff --git a/deploy_template/mygame/metadata/game_metadata.txt b/deploy_template/mygame/metadata/game_metadata.txt
index 1b03500..4fb92f4 100644
--- a/deploy_template/mygame/metadata/game_metadata.txt
+++ b/deploy_template/mygame/metadata/game_metadata.txt
@@ -4,3 +4,4 @@
#gametitle=My Game
#version=0.1
#icon=metadata/icon.png
+#compile_ruby=false
diff --git a/deploy_template/mygame/metadata/ios_metadata.txt b/deploy_template/mygame/metadata/ios_metadata.txt
new file mode 100644
index 0000000..5a2f375
--- /dev/null
+++ b/deploy_template/mygame/metadata/ios_metadata.txt
@@ -0,0 +1,9 @@
+# ios_metadata.txt is used by the Pro version of DragonRuby Game Toolkit to create iOS apps.
+# Information about the Pro version can be found at: http://dragonruby.org/toolkit/game#purchase
+
+# teamname needs to be set to your assigned team id which can be found at https://developer.apple.com/account/#/membership/L7H57V9CRD
+teamid=
+# appid needs to be set to your application identifier which can be found at https://developer.apple.com/account/resources/identifiers/list
+appid=
+# appname is the name you want to show up underneath the app icon on the device
+appname=
diff --git a/deploy_template/mygame/sounds/.gitkeep b/deploy_template/mygame/sounds/.gitkeep
new file mode 100644
index 0000000..a99ec00
--- /dev/null
+++ b/deploy_template/mygame/sounds/.gitkeep
@@ -0,0 +1 @@
+Put your sounds here. \ No newline at end of file
diff --git a/deploy_template/mygame/sprites/border-black.png b/deploy_template/mygame/sprites/border-black.png
deleted file mode 100644
index c9d0bad..0000000
--- a/deploy_template/mygame/sprites/border-black.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-black.png b/deploy_template/mygame/sprites/circle-black.png
deleted file mode 100644
index c98e23d..0000000
--- a/deploy_template/mygame/sprites/circle-black.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-blue.png b/deploy_template/mygame/sprites/circle-blue.png
deleted file mode 100644
index 1726d2a..0000000
--- a/deploy_template/mygame/sprites/circle-blue.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-gray.png b/deploy_template/mygame/sprites/circle-gray.png
deleted file mode 100644
index 960f191..0000000
--- a/deploy_template/mygame/sprites/circle-gray.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-green.png b/deploy_template/mygame/sprites/circle-green.png
deleted file mode 100644
index 43cf7ee..0000000
--- a/deploy_template/mygame/sprites/circle-green.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-indigo.png b/deploy_template/mygame/sprites/circle-indigo.png
deleted file mode 100644
index 598e240..0000000
--- a/deploy_template/mygame/sprites/circle-indigo.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-orange.png b/deploy_template/mygame/sprites/circle-orange.png
deleted file mode 100644
index 5604a42..0000000
--- a/deploy_template/mygame/sprites/circle-orange.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-red.png b/deploy_template/mygame/sprites/circle-red.png
deleted file mode 100644
index 7f17ca6..0000000
--- a/deploy_template/mygame/sprites/circle-red.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-violet.png b/deploy_template/mygame/sprites/circle-violet.png
deleted file mode 100644
index 681d210..0000000
--- a/deploy_template/mygame/sprites/circle-violet.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-white.png b/deploy_template/mygame/sprites/circle-white.png
deleted file mode 100644
index bd32155..0000000
--- a/deploy_template/mygame/sprites/circle-white.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle-yellow.png b/deploy_template/mygame/sprites/circle-yellow.png
deleted file mode 100644
index 94992eb..0000000
--- a/deploy_template/mygame/sprites/circle-yellow.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/black.png b/deploy_template/mygame/sprites/circle/black.png
new file mode 100644
index 0000000..7ec40e9
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/black.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/blue.png b/deploy_template/mygame/sprites/circle/blue.png
new file mode 100644
index 0000000..96bf51b
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/blue.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/gray.png b/deploy_template/mygame/sprites/circle/gray.png
new file mode 100644
index 0000000..e13f8c3
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/gray.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/green.png b/deploy_template/mygame/sprites/circle/green.png
new file mode 100644
index 0000000..73fcea0
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/green.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/indigo.png b/deploy_template/mygame/sprites/circle/indigo.png
new file mode 100644
index 0000000..6afb0e0
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/indigo.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/orange.png b/deploy_template/mygame/sprites/circle/orange.png
new file mode 100644
index 0000000..8623103
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/orange.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/red.png b/deploy_template/mygame/sprites/circle/red.png
new file mode 100644
index 0000000..c4cc37c
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/red.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/violet.png b/deploy_template/mygame/sprites/circle/violet.png
new file mode 100644
index 0000000..3dc5c37
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/violet.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/white.png b/deploy_template/mygame/sprites/circle/white.png
new file mode 100644
index 0000000..2ec542a
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/white.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/circle/yellow.png b/deploy_template/mygame/sprites/circle/yellow.png
new file mode 100644
index 0000000..eca1037
--- /dev/null
+++ b/deploy_template/mygame/sprites/circle/yellow.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-black.png b/deploy_template/mygame/sprites/hexagon-black.png
deleted file mode 100644
index f50c872..0000000
--- a/deploy_template/mygame/sprites/hexagon-black.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-blue.png b/deploy_template/mygame/sprites/hexagon-blue.png
deleted file mode 100644
index 1696bae..0000000
--- a/deploy_template/mygame/sprites/hexagon-blue.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-gray.png b/deploy_template/mygame/sprites/hexagon-gray.png
deleted file mode 100644
index e8c4c5a..0000000
--- a/deploy_template/mygame/sprites/hexagon-gray.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-green.png b/deploy_template/mygame/sprites/hexagon-green.png
deleted file mode 100644
index a700602..0000000
--- a/deploy_template/mygame/sprites/hexagon-green.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-indigo.png b/deploy_template/mygame/sprites/hexagon-indigo.png
deleted file mode 100644
index 15f6f4f..0000000
--- a/deploy_template/mygame/sprites/hexagon-indigo.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-orange.png b/deploy_template/mygame/sprites/hexagon-orange.png
deleted file mode 100644
index 1587173..0000000
--- a/deploy_template/mygame/sprites/hexagon-orange.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-red.png b/deploy_template/mygame/sprites/hexagon-red.png
deleted file mode 100644
index d442f39..0000000
--- a/deploy_template/mygame/sprites/hexagon-red.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-violet.png b/deploy_template/mygame/sprites/hexagon-violet.png
deleted file mode 100644
index 3be5731..0000000
--- a/deploy_template/mygame/sprites/hexagon-violet.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-white.png b/deploy_template/mygame/sprites/hexagon-white.png
deleted file mode 100644
index c1ad970..0000000
--- a/deploy_template/mygame/sprites/hexagon-white.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon-yellow.png b/deploy_template/mygame/sprites/hexagon-yellow.png
deleted file mode 100644
index 63f5f34..0000000
--- a/deploy_template/mygame/sprites/hexagon-yellow.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/black.png b/deploy_template/mygame/sprites/hexagon/black.png
new file mode 100644
index 0000000..03a6c8a
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/black.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/blue.png b/deploy_template/mygame/sprites/hexagon/blue.png
new file mode 100644
index 0000000..ca45f9b
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/blue.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/gray.png b/deploy_template/mygame/sprites/hexagon/gray.png
new file mode 100644
index 0000000..230b436
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/gray.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/green.png b/deploy_template/mygame/sprites/hexagon/green.png
new file mode 100644
index 0000000..e740746
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/green.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/indigo.png b/deploy_template/mygame/sprites/hexagon/indigo.png
new file mode 100644
index 0000000..13b7065
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/indigo.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/orange.png b/deploy_template/mygame/sprites/hexagon/orange.png
new file mode 100644
index 0000000..85988f1
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/orange.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/red.png b/deploy_template/mygame/sprites/hexagon/red.png
new file mode 100644
index 0000000..bb0740f
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/red.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/violet.png b/deploy_template/mygame/sprites/hexagon/violet.png
new file mode 100644
index 0000000..ca3f1c7
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/violet.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/white.png b/deploy_template/mygame/sprites/hexagon/white.png
new file mode 100644
index 0000000..7d0ee81
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/white.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/hexagon/yellow.png b/deploy_template/mygame/sprites/hexagon/yellow.png
new file mode 100644
index 0000000..3b4de18
--- /dev/null
+++ b/deploy_template/mygame/sprites/hexagon/yellow.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-black.png b/deploy_template/mygame/sprites/isometric-black.png
deleted file mode 100644
index fa9e463..0000000
--- a/deploy_template/mygame/sprites/isometric-black.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-blue.png b/deploy_template/mygame/sprites/isometric-blue.png
deleted file mode 100644
index a3d8524..0000000
--- a/deploy_template/mygame/sprites/isometric-blue.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-gray.png b/deploy_template/mygame/sprites/isometric-gray.png
deleted file mode 100644
index 85dcc1d..0000000
--- a/deploy_template/mygame/sprites/isometric-gray.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-green.png b/deploy_template/mygame/sprites/isometric-green.png
deleted file mode 100644
index ec2773e..0000000
--- a/deploy_template/mygame/sprites/isometric-green.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-indigo.png b/deploy_template/mygame/sprites/isometric-indigo.png
deleted file mode 100644
index e6be50c..0000000
--- a/deploy_template/mygame/sprites/isometric-indigo.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-orange.png b/deploy_template/mygame/sprites/isometric-orange.png
deleted file mode 100644
index 154d81c..0000000
--- a/deploy_template/mygame/sprites/isometric-orange.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-red.png b/deploy_template/mygame/sprites/isometric-red.png
deleted file mode 100644
index 3448c4d..0000000
--- a/deploy_template/mygame/sprites/isometric-red.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-violet.png b/deploy_template/mygame/sprites/isometric-violet.png
deleted file mode 100644
index f09bf21..0000000
--- a/deploy_template/mygame/sprites/isometric-violet.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-white.png b/deploy_template/mygame/sprites/isometric-white.png
deleted file mode 100644
index a45793d..0000000
--- a/deploy_template/mygame/sprites/isometric-white.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric-yellow.png b/deploy_template/mygame/sprites/isometric-yellow.png
deleted file mode 100644
index 9be20c7..0000000
--- a/deploy_template/mygame/sprites/isometric-yellow.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/black.png b/deploy_template/mygame/sprites/isometric/black.png
new file mode 100644
index 0000000..698f791
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/black.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/blue.png b/deploy_template/mygame/sprites/isometric/blue.png
new file mode 100644
index 0000000..175141d
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/blue.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/gray.png b/deploy_template/mygame/sprites/isometric/gray.png
new file mode 100644
index 0000000..6b776d8
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/gray.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/green.png b/deploy_template/mygame/sprites/isometric/green.png
new file mode 100644
index 0000000..f2099e6
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/green.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/indigo.png b/deploy_template/mygame/sprites/isometric/indigo.png
new file mode 100644
index 0000000..952a093
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/indigo.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/orange.png b/deploy_template/mygame/sprites/isometric/orange.png
new file mode 100644
index 0000000..1f0d433
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/orange.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/red.png b/deploy_template/mygame/sprites/isometric/red.png
new file mode 100644
index 0000000..45e565a
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/red.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/violet.png b/deploy_template/mygame/sprites/isometric/violet.png
new file mode 100644
index 0000000..e9ca156
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/violet.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/white.png b/deploy_template/mygame/sprites/isometric/white.png
new file mode 100644
index 0000000..3360681
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/white.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/isometric/yellow.png b/deploy_template/mygame/sprites/isometric/yellow.png
new file mode 100644
index 0000000..b4cd60c
--- /dev/null
+++ b/deploy_template/mygame/sprites/isometric/yellow.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/dragon-0.png b/deploy_template/mygame/sprites/misc/dragon-0.png
index fb179af..fb179af 100644
--- a/deploy_template/mygame/sprites/dragon-0.png
+++ b/deploy_template/mygame/sprites/misc/dragon-0.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/dragon-1.png b/deploy_template/mygame/sprites/misc/dragon-1.png
index 8cfe531..8cfe531 100644
--- a/deploy_template/mygame/sprites/dragon-1.png
+++ b/deploy_template/mygame/sprites/misc/dragon-1.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/dragon-2.png b/deploy_template/mygame/sprites/misc/dragon-2.png
index cb462e1..cb462e1 100644
--- a/deploy_template/mygame/sprites/dragon-2.png
+++ b/deploy_template/mygame/sprites/misc/dragon-2.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/dragon-3.png b/deploy_template/mygame/sprites/misc/dragon-3.png
index 04c4977..04c4977 100644
--- a/deploy_template/mygame/sprites/dragon-3.png
+++ b/deploy_template/mygame/sprites/misc/dragon-3.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/dragon-4.png b/deploy_template/mygame/sprites/misc/dragon-4.png
index b29fa3d..b29fa3d 100644
--- a/deploy_template/mygame/sprites/dragon-4.png
+++ b/deploy_template/mygame/sprites/misc/dragon-4.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/dragon-5.png b/deploy_template/mygame/sprites/misc/dragon-5.png
index 99f4e74..99f4e74 100644
--- a/deploy_template/mygame/sprites/dragon-5.png
+++ b/deploy_template/mygame/sprites/misc/dragon-5.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-0.png b/deploy_template/mygame/sprites/misc/explosion-0.png
index f48636f..f48636f 100644
--- a/deploy_template/mygame/sprites/explosion-0.png
+++ b/deploy_template/mygame/sprites/misc/explosion-0.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-1.png b/deploy_template/mygame/sprites/misc/explosion-1.png
index b4018d9..b4018d9 100644
--- a/deploy_template/mygame/sprites/explosion-1.png
+++ b/deploy_template/mygame/sprites/misc/explosion-1.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-2.png b/deploy_template/mygame/sprites/misc/explosion-2.png
index 3abaedd..3abaedd 100644
--- a/deploy_template/mygame/sprites/explosion-2.png
+++ b/deploy_template/mygame/sprites/misc/explosion-2.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-3.png b/deploy_template/mygame/sprites/misc/explosion-3.png
index fe94a5a..fe94a5a 100644
--- a/deploy_template/mygame/sprites/explosion-3.png
+++ b/deploy_template/mygame/sprites/misc/explosion-3.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-4.png b/deploy_template/mygame/sprites/misc/explosion-4.png
index ed04237..ed04237 100644
--- a/deploy_template/mygame/sprites/explosion-4.png
+++ b/deploy_template/mygame/sprites/misc/explosion-4.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-5.png b/deploy_template/mygame/sprites/misc/explosion-5.png
index 2cd8f06..2cd8f06 100644
--- a/deploy_template/mygame/sprites/explosion-5.png
+++ b/deploy_template/mygame/sprites/misc/explosion-5.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-6.png b/deploy_template/mygame/sprites/misc/explosion-6.png
index e55909c..e55909c 100644
--- a/deploy_template/mygame/sprites/explosion-6.png
+++ b/deploy_template/mygame/sprites/misc/explosion-6.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/explosion-sheet.png b/deploy_template/mygame/sprites/misc/explosion-sheet.png
index 8559a5c..8559a5c 100644
--- a/deploy_template/mygame/sprites/explosion-sheet.png
+++ b/deploy_template/mygame/sprites/misc/explosion-sheet.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/misc/lowrez-ship-blue.png b/deploy_template/mygame/sprites/misc/lowrez-ship-blue.png
new file mode 100644
index 0000000..7a3d3aa
--- /dev/null
+++ b/deploy_template/mygame/sprites/misc/lowrez-ship-blue.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/misc/lowrez-ship-red.png b/deploy_template/mygame/sprites/misc/lowrez-ship-red.png
new file mode 100644
index 0000000..dd1a1d4
--- /dev/null
+++ b/deploy_template/mygame/sprites/misc/lowrez-ship-red.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/misc/simple-mood-16x16.png b/deploy_template/mygame/sprites/misc/simple-mood-16x16.png
new file mode 100644
index 0000000..0eca11e
--- /dev/null
+++ b/deploy_template/mygame/sprites/misc/simple-mood-16x16.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/star.png b/deploy_template/mygame/sprites/misc/star.png
index e0ee0f9..e0ee0f9 100644
--- a/deploy_template/mygame/sprites/star.png
+++ b/deploy_template/mygame/sprites/misc/star.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/misc/tiny-star.png b/deploy_template/mygame/sprites/misc/tiny-star.png
new file mode 100644
index 0000000..e04786a
--- /dev/null
+++ b/deploy_template/mygame/sprites/misc/tiny-star.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-black.png b/deploy_template/mygame/sprites/square-black.png
deleted file mode 100644
index cea7bd7..0000000
--- a/deploy_template/mygame/sprites/square-black.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-blue.png b/deploy_template/mygame/sprites/square-blue.png
deleted file mode 100644
index b840849..0000000
--- a/deploy_template/mygame/sprites/square-blue.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-gray.png b/deploy_template/mygame/sprites/square-gray.png
deleted file mode 100644
index 2142b30..0000000
--- a/deploy_template/mygame/sprites/square-gray.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-green.png b/deploy_template/mygame/sprites/square-green.png
deleted file mode 100644
index 5ef7f75..0000000
--- a/deploy_template/mygame/sprites/square-green.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-indigo.png b/deploy_template/mygame/sprites/square-indigo.png
deleted file mode 100644
index 2384108..0000000
--- a/deploy_template/mygame/sprites/square-indigo.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-orange.png b/deploy_template/mygame/sprites/square-orange.png
deleted file mode 100644
index bb1eee7..0000000
--- a/deploy_template/mygame/sprites/square-orange.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-red.png b/deploy_template/mygame/sprites/square-red.png
deleted file mode 100644
index 3ed5f13..0000000
--- a/deploy_template/mygame/sprites/square-red.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-violet.png b/deploy_template/mygame/sprites/square-violet.png
deleted file mode 100644
index 333540c..0000000
--- a/deploy_template/mygame/sprites/square-violet.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-white.png b/deploy_template/mygame/sprites/square-white.png
deleted file mode 100644
index 378c565..0000000
--- a/deploy_template/mygame/sprites/square-white.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square-yellow.png b/deploy_template/mygame/sprites/square-yellow.png
deleted file mode 100644
index 0edeeec..0000000
--- a/deploy_template/mygame/sprites/square-yellow.png
+++ /dev/null
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/black.png b/deploy_template/mygame/sprites/square/black.png
new file mode 100644
index 0000000..1a80bda
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/black.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/blue.png b/deploy_template/mygame/sprites/square/blue.png
new file mode 100644
index 0000000..3194ff5
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/blue.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/gray.png b/deploy_template/mygame/sprites/square/gray.png
new file mode 100644
index 0000000..b94f1dd
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/gray.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/green.png b/deploy_template/mygame/sprites/square/green.png
new file mode 100644
index 0000000..d14a892
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/green.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/indigo.png b/deploy_template/mygame/sprites/square/indigo.png
new file mode 100644
index 0000000..f66aa46
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/indigo.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/orange.png b/deploy_template/mygame/sprites/square/orange.png
new file mode 100644
index 0000000..bf023bc
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/orange.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/red.png b/deploy_template/mygame/sprites/square/red.png
new file mode 100644
index 0000000..a59443e
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/red.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/violet.png b/deploy_template/mygame/sprites/square/violet.png
new file mode 100644
index 0000000..c8f3db8
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/violet.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/white.png b/deploy_template/mygame/sprites/square/white.png
new file mode 100644
index 0000000..7a233ea
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/white.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/square/yellow.png b/deploy_template/mygame/sprites/square/yellow.png
new file mode 100644
index 0000000..3b586c4
--- /dev/null
+++ b/deploy_template/mygame/sprites/square/yellow.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0000.png b/deploy_template/mygame/sprites/tile/wall-0000.png
new file mode 100644
index 0000000..469795c
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0000.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0001.png b/deploy_template/mygame/sprites/tile/wall-0001.png
new file mode 100644
index 0000000..afcac7a
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0001.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0010.png b/deploy_template/mygame/sprites/tile/wall-0010.png
new file mode 100644
index 0000000..b791e98
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0010.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0011.png b/deploy_template/mygame/sprites/tile/wall-0011.png
new file mode 100644
index 0000000..9e7d664
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0011.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0100.png b/deploy_template/mygame/sprites/tile/wall-0100.png
new file mode 100644
index 0000000..e49aadb
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0100.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0101.png b/deploy_template/mygame/sprites/tile/wall-0101.png
new file mode 100644
index 0000000..b040a4a
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0101.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0110.png b/deploy_template/mygame/sprites/tile/wall-0110.png
new file mode 100644
index 0000000..2273582
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0110.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-0111.png b/deploy_template/mygame/sprites/tile/wall-0111.png
new file mode 100644
index 0000000..ae2faca
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-0111.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1000.png b/deploy_template/mygame/sprites/tile/wall-1000.png
new file mode 100644
index 0000000..900990d
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1000.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1001.png b/deploy_template/mygame/sprites/tile/wall-1001.png
new file mode 100644
index 0000000..45aa962
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1001.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1010.png b/deploy_template/mygame/sprites/tile/wall-1010.png
new file mode 100644
index 0000000..9333835
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1010.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1011.png b/deploy_template/mygame/sprites/tile/wall-1011.png
new file mode 100644
index 0000000..439f135
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1011.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1100.png b/deploy_template/mygame/sprites/tile/wall-1100.png
new file mode 100644
index 0000000..67a2433
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1100.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1101.png b/deploy_template/mygame/sprites/tile/wall-1101.png
new file mode 100644
index 0000000..8e06769
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1101.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1110.png b/deploy_template/mygame/sprites/tile/wall-1110.png
new file mode 100644
index 0000000..d92e46c
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1110.png
Binary files differ
diff --git a/deploy_template/mygame/sprites/tile/wall-1111.png b/deploy_template/mygame/sprites/tile/wall-1111.png
new file mode 100644
index 0000000..e5ce32f
--- /dev/null
+++ b/deploy_template/mygame/sprites/tile/wall-1111.png
Binary files differ