Game not loading
sarahanndrea

Hello, I recently completed the Memory game tutorial. I moved the downloaded files directly to my server space so that I could see how it looks. But all i got was a black screen. When I used the wade game engine it worked fine, but it doesn't show up on my website. Could someone please help me. I have attached the zip file and a link to the website. 

 

https://studentpages.scad.edu/~swhite38/memorygame/

 

Thank you for your help in advance. 

All 7 Comments
foxcode

Hi sarahanndrea. I download your zip and the game does indeed run fine. Nice job following the tutorial, looks good.

I believe your problem is that you are trying to get jquery from an external source, the following is the line where this happens
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>

Your website is using https. If you are using https you cannot load content from an http site as it would not be secure.
I suggest you download jquery from that link, and put it in a file on your server where everything else is, and include it like this
<script src="jquery-2.0.3.min.js"></script>

So long as you name the file jquery-2.0.3.min.js and put it where you index.html file is, you shouldn't have any problems. Hope this helps

 

sarahanndrea

Thank you fro your suggestion. I tried that and it is still doing the same thing. 

foxcode

Very nearly there. If you are using chrome or firefox you can press f12 in the browser to see the developer console. The error it shows when I visit your site is the following

Mixed Content: The page at 'https://studentpages.scad.edu/~swhite38/memorygame/' was loaded over HTTPS, but requested an insecure script 'http://code.jquery.com/jquery-2.0.3.min.js'. This request has been blocked; the content must be served over HTTPS.

This tells me you are still trying to get jquery from the website.

'http://code.jquery.com/jquery-2.0.3.min.js'

Should just be

'jquery-2.0.3.min.js'

And that file must be saved locally on your server. This is what your index file looks like on my pc. This is what your server sends to my browser...
 

  <!DOCTYPE html>   <html>   <head>   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />   <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>   <meta name="apple-mobile-web-app-capable" content="yes" />   <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0, minimal-ui"/>   <link rel="stylesheet" type="text/css" href="style.css" />   <title>Memory Game</title>       <script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>   <script src="wade.js"></script>       <script>   $(document).ready(function()   {   wade.init('app.js');   });       </script>   </head>       <body>       <div id="container" style="border:0; width:800px; height:600px;">   <div id="wade_main_div" width="800" height="600" tabindex="1">   </div>   </div>       </body>   </html>    


<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script>

 

This line means you are still including jquery from an external website. Wade requires jquery to run

 

sarahanndrea

Hello again, thank you so much for your help thus far. I changed that line of code as you said, but it is still just showing a black page? Is there anywhere else that it would show up that I would have to fix it? 

Gio

Hi

 

I think you've done it right, the only problem is that that jquery file seems to be corrupted for some reason. I have attached one that works, if you just overwrite the one on your server with this one (after extracting the zip) it should work.

Dk Lee

I Also have a problem. But My Case is somehow different.

 

I tested Three Match Game Source.

 

Well. It worked well in FireFox. And also work well in Edge in local(with iis setting).

 

But Edge can't render the game which is Azure Cloud

 

and IE11  renders the game but IE11 do not sound.

 

 

 

well..

Wade works good in mobile devices.

 

So.. why Edge can't read  which is in Azure Clody?

and why IE11 have a sound problem?

 

 

lastly.. I thank you very very much.

Wade library is very awesome!! I love it!!

 

 

and sorry for my poor english. :wacko:​

Gio

Hi

 

While it's possible to have audio in IE11 and older, it's a bit of a pain so in most cases people don't bother to do that. I am not sure about the Match Three game, I don't know what it does with audio, but if you must have audio on IE11, you can follow this tutorial

 

I am not sure about the Azure Cloud issue... what errors do you get in the edge console? (by pressing F12)

Post a reply
Add Attachment
Submit Reply
Login to Reply