Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

SkyzohKey

4
Posts
3
Topics
A member registered Mar 30, 2016 · View creator page →

Creator of

Recent community posts

Bombers community · Created a new topic Bombers v0.0.5
(1 edit)

Hey little hamsters!

This is a topic to announce you that Bombers just switched to version 0.0.5. This version add many enhancements and bug fixes with a lot of code refactoring and a massive optimization! The main goal of this version was to have a clean code that would run pretty fast. And it does!

What's news?

  • 3 new environments: Snowland, Forest and Boumboum original!
  • Players movements are now grid-based!
  • You can now push bombs on the map, they're doing nothing yet but that's coming!
  • Code refactoring, I rewrote about 95% of the v0.0.4.5 code.
  • Bug fixes (nothing too fancy)

Screenshot:

Screenshot of Bombers running v0.0.5

(2 edits)

Well, this have been fixed on GitHub. Here's the snippet I used to make it working, if someone else ever have the issue:

// iframe-fix.js
var lastTarget, canvas, body;
window.onload = function() {
  body   = document.querySelector('body'),
  canvas = document.getElementById('canvas');
  var activateCanvas = function (event) {
    lastTarget = event.target;
    window.setFocus();
    console.log("Set focus on window");
  }
  var preventScroll = function (event) {
    var keyCodes = [ 32, 37, 38, 39, 40 ];
    if (lastTarget != canvas) {
      return false;
    }
    console.log('Key pressed: ' + event.keyCode);
    if (keyCodes.includes(event.keyCode)) {
      event.preventDefault();
    }
  }
  var handleMouseDown = function (event) {
    window.focus();
    event.preventDefault();
    event.stopPropagation();
    event.target.style.cursor = 'default';
  }
  body.addEventListener('keydown', preventScroll, false);
  body.addEventListener('click', activateCanvas, false);
  canvas.addEventListener('mousedown', handleMouseDown, false);
}

Simply include this script at the end of your other scripts call ;)

Hi dudes,

Before anything, many thanks for the awesome website you built, looks promising! This is my first post here, in this forum. I'm here to report an issue I just found while testing my game inside Itch.io.

The issue is that Canvas (HTML Game) isn't focused since it's in an iFrame, making the player unable to move or use the keyboard to interact with the game. This is a critical issue since it makes (at least) my game unplayable. :/

Hacky-fix: The player have to right click the canvas, click "Inspect the element" and close the Inspector in order to enable keyboard events. Not really nice for production ^^

Additional Informations:

  • Browser: Mozilla/5.0 (X11; Linux i686; rv:44.0) Gecko/20100101 Firefox/44.0
  • OS: Fedora 23
  • Game link: https://skyzohkey.itch.io/bombers
  • Game framework: Panda.JS v2 (develop branch on GitHub)

Thanks in advance for the replies!

Hi, I'm proud to announce here, on the awesome Itch.io, that this community about my first Public game - Bombers - is now open !