Id.net construct 2 plugin

Hello, i have a task to apply id.net construct 2 plugin into my game, but every time i export the game, it turns out to be black screen.
When i remove the id.net construct 2 plugin, it goes back to normal. So i think maybe the plugin have any crash with the construct 2?
My construct is Release 233(64-bit)
Maybe someone have the solution?
Thanks

One thing to check is the developer console in the browser. Push F12 and go to the console tab. Maybe there are some errors in there?

here is the error screencaps. if i add the id.net plugin the program automatically get error like this. if i remove the plugin, the error is gone.

thank you for replying

Another thing to note is that the id.net html5 sdk requires an actual website. An ip address like 192.168.1.9 won’t work. Maybe that is the issue. If you need a place to upload, we offer id.net storage. Also, there is id.net upload, though it doesn’t work as well for html5 games. Hope this solves it

Hello, thanks for answering. I have uploaded the project to my workplace’s server. it produces the same error:

but the difference is, when i first run it, the game works properly, but the construct 2 ID.net action init doesn’t do anything. (i have inputed the app id provided in https://www.id.net/applications). and when i click the button that have the action ID.net show login box. it doesn’t show anything, and the report in the F12 is rto.

when i refresh the game, it went black and i got the error above.

thank you for replying

i try again to use init and gets this error:

then when i clicked the button that have action ID.net i get this:

maybe you have the solution?
thanks

I sent a message to the person who was last working on the C2 plugin. Let’s wait, hopefully they will be able to help here. If not, I’m sure we could find a way to solve this black screen issue. Thanks for being patient with all the waiting :grinning:

So I did some testing, thanks for the help. :blush: I didn’t have any issues so far. I only checked init works and isSponsor. Are you able to update to C2 version 244? If that doesn’t work, send me list of id.net features you use, I could test them. Maybe a screenshot of the event sheet for the id.net parts would help too.

I have updated our construct to r244, but after i compiled it, it gives the same error as before.
Here is the screenshot of the program’s event sheet.


this is the event sheet i used for the init function of id.net.

this is the event sheet i use for login and register.

this is the index.html file i used.

that’s all i do for to add the id.net plugin.
do we need to use https server for the domain? because we don’t have it.

Thank you very much for your help.

ok Thanks. I tested login and registration today. I didn’t encounter any problems though. I have a simple setup like this.

I think there might be an issue with how things are setup in your project. Like I see in one screen you are executing some javascript code. However, there is <html> at the top. I don’t think this is correct.

To check if a user is logged in, maybe the following code would work. I’m not sure how C2 handles true/false statements though

ID.getLoginStatus(function(response) {
	return response;
}, false)

Looking over the problem more, it may be best to remove the code execution. Under objects with expressions, there is IDNet.UserName and that can be used to tell when the player has logged in. Could check that in a loop maybe on the main menu.

Hello Eddie, thanks for the reply.

As you can see, the execute javascript in the program is disabled. So it shouldn’t interfere with the program at all.
I have try to change the init and the login id.net plugin function into one layout but it still produce the same error as above.

maybe you have the step by step adding the plugin into construct 2 ?
and i have one more question. do you edit the index.html of the project with id.net javascript init procedure.
Thanks for replying.

Hi,

The documentation needs some work. What I did was double click the layout view and add the id.net plugin like you said. Then I was able to setup the init on a start of layout layout event as pictured above.

I didn’t have to do this. I got everything to work from inside the plugin. I would try removing this, if you have done it.

If the error is still there, please click the arrow in the console to see the stack trace. Maybe there are more clues about where the error is coming from.

Hello Eddie, it’s been a while and we still haven’t found what’s the solution to this problem yet.
Maybe you have found the solution to this problem?
Thank you very much

The problem appears to be happening only with your setup. I suggest starting a fresh project and experimenting there. Once you get that to work, you can compare the 2 projects and find what went wrong.

I updated the instructions here https://github.com/webgroup-limited/id.net-construct-sdk

Hello Eddie,
We have done the instruction that you updated and still no solution.
Maybe you could share or upload the blank construct 2 file project that have working id.net plugin as an example?
There, maybe we can learn what setup we are missing.

Oh, and may i ask you, if the construct 2 file project that succeeded run id.net plugin is only on construct 2 run layout? or you already export it on html 5 platform and succeeded?

Thank you very much for your attention.

Here is the events and layout

I did export and upload, it worked that way as well.

Thank you Eddie, the new id.net plugin works like a charm in some browser.

We have tried the plugin in firefox and mobile chrome and it works.
But one thing that bugs me is the new plugin doesn’t work on our desktop chrome.
The error on desktop chrome is the same as above.

Maybe you know about this?
Thank you very much

Y8 Games