new ruffle

This commit is contained in:
BluePotato102
2023-12-25 10:54:54 -06:00
committed by avsc-sid
parent 464bcf5399
commit c173a9ec2c
73 changed files with 2715 additions and 215 deletions
+13 -13
View File
@@ -136,17 +136,17 @@
"categories": []
},
"Bloons TD 3": {
"path": "w-flash/?game=bloons-tower-defense-3",
"path": "flash/?game=bloons-td-3",
"aliases": [],
"categories": []
},
"Bloons TD 4": {
"path": "w-flash/?game=bloons-tower-defense-4",
"path": "flash/?game=bloons-td-4",
"aliases": [],
"categories": []
},
"Bloons TD 5": {
"path": "w-flash/?game=bloons-tower-defense-5",
"path": "flash/?game=bloons-td-5",
"aliases": [],
"categories": []
},
@@ -241,17 +241,17 @@
"categories": []
},
"Don't Escape": {
"path": "w-flash/?game=dont-escape",
"path": "flash/?game=dont-escape",
"aliases": [],
"categories": []
},
"Don't Escape 2": {
"path": "w-flash/?game=dont-escape-2",
"path": "flash/?game=dont-escape-2",
"aliases": [],
"categories": []
},
"Don't Escape 3": {
"path": "w-flash/?game=dont-escape-3",
"path": "flash/?game=dont-escape-3",
"aliases": [],
"categories": []
},
@@ -296,7 +296,7 @@
"categories": []
},
"Duck Life Treasure Hunt": {
"path": "w-flash/?game=duck-life-treasure-hunt",
"path": "flash/?game=duck-life-treasure-hunt",
"aliases": [],
"categories": []
},
@@ -341,12 +341,12 @@
"categories": []
},
"Escape The Freezer": {
"path": "w-flash/?game=escape-the-freezer",
"path": "flash/?game=escape-the-freezer",
"aliases": [],
"categories": []
},
"Escape The Shack": {
"path": "w-flash/?game=escape-the-shack",
"path": "flash/?game=escape-the-shack",
"aliases": [],
"categories": []
},
@@ -461,7 +461,7 @@
"categories": []
},
"Learn To Fly 2": {
"path": "w-flash/?game=learn-to-fly-2",
"path": "flash/?game=learn-to-fly-2",
"aliases": [],
"categories": []
},
@@ -596,12 +596,12 @@
"categories": []
},
"Rogue Soul": {
"path": "w-flash/?game=rogue-soul",
"path": "flash/?game=rogue-soul",
"aliases": [],
"categories": []
},
"Rogue Soul 2": {
"path": "w-flash/?game=rogue-soul-2",
"path": "flash/?game=rogue-soul-2",
"aliases": [],
"categories": []
},
@@ -861,7 +861,7 @@
"categories": []
},
"Ultimate Chess": {
"path": "w-flash/?game=ultimate-chess",
"path": "flash/?game=ultimate-chess",
"aliases": [],
"categories": []
},
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

+58 -42
View File
@@ -1,42 +1,58 @@
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-7L02W3ZMS5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-7L02W3ZMS5');
</script>
<script async="" crossorigin="anonymous" src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-5648726754785335"></script>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<title>Flash Player</title>
<link href="/" id="favicon" rel="shortcut icon" type="image/png"/>
</head>
<body>
<div height="100%" id="ruffle" width="100%"></div>
<script src="ruffle.js"></script>
<script>
var game = (new URLSearchParams(window.location.search)).get('game');
if (game){
document.title = (game.replace(/-/g,' ')).toLowerCase().split(' ').map(function(word) {return word[0].toUpperCase() + word.substr(1);}).join(' ');
document.querySelector('#favicon').href = `images/${game}.png`;
window.RufflePlayer = window.RufflePlayer || {};
window.addEventListener("load", (event) => {
const ruffle = window.RufflePlayer.newest();
const player = ruffle.createPlayer();
const container = document.getElementById("ruffle");
player.id = "player";
player.style.width = "100%";
player.style.height = "100%";
container.appendChild(player);
player.load(`files/${game}.swf`);
});
}
</script>
</body>
</html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Flash Player</title>
<link id="favicon" rel="shortcut icon" type="image/png" href="/">
</head>
<body>
<div id="ruffle" width="100%" height="100%"></div>
<script src="ruffle.js"></script>
<script>
var defaultGame = (new URLSearchParams(window.location.search)).get('game');
if (!defaultGame) {
/*var fileInput = document.createElement('input');
fileInput.type = 'file';
fileInput.id = 'fileInput';
var uploadButton = document.createElement('button');
uploadButton.textContent = 'Upload File';
uploadButton.addEventListener('click', handleFileUpload);
// Append elements to the body
document.body.appendChild(fileInput);
document.body.appendChild(uploadButton);
function handleFileUpload() {
var uploadedFile = fileInput.files[0];
if (uploadedFile) {
// appears to take a url rather than local file
load(uploadedFile);
} else {
alert('Please select a file to upload.');
}
}
*/
} else {
document.title = (defaultGame.replace(/-/g, ' ')).toLowerCase().split(' ').map(function(word) {
return word[0].toUpperCase() + word.substr(1);
}).join(' ');
document.querySelector('#favicon').href = `images/${defaultGame}.png`;
load(`files/${defaultGame}.swf`);
}
function load(game) {
window.RufflePlayer = window.RufflePlayer || {};
window.addEventListener("load", (event) => {
const ruffle = window.RufflePlayer.newest();
const player = ruffle.createPlayer();
const container = document.getElementById("ruffle");
player.id = "player";
player.style.width = "100%";
player.style.height = "100%";
container.appendChild(player);
//seems to be a path
console.log(game);
player.load(game);
});
}
</script>
</body>
</html>
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,16 +0,0 @@
{
"companyName": "DefaultCompany",
"productName": "Geometry Dash",
"productVersion": "0.1",
"dataUrl": "geo.data.unityweb",
"wasmCodeUrl": "geo.wasm.code.unityweb",
"wasmFrameworkUrl": "geo.wasm.framework.unityweb",
"graphicsAPI": ["WebGL 2.0","WebGL 1.0"],
"webglContextAttributes": {"preserveDrawingBuffer": false},
"splashScreenStyle": "Dark",
"backgroundColor": "#231F20",
"cacheControl": {"default": "must-revalidate"},
"developmentBuild": false,
"multithreading": false,
"unityVersion": "2019.4.24f1"
}
File diff suppressed because one or more lines are too long
-1
View File
@@ -182,7 +182,6 @@
<body>
<div id="gameContainer"></div>
<a href="https://geometrydashlite.co/" class="info" target="_blank"><span class="svg-icon " aria-hidden="true"><svg class="svg-icon__link"><use xlink:href="#icon-info"></use></svg></span></a>
<div id="loader">
<img class="logo" src="logo.png?v=1">
<div class="spinner"></div>
@@ -4,6 +4,6 @@
"asmCodeUrl": "rooftop-snipers.asm.code.unityweb",
"asmMemoryUrl": "rooftop-snipers.asm.memory.unityweb",
"asmFrameworkUrl": "rooftop-snipers.asm.framework.unityweb",
"splashScreenStyle": "Light",
"backgroundColor": "#000000"
"splashScreenStyle": "Dark",
"backgroundColor": "#BF6757"
}
File diff suppressed because one or more lines are too long
@@ -0,0 +1,24 @@
function UnityProgress(gameInstance, progress) {
if (!gameInstance.Module)
return;
if (!gameInstance.logo) {
gameInstance.logo = document.createElement("div");
gameInstance.logo.className = "logo " + gameInstance.Module.splashScreenStyle;
gameInstance.container.appendChild(gameInstance.logo);
}
if (!gameInstance.progress) {
gameInstance.progress = document.createElement("div");
gameInstance.progress.className = "progress " + gameInstance.Module.splashScreenStyle;
gameInstance.progress.empty = document.createElement("div");
gameInstance.progress.empty.className = "empty";
gameInstance.progress.appendChild(gameInstance.progress.empty);
gameInstance.progress.full = document.createElement("div");
gameInstance.progress.full.className = "full";
gameInstance.progress.appendChild(gameInstance.progress.full);
gameInstance.container.appendChild(gameInstance.progress);
}
gameInstance.progress.full.style.width = (100 * progress) + "%";
gameInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
if (progress == 1)
gameInstance.logo.style.display = gameInstance.progress.style.display = "none";
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -0,0 +1,18 @@
.webgl-content * {border: 0; margin: 0; padding: 0}
.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%);}
.webgl-content .logo {background: url('progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px;}
.webgl-content .progress .empty {background: url('progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
.webgl-content .progress .full {background: url('progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block;}
.webgl-content .logo.Dark {background-image: url('progressLogo.Dark.png');}
.webgl-content .progress.Dark .empty {background-image: url('progressEmpty.Dark.png');}
.webgl-content .progress.Dark .full {background-image: url('progressFull.Dark.png');}
.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px;}
.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat;}
.webgl-content .footer .webgl-logo {background-image: url('webgl-logo.png'); width: 204px; float: left;}
.webgl-content .footer .title {margin-right: 10px; float: right;}
.webgl-content .footer .fullscreen {background-image: url('fullscreen.png'); width: 38px; float: right;}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

-14
View File
@@ -1,14 +0,0 @@
* {margin: 0;padding: 0;}
.webgl-content * {border: 0; margin: 0; padding: 0}
.webgl-content .logo, .progress {position: absolute; left: 50%; top: 50%; -webkit-transform: translate(-50%, -50%); transform: translate(-50%, -50%)}
.webgl-content .logo {background: url('../images/progressLogo.Light.png') no-repeat center / contain; width: 154px; height: 130px;}
.webgl-content .progress {height: 18px; width: 141px; margin-top: 90px}
.webgl-content .progress .empty {background: url('../images/progressEmpty.Light.png') no-repeat right / cover; float: right; width: 100%; height: 100%; display: inline-block;}
.webgl-content .progress .full {background: url('../images/progressFull.Light.png') no-repeat left / cover; float: left; width: 0%; height: 100%; display: inline-block}
.webgl-content .logo.Dark {background-image: url('../images/progressLogo.Dark.png')}
.webgl-content .progress.Dark .empty {background-image: url('../images/progressEmpty.Dark.png')}
.webgl-content .progress.Dark .full {background-image: url('../images/progressFull.Dark.png')}
.webgl-content .footer {margin-top: 5px; height: 38px; line-height: 38px; font-family: Helvetica, Verdana, Arial, sans-serif; font-size: 18px}
.webgl-content .footer .webgl-logo, .title, .fullscreen {height: 100%; display: inline-block; background: transparent center no-repeat}
.webgl-content .footer .title {margin-right: 10px; float: right}
body{background: antiquewhite}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

+27 -34
View File
@@ -1,38 +1,31 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<!-- Google tag (gtag.js) -->
<script async="" src="https://www.googletagmanager.com/gtag/js?id=G-7L02W3ZMS5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-7L02W3ZMS5');
</script>
<meta charset="utf-8"/>
<title>Rooftop Snipers</title>
<link href="css/game.css" rel="stylesheet" type="text/css"/>
<link href="app-icon.png" rel="icon"/>
<title>Rooftop Snipers</title>
<link rel="icon" sizes="192x192" href="img/thumb.png">
<link rel="shortcut icon" href="img/thumb.png" type="image/x-icon"/>
<link rel="apple-touch-icon" href="img/thumb.png" type="image/x-icon"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta content="#000000" data-react-helmet="true" name="theme-color" />
<meta name="title" content="Rooftop Snipers">
<meta name="description" content="Rooftop Snipers is a pixel-style shooting game where you have to shoot famous characters off of the roof. You can play in single or two-player mode, against the Joker, Mr. T, and John Wayne. During each duel, you have to jump forwards and backwards to dodge bullets. Look out for the tomahawks and beach balls in Rooftop Snipers.">
<meta name="keywords" content="games, ad blocker, trolls, unblocked games, web games, online games, fun, tags">
<meta name="robots" content="index, follow">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="language" content="English">
<meta name="revisit-after" content="1 days">
<link rel="stylesheet" href="TemplateData/style.css">
<script src="TemplateData/UnityProgress.js"></script>
<script src="TemplateData/UnityLoader.js"></script>
<script>
var gameInstance = UnityLoader.instantiate("gameContainer", "Build/rooftop-snipers.json", { onProgress: UnityProgress, Module: { onRuntimeInitialized: function() { UnityProgress(gameInstance, "complete") } } });
</script>
</head>
<body>
<script src="js/UnityLoader.js"></script>
<div class="webgl-content"><div id="gameContainer"></div></div>
<script src="js/rooftop-snipers-game.js"></script>
<body style="margin: 0; overflow: hidden;">
<div class="webgl-content">
<div id="gameContainer" style="width: 100%; height: 100%; margin: 0;"></div>
</div>
</body>
</html>
<style>
body {
overflow: hidden; /* Hide scrollbars */
}
h1 {
text-align: center;
text-transform: uppercase;
color: #000000;
}
</style>
<noscript>
<h1>the game will not run without javascript</h1>
</noscript>
-41
View File
@@ -1,41 +0,0 @@
chrome.runtime.onInstalled.addListener(function (context){
if ("install"===context.reason)
gameTab()
});
chrome.browserAction.onClicked.addListener(function(){
gameTab()
});
chrome.runtime.onMessage.addListener(function (request,sender,sendResponse){
if (chrome.runtime.id===sender.id && request.message){
let m=request.message;
if (m==='open')
return gameTab();
if (typeof m.svg==='string')
return (new CachedStatic(m.svg)).get().then(sendResponse),true;
}
return false;
});
function gameTab(){
chrome.tabs.create({url: chrome.runtime.getURL("rooftop-snipers-game.html")},function (tab){});
return false;
}
class CachedStatic{
constructor(filename){
this.filename=filename;
this.cdn_host='https://cloudfront.tryfunstorage.com/';
this.cached=false;
this.date=0;
}
async get(){
if (this.cached !== false && this.date > Date.now() - 300001)
return this.cached;
let response=await fetch(this.cdn_host + this.filename);
this.cached=await response.text();
this.date=Date.now();
return this.cached.toString()
}
}
@@ -1,39 +0,0 @@
var gameInstance;
function UnityProgress(gameInstance, progress) {
if (!gameInstance.Module)
return;
if (!gameInstance.logo) {
gameInstance.logo = document.createElement("div");
gameInstance.logo.className = "logo " + gameInstance.Module.splashScreenStyle;
gameInstance.container.appendChild(gameInstance.logo);
}
if (!gameInstance.progress) {
gameInstance.progress = document.createElement("div");
gameInstance.progress.className = "progress " + gameInstance.Module.splashScreenStyle;
gameInstance.progress.empty = document.createElement("div");
gameInstance.progress.empty.className = "empty";
gameInstance.progress.appendChild(gameInstance.progress.empty);
gameInstance.progress.full = document.createElement("div");
gameInstance.progress.full.className = "full";
gameInstance.progress.appendChild(gameInstance.progress.full);
gameInstance.container.appendChild(gameInstance.progress);
}
gameInstance.progress.full.style.width = (100 * progress) + "%";
gameInstance.progress.empty.style.width = (100 * (1 - progress)) + "%";
if (progress == 1)
gameInstance.logo.style.display = gameInstance.progress.style.display = "none";
}
window.onload = function () {
gameInstance = UnityLoader.instantiate("gameContainer", "js/rooftop-snipers.json", {
onProgress: UnityProgress,
Module: {
onRuntimeInitialized: function () {
UnityProgress(gameInstance, "complete")
}
}
});
}
+2 -2
View File
@@ -19,9 +19,9 @@
<script>
var game = (new URLSearchParams(window.location.search)).get('game');
document.title = (game.replace(/-/g,' ')).toLowerCase().split(' ').map(function(word) {return word[0].toUpperCase() + word.substr(1);}).join(' ');
document.querySelector('#favicon').href = `images/${game}.png`;
document.querySelector('#favicon').href = `../flash/images/${game}.png`;
var fish = window.location.href.split('?')[0] + `files/${game}.swf`;
var fish = window.location.href.split('?')[0] + `../flash/files/${game}.swf`;
var gameConfig = {
swfUrl: fish
}
+17
View File
@@ -354,6 +354,11 @@ function popupsAllowed() {
}
}
// Function to mute or unmute all sounds
function toggleMute() {
// cant find working code rn
}
function getMainSave() {
var mainSave = {};
@@ -450,6 +455,18 @@ keySlots.forEach((slot) => {
});
});
// ik we didnt set up keybinds but ill keep mute default for now
function onKeyPress(event) {
if (event.ctrlKey && event.key === 'm') {
event.preventDefault();
toggleMute();
}
// copy paste for other shortcuts
}
// Attach the keydown event listener to the document
document.addEventListener('keydown', onKeyPress);
const defaultColorSettings = {
bg: '#202020',
'block-color': '#2b2b2b',