Open rafael-lua opened 4 years ago
Okay, you got my day today, I spent my day trying this and found out how to do it, basically, what it does is wrap the console log function and then use it to evaluate, it is really easy to use, and I'm also doing it with kongregate
https://github.com/MrcSnm/Love.js-Api-Player
This is an example of how to use it
if(key == "p") then
callJS("kongregate.stats.submit('Score', 1000);")
end
Be sure to watch it, I'll post one PR later for the focus problem when uploading your game onto kongregate
Be sure to watch it, I'll post one PR later for the focus problem when uploading your game onto kongregate
I don't believe, someone actually did it! This is so amazing, thank you so much!!! I can keep working with love and Lua even for web, I'm truly grateful.
I will make sure to keep watching it!
Be sure to watch it, I'll post one PR later for the focus problem when uploading your game onto kongregate
I don't believe, someone actually did it! This is so amazing, thank you so much!!! I can keep working with love and Lua even for web, I'm truly grateful.
I will make sure to keep watching it!
You're welcome, I'm doing a kongregate game myself so I needed to implement it anyway The new PR is ready, added some easier compiling function and it already comes with the Githubissues.
I couln't find a solution (if there is any) with my limited skills, so I am here to see if someone could help.
It is possible to make my game interact with scripts in the index page? So I could use things like https://docs.kongregate.com/docs/javascript-api
Everything works fine with the build. But I would really want to be able to integrate the kong api or even to execute some javascript code and retrieve the result to my game. Love2d is a engine I really like and I don't want to change it and start all over in another place.
Is there any way to my game code communicate with the outside page?