+ 5
What can I inprove in this code?
I'm started using firebase a week ago. I want to learn how to make better games/apps with it. code: https://code.sololearn.com/WSUnKITlpUJ6/#html
10 odpowiedzi
+ 6
regarding the API key security, i suggest checking out the links in this post:
https://www.sololearn.com/discuss/1267125/?ref=app
and about how to make better games/app:
it's kind of a vague question...
i used it mostly to keep scores in some of the games i made and some chat codes.
another usage can be as a "socket service" as you can see in the public canvas code below.
the bottom line is that firebase is simply a service to store data.
the possibilities are endless and only bound by your imagination
hope this helps....
https://code.sololearn.com/WuMs3CS1ioQy/?ref=app
+ 3
thanks for suggestion :)
+ 3
Alerts are a tad annoying. I usually use a plugin when I really have to use alerts so that they are customizable and more visually pleasing. You might want to try SweetAlert. It is very easy to use and highly 'customizable'...
And about Firebase, I have not yet looked too deeply into your code but you might want to put the Script part including the API key at the bottom of your body tag so that the API key stuff is not so exposed. I mean move line 7 through 18 and put it between line 44 and line 45. Anyone who looks at the whole code will still see it but those who don't won't... This will include some more little changes in the code. I will extend on that by commenting directly on the code
+ 3
Please change that font to something more readable.
+ 2
Temmie! Thats not quite what I ment. Change the font to a better looking one. Check out Google Fonts. They have a great selection.
+ 1
the font weight did not help much for me. maybe change the actual font. anything curly like that is a bad choice. in my opinion of course. feel free to disregard it
0
Ben Allen (Njinx) font weight changed to bold
0
you should also have hero presets, with a "custom" choice for a url, instead of making it url only.
0
lastly, because there are no choices (upgrades, different attacks, etc), I don't know if this could technically be considered a game, but it's a cool start, and with not too much work, could be something you could put on kongregate or somewhere.
great work!