• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Get an existing JavaScript game to work on the MagicMirror

Scheduled Pinned Locked Moved Solved Troubleshooting
5 Posts 5 Posters 1.9k Views 7 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    tuxx1112
    last edited by Jul 9, 2018, 5:30 PM

    Hi!

    I was wondering about if it’s possible to use an existing JavaScript game (like this one, for example: https://github.com/luciopanepinto/pacman ) and turn it into a MagicMirror module.

    I have a bit of programming experiences with other languages but I’m only beginning to learn JavaScript and the whole MagicMirror module concept.

    How would I be able to achieve this?

    Thanks in advance!

    ? 1 Reply Last reply Jul 9, 2018, 5:45 PM Reply Quote 0
    • ? Offline
      A Former User @tuxx1112
      last edited by A Former User Jul 9, 2018, 5:45 PM Jul 9, 2018, 5:45 PM

      @tuxx1112
      A very simple solution is, including it into a simple iFrame.

      1 Reply Last reply Reply Quote 1
      • T Offline
        tuxx1112
        last edited by Jul 16, 2018, 11:42 AM

        Thank you for your reply.

        Is an iFrame not used only for web applications? I am trying to implement a JavaScript game that is not hosted on a web server.
        Or is it easier to just host the game on a web server and then use an iFrame for that?

        Thanks in advance!

        ? E 2 Replies Last reply Jul 16, 2018, 12:05 PM Reply Quote 0
        • ? Offline
          A Former User @tuxx1112
          last edited by A Former User Jul 16, 2018, 12:12 PM Jul 16, 2018, 12:05 PM

          @tuxx1112
          My answer is, “hosting a web server, that is the easiest way.”.

          I have no idea about your “Javascript” game whether it means “browser-leveled” pure javascript or node.js or something else.
          If your game is just coded with a simple front-end javascript, you can easily implement that script with a module.
          If your game is coded for using H/W itself (not browser-level), experienced skill will be needed to implement. But I cannot be sure of it’s success.

          1 Reply Last reply Reply Quote 1
          • E Offline
            EstherLewis @tuxx1112
            last edited by Apr 24, 2019, 12:53 PM

            @tuxx1112 said in Get an existing JavaScript game to work on the MagicMirror:

            Thank you for your reply.

            Is an iFrame not used only for web applications? I am trying to implement a JavaScript game that is not hosted on a web server.
            Or is it easier to just host the game on a web server and then use an iFrame for that?

            In my opinion. It doesn’t matter whether you first host your web application and then use iFrame or you do it the other way. It is solely your choice on how you do it. Like for instance I first host my web application on the managed digitalOcean server which is powered by Cloudways and then used the iframe for that.
            But, I do think that both ways are easier if you know how to do it.

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Sam, technical setup by Karsten.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy