Initial commit: Carrot Hunter v2 with 20 levels

This commit is contained in:
Alex
2026-01-28 13:58:46 +01:00
commit 26594879a2
78 changed files with 9223 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
{
"name": "Carrot Hunter",
"start_url": "/index.html",
"display": "fullscreen",
"orientation": "portrait",
"icons": [{
"src": "icon-16.png",
"sizes": "16x16",
}, {
"src": "icon-32.png",
"sizes": "32x32",
}, {
"src": "icon-128.png",
"sizes": "128x128",
}, {
"src": "icon-256.png",
"sizes": "256x256",
}]
}

View File

@@ -0,0 +1 @@
chrome.app.runtime.onLaunched.addListener(function() { chrome.app.window.create('index.html', { frame: 'chrome', bounds: { width: 1024, height: 575}, minWidth:1024, minHeight: 575 }); }); chrome.commands.onCommand.addListener(function(command) { console.log("Command triggered: " + command); if (command == "cmdNew") { chrome.app.window.create('index.html', { frame: 'chrome', bounds: { width: 500, height: 900}, minWidth:500, minHeight: 900 }); } });

2638
Carrot_Hunter/c2runtime.js Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,28 @@
// Size the canvas to fill the browser viewport.
jQuery(window).resize(function() {
cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());
});
window.addEventListener('orientationchange', cr_sizeCanvas, false);
// Start the Construct 2 project running on window load.
jQuery(document).ready(function ()
{
// Create new runtime using the c2canvas
cr_createRuntime("c2canvas");
cr_sizeCanvas(jQuery(window).width(), jQuery(window).height());
});
// Pause and resume on page becoming visible/invisible
function onVisibilityChanged() {
if (document.hidden || document.mozHidden || document.webkitHidden || document.msHidden)
cr_setSuspended(true);
else
cr_setSuspended(false);
};
document.addEventListener("visibilitychange", onVisibilityChanged, false);
document.addEventListener("mozvisibilitychange", onVisibilityChanged, false);
document.addEventListener("webkitvisibilitychange", onVisibilityChanged, false);
document.addEventListener("msvisibilitychange", onVisibilityChanged, false);

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

121
Carrot_Hunter/debug.html Normal file
View File

@@ -0,0 +1,121 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Carrot Hunter - Debug</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<style>
* {
padding: 0;
margin: 0;
}
html, body {
background: #000;
color: #fff;
overflow: hidden;
touch-action: none;
-ms-touch-action: none;
}
canvas {
touch-action-delay: none;
touch-action: none;
-ms-touch-action: none;
}
#debug {
position: fixed;
top: 10px;
left: 10px;
background: rgba(255,0,0,0.8);
color: white;
padding: 10px;
font-family: monospace;
font-size: 12px;
z-index: 9999;
max-width: 90%;
max-height: 200px;
overflow: auto;
}
.ok {
background: rgba(0,255,0,0.8) !important;
}
</style>
</head>
<body>
<div id="debug">Loading...</div>
<div id="fb-root"></div>
<script>
var debugLog = [];
function log(msg, isError) {
console.log(msg);
debugLog.push((isError ? '❌ ' : '✓ ') + msg);
updateDebug();
}
function updateDebug() {
var div = document.getElementById('debug');
div.innerHTML = debugLog.join('<br>');
if (debugLog.length > 0 && !debugLog[debugLog.length - 1].startsWith('❌')) {
div.className = 'ok';
}
}
window.onerror = function(msg, url, line) {
log('ERROR: ' + msg + ' at line ' + line, true);
return false;
};
log('Starting...');
</script>
<script src="c2runtime.js" onload="log('c2runtime.js loaded')" onerror="log('Failed to load c2runtime.js', true)"></script>
<canvas id="c2canvas" width="854" height="480">
<h1>Your browser does not support HTML5 Canvas</h1>
</canvas>
<script>
log('Canvas element created');
var canvas = document.getElementById('c2canvas');
if (canvas) {
log('Canvas found: ' + canvas.width + 'x' + canvas.height);
} else {
log('Canvas NOT found!', true);
}
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
onload="log('jQuery loaded: v' + jQuery.fn.jquery)"
onerror="log('Failed to load jQuery', true)"></script>
<script>
// Wait for jQuery to load
var checkJQuery = setInterval(function() {
if (typeof jQuery !== 'undefined') {
clearInterval(checkJQuery);
log('jQuery ready');
loadWebAppStart();
}
}, 100);
function loadWebAppStart() {
var script = document.createElement('script');
script.src = 'c2webappstart.js';
script.onload = function() {
log('c2webappstart.js loaded');
setTimeout(function() {
if (typeof cr_createRuntime !== 'undefined') {
log('Game initialized successfully!');
} else {
log('cr_createRuntime not found', true);
}
}, 1000);
};
script.onerror = function() {
log('Failed to load c2webappstart.js', true);
};
document.body.appendChild(script);
}
</script>
</body>
</html>

BIN
Carrot_Hunter/icon-114.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
Carrot_Hunter/icon-128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
Carrot_Hunter/icon-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

BIN
Carrot_Hunter/icon-256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
Carrot_Hunter/icon-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 168 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

44
Carrot_Hunter/index.html Normal file
View File

@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Carrot Hunter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<style>
* {
padding: 0;
margin: 0;
}
html, body {
background: #000;
color: #fff;
overflow: hidden;
touch-action: none;
-ms-touch-action: none;
}
canvas {
touch-action-delay: none;
touch-action: none;
-ms-touch-action: none;
}
</style>
</head>
<body>
<div id="fb-root"></div>
<script src="c2runtime.js"></script>
<canvas id="c2canvas" width="854" height="480">
<h1>Your browser does not appear to support HTML5. Try upgrading your browser to the latest version. <a href="http://www.whatbrowser.org">What is a browser?</a>
<br/><br/><a href="http://www.microsoft.com/windows/internet-explorer/default.aspx">Microsoft Internet Explorer</a><br/>
<a href="http://www.mozilla.com/firefox/">Mozilla Firefox</a><br/>
<a href="http://www.google.com/chrome/">Google Chrome</a><br/>
<a href="http://www.apple.com/safari/download/">Apple Safari</a></h1>
</canvas>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="c2webappstart.js"></script>
</body>
</html>

View File

@@ -0,0 +1,17 @@
{
"manifest_version": 2,
"name": "Carrot Hunter",
"version": "1.0",
"minimum_chrome_version": "28",
"app": {
"background": {
"scripts": ["background.js"]
}
},
"icons": {
"16": "icon-16.png",
"32": "icon-32.png",
"128": "icon-128.png",
"256": "icon-256.png"
}
}