[SOLVED] Black screen error on Ludei splash screen

Get help using Construct 2

Post » Wed Aug 12, 2015 7:00 pm

Hello C2 fellas! ^^

Does anyone knows what means the error "not found getElementById: c2canvasdiv" in the Cocoon Launcher?

I'm trying to compile my game in the Ludei/Cocoon and the game execution don't goes beyond Ludei splash screen. :(

Thanks for advance for the attention and collaboration.

[EDIT]

The problem wasn't the c2canvasdiv in the HTML and JavaScript, but the WEBGL! When I turned it off, the game worked well in the Ludei compile. :D
Last edited by lukezero on Thu Aug 13, 2015 12:10 am, edited 4 times in total.
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Wed Aug 12, 2015 9:07 pm

This is the block of HTML that it is looking for.

Make sure that it exists in your index.html file, or you will get that error.

Code: Select all
<div id="c2canvasdiv">

<!-- The canvas the project will render to.  If you change its ID, don't forget to change the ID the runtime looks for in the jQuery events above (ready() and cr_sizeCanvas()). -->

<canvas id="c2canvas" width="1024" height="768">

<!-- This text is displayed if the visitor's browser does not support HTML5. You can change it, but it is a good idea to link to a description of a browser   and provide some links to download some popular HTML5-compatible browsers. -->

</canvas>

</div>
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822

Post » Wed Aug 12, 2015 9:39 pm

Thanks for the help, @gumshoe2029! :D

Actually this piece of code doesn't exist in my index.html, but I changed here and the error continued to be shown in the Cocoon Launcher. :(

I did right?

<html>
<body>
<script src="c2runtime.js">
</script>
<div id="c2canvasdiv">
<canvas id="c2canvas" width="864" height="486">
</canvas>
</div>

</body>
</html>
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Wed Aug 12, 2015 11:28 pm

@gumshoe2029 I tested my mini-games separately in the Cocoon Launcher and ALL functioned normally, but the most curious was that all exhibited the SAME MESSAGE ERROR ("not found getElementById: c2canvasdiv")! :shock:

So the c2canvas isn't the problem that is preventing the execution of my project on the phone. :(
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Thu Aug 13, 2015 12:12 am

@gumshoe2029 Problem solved! It was the WebGL. :D

The game worked perfectly when I turned it off. I know I leave it on is recommended for good performance of the game, but unfortunately learned that this seems to be the only solution.
B
38
S
9
G
3
Posts: 257
Reputation: 4,316

Post » Thu Aug 13, 2015 4:26 pm

Glad you got it fixed. It looks like only iOS8 supports webGL (on the Apple side).

http://mobilehtml5.org/
https://www.ravenheart.ca/home
Company name changed to avoid Facebook-type shenanigans

"Someone once told me I bite off more than I can chew...

I told them I would rather choke on greatness than nibble on mediocrity."
B
22
S
6
G
1
Posts: 1,414
Reputation: 4,822


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 5 guests