diff --git a/_includes/footer.html b/_includes/footer.html
index a3d8fce..143784c 100644
--- a/_includes/footer.html
+++ b/_includes/footer.html
@@ -78,7 +78,7 @@
-{% include stats.html %}
+
{% include extra-js.html %}
diff --git a/_includes/software-embed.html b/_includes/software-embed.html
index 5291da4..92a2b78 100644
--- a/_includes/software-embed.html
+++ b/_includes/software-embed.html
@@ -1,3 +1,3 @@
-The following is the {{ page.software_data.release.source }} {{ page.software_data.platform | upcase }} {{ page.software_data.release.region }} {{ page.software_data.release.type }} version of the game.
+
The following is the {{ page.software_data.release.source }} {{ page.software_data.platform | upcase }} {{ page.software_data.release.region }} {{ page.software_data.release.type }} version of the game.
diff --git a/_posts/2024-05-19-among-us.md b/_posts/2024-05-19-among-us.md
new file mode 100644
index 0000000..40e7119
--- /dev/null
+++ b/_posts/2024-05-19-among-us.md
@@ -0,0 +1,58 @@
+---
+layout: "post"
+title: "Among Us"
+subtitle: "A single-player adaptation of the social deduction game set in a space-themed environment."
+description: "The single-player web version of \"Among Us\" offers players the experience of the popular social deduction game where they must complete tasks on a spaceship while identifying an imposter among them. This version provides an AI-controlled environment, replicating the intrigue and challenge of the original multiplayer format."
+image: "/assets/media/games/among-us/thumb-1920-385394.jpg"
+image_source: "internal"
+icon: "../../../../assets/media/games/among-us/8ddL1kuoNUB5vUvgDVjYY3_6HwQcrg1K2fd_R8soD-e2QYj8fT9cfhfh3G0hnSruLKec.jpg"
+category: "games"
+tags:
+ - "strategy"
+ - "suspense"
+ - "social"
+ - "meme"
+ - "drawn"
+ - "2d"
+ - "stealth"
+ - "sci-fi"
+ - "party"
+author: "octobot"
+mobygames_id: "149316"
+software_data:
+ platform: "web"
+ frame_index: "amongus-online.net/game/amongus.html"
+ release:
+ region: "web"
+ source: "unknown"
+ type: "release"
+ year: "2018"
+ screen:
+ orientation: "landscape"
+ display: "fullscreen"
+---
+
+## About the game
+
+The single-player web version of "Among Us" brings the intrigue and challenge of the popular social deduction game into a solo experience. Developed to mirror the core mechanics of the original multiplayer game, this adaptation allows players to immerse themselves in a space-themed environment where they must complete various tasks while identifying an AI-controlled imposter.
+
+In the game, players assume the role of a Crewmate aboard a spaceship, tasked with completing a series of maintenance and repair duties critical to the ship's operation. These tasks range from simple activities like swiping a card in the admin room to more complex tasks such as aligning the spaceship's engines or recalibrating the communications system. The player's objective is to complete all tasks without falling prey to the imposter, who seeks to sabotage the mission and eliminate the crew.
+
+The imposter, controlled by the game's AI, is programmed to blend in with the Crewmates by performing fake tasks and sabotaging the ship in strategic ways. The AI imposter can also eliminate Crewmates, creating an atmosphere of tension and suspicion. To win the game, the player must either complete all the tasks or successfully identify and vote the imposter off the ship during emergency meetings.
+
+Emergency meetings can be called by finding a dead body or by pressing the emergency button located in the central meeting room. During these meetings, players can discuss their suspicions and vote on who they believe the imposter is. Since the game is single-player, these discussions are simulated through a series of dialogue options where the player must use their observational skills and logic to accuse the right character.
+
+One of the unique aspects of the single-player version is its ability to maintain the suspense and social dynamics of the original game through AI interactions. The AI Crewmates exhibit a range of behaviors, including performing tasks, wandering around the spaceship, and reacting to sabotage events. This makes it challenging for the player to distinguish between genuine Crewmates and the imposter.
+
+The game's visual style and interface remain faithful to the original "Among Us," featuring the familiar top-down perspective, vibrant character designs, and atmospheric sound effects. The space-themed setting adds an extra layer of immersion, with various rooms and compartments of the spaceship serving as the backdrop for the player's tasks and interactions.
+
+The single-player web version of "Among Us" also includes customizable settings, allowing players to adjust the difficulty level by modifying the number of tasks, the visibility range, and the speed of the characters. This customization ensures that both newcomers and experienced players can tailor the game to their preferred level of challenge.
+
+Additionally, this version is accessible directly through web browsers, making it easy to play without the need for downloads or installations. This convenience, combined with the engaging gameplay, makes it an appealing option for those looking to enjoy "Among Us" without requiring a group of friends to play with.
+
+In conclusion, the single-player web version of "Among Us" successfully captures the essence of the original multiplayer game while providing a unique and enjoyable solo experience. Through clever AI design and faithful reproduction of the game's mechanics and visuals, it offers a compelling way to engage with the world of "Among Us" for those who prefer or need to play alone.
+
+## Resources
+
+* Official page of the game:
+
diff --git a/_sass/_SalaMuseoGames.scss b/_sass/_SalaMuseoGames.scss
index 3a57318..59a12c9 100644
--- a/_sass/_SalaMuseoGames.scss
+++ b/_sass/_SalaMuseoGames.scss
@@ -43,8 +43,13 @@ footer a > svg
vertical-align: middle;
}
+section.post > article {
+ word-wrap: break-word;
+}
+
iframe.AppFrame,
-iframe#software-embed-frame
+iframe#software-embed-frame,
+body.cinema-view > section.post > article > p.software-embed-wrapper > div.software-embed-container
{
height: calc(100vh - 4rem);
border: none;
@@ -72,15 +77,25 @@ body.cinema-view > section.post > aside {
}
body.cinema-view > section.post,
-body.cinema-view > section.post > article {
+body.cinema-view > section.post > article,
+body.cinema-view > section.post > article > p.software-embed-wrapper,
+body.cinema-view > section.post > article > p.software-embed-wrapper > #software-embed-frame,
+body.cinema-view > section.post > article > p.software-embed-wrapper > div.software-embed-container,
+body.cinema-view > section.post > article > p.software-embed-wrapper > div.software-embed-container > div#software-embed-frame,
+body.cinema-view > section.post > article > p.software-embed-wrapper > div.software-embed-container > div#software-embed-frame > div.ejs_game {
margin-left: 0;
margin-right: 0;
+ padding-left: 0 !important;
+ padding-right: 0 !important;
min-width: 100vw;
}
-body.cinema-view > section.post > article > p.software-embed-wrapper,
-body.cinema-view > section.post > article > p.software-embed-wrapper > #software-embed-frame {
- margin-left: 0;
- margin-right: 0;
- min-width: 100%;
+body.cinema-view > section.post > article > p.software-embed-wrapper > span.software-embed-controls {
+ padding-left: 1em;
+ padding-right: 1em;
}
+
+/* body.cinema-view > section.post > article > p.software-embed-wrapper,
+body.cinema-view > section.post > article > p.software-embed-wrapper > #software-embed-frame {
+ min-width: 100%;
+} */
diff --git a/assets/js/preferences.js b/assets/js/preferences.js
index 0cd816b..2d381f1 100644
--- a/assets/js/preferences.js
+++ b/assets/js/preferences.js
@@ -25,7 +25,7 @@ var Prefs = window.SalaMuseoGames.Prefs = {
idbBackupAndRestore.exportToJson(event.target.result).then(async function(json){
data.indexedDB[db] = json;
if (Object.keys(data.indexedDB).length === dbs.length) {
- SMG.Util.useTempElement(SMG.Util.makeElement('a', ...(await makeDownloadObj(data))), function(elem){ elem.click() });
+ SMG.Util.useTempElement(SMG.Util.makeElement('a', (await makeDownloadObj(data))), function(elem){ elem.click() });
}
});
});
diff --git a/assets/js/pwa.js b/assets/js/pwa.js
index 6ef12df..6b4fa1f 100644
--- a/assets/js/pwa.js
+++ b/assets/js/pwa.js
@@ -22,7 +22,7 @@ if (Prefs.pwaManifests.value || Prefs.softwarePwaManifests.value) {
var manifestData;
if (Prefs.softwarePwaManifests.value && Software) {
// specific manifests on games pages
- var pageUrl = (location.href + ''); // TODO Url parameters to make the game open fullscreen and automatically start
+ var pageUrl = (location.href + '?pwaLaunch=1'); // TODO Url parameters to make the game open fullscreen and automatically start
manifestData = {
name: document.querySelector('.post-title').textContent,
description: document.querySelector('.post-subtitle').textContent,
@@ -45,13 +45,12 @@ if (Prefs.pwaManifests.value || Prefs.softwarePwaManifests.value) {
manifestData = {
name: ldData.name,
description: ldData.description,
- start_url: sitePath,
- scope: sitePath,
+ start_url: (sitePath + '/'),
+ scope: (sitePath + '/'),
display: "standalone",
};
}
manifestData = Object.assign(manifestData, {
- scope: location.href,
background_color: (Software && Software.background_color || getComputedStyle(document.body).backgroundColor),
icons: [{
src: ((iconUrl || coverUrl) ? absoluteUrlFromRelative(iconUrl || coverUrl) : (sitePath + '/assets/img/icons/mediumtile.png')),
diff --git a/assets/js/software-embed.js b/assets/js/software-embed.js
index 6d875cf..a67dd96 100644
--- a/assets/js/software-embed.js
+++ b/assets/js/software-embed.js
@@ -9,29 +9,40 @@ var backend = data.backend;
var romUrl = (data.rom_url || `${bin1Path}/roms/${data.rom_index}.7z`);
var frameUrl = (data.frame_url || `${bin1Path}/${data.frame_index}`);
-function button (name, onclick) { return `` }
+function makeButton (name, onclick) { return `` }
-var buttonEnlarge = button('Enlarge ↔️', function(){
- document.body.classList[
+function controlsHtml (picks) { return ( '' +
+ (picks.all || picks.focus ? makeButton('Focus 🔳️', function(button, wrapper){
+ wrapper.scrollIntoView();
+ var iframe = wrapper.querySelector('iframe#software-embed-frame');
+ if (iframe) {
+ iframe.focus();
+ } else {
+ if (!wrapper.style) {
+ document.querySelector('section.post > article').style = 'z-index: 10;';
+ wrapper.style = 'z-index: 1; position: fixed; top: 0; margin-top: 0; background: black; height: 100vh; left: 0;';
+ button.textContent = 'Unfocus 🔳️';
+ } else {
+ wrapper.style = document.querySelector('section.post > article').style = null;
+ button.textContent = 'Focus 🔳️';
+ }
+ }
+ }) + ' ' : '') +
+ (picks.all || picks.fullscreen ? makeButton('Fullscreen 🖼️', function(button, wrapper){
+ wrapper.querySelector('iframe#software-embed-frame').requestFullscreen();
+ }) + ' ' : '') +
+ (picks.all || picks.enlarge ? makeButton('Enlarge ↔️', function(){ document.body.classList[
!document.body.className.split(' ').includes('cinema-view') ? 'add' : 'remove'
- ]('cinema-view');
-});
-
-function diyEmbedHtml (frameUrl) { return (
- button('Focus 🔳️', function(ctx){
- ctx.parentElement.scrollIntoView();
- ctx.parentElement.querySelector('iframe#software-embed-frame').focus();
- }) + ' ' +
- button('Fullscreen 🖼️', function(ctx){
- ctx.parentElement.querySelector('iframe#software-embed-frame').requestFullscreen();
- }) + ' ' +
- buttonEnlarge + ' ' +
- button('Reload ♻️', function(ctx){
- var frame = ctx.parentElement.querySelector('iframe#software-embed-frame');
+ ]('cinema-view') }) + ' ' : '') +
+ (picks.all || picks.reload ? makeButton('Reload ♻️', function(button, wrapper){
+ var frame = wrapper.querySelector('iframe#software-embed-frame');
var src = frame.src;
frame.src = '';
frame.src = src;
- }) + ' ' +
+ }) + ' ' : '') + ''
+) }
+
+function diyEmbedHtml (frameUrl) { return (controlsHtml({ all: true }) +
``
) }
@@ -48,8 +59,9 @@ if (platform === 'web') {
window.EJS_core = (core || platform);
window.EJS_gameUrl = romUrl;
window.EJS_screenRecording = { videoBitrate: 150000000 };
- thisElement.parentElement.appendChild(SMG.Util.elementFromHtml(buttonEnlarge));
+ thisElement.parentElement.appendChild(SMG.Util.elementFromHtml(controlsHtml({ focus: true, enlarge: true })));
thisElement.parentElement.appendChild(SMG.Util.makeElement('div', {
+ className: 'software-embed-container',
style: 'width: 640px; height: 480px; max-width: 100%;',
innerHTML: '',
}));
diff --git a/assets/media/games/among-us/8ddL1kuoNUB5vUvgDVjYY3_6HwQcrg1K2fd_R8soD-e2QYj8fT9cfhfh3G0hnSruLKec.jpg b/assets/media/games/among-us/8ddL1kuoNUB5vUvgDVjYY3_6HwQcrg1K2fd_R8soD-e2QYj8fT9cfhfh3G0hnSruLKec.jpg
new file mode 100644
index 0000000..e0d8d73
Binary files /dev/null and b/assets/media/games/among-us/8ddL1kuoNUB5vUvgDVjYY3_6HwQcrg1K2fd_R8soD-e2QYj8fT9cfhfh3G0hnSruLKec.jpg differ
diff --git a/assets/media/games/among-us/thumb-1920-385394.jpg b/assets/media/games/among-us/thumb-1920-385394.jpg
new file mode 100644
index 0000000..3eefdcb
Binary files /dev/null and b/assets/media/games/among-us/thumb-1920-385394.jpg differ