opera GX competition
wnwoghd22 / gamejam Goto Github PK
View Code? Open in Web Editor NEWopera GX competition
Home Page: https://gamejolt.com/games/reverse_test/635214
opera GX competition
Home Page: https://gamejolt.com/games/reverse_test/635214
opera GX competition
Un weird error occurred - In the spawn_enemy() function, I used two static array fields.
After building the HTML5 package, the Only I can see was a black screen. So I checked that JS code :
I found that an unnecessary "," token was inserted, but don't have any idea that what ~.prototype.yy_staticInitialiser ... is for and why the token is inserted.
The names were converted into enigmatic words... so it made me hard to find exactly WHERE was the problem.
But eventually found that the spawn_enemy() was the point that the error occurred.
I changed some words, syntax, order... and finally handled - switch keyword "static" to "var".
I assume that two static variables in a function may occur a problem if build an HTML5 package.
Tried to add background music on the top menu, and it worked well while test playing.
However, it seems that have a problem when tried on HTML5 mode the sound wasn't played, but after pressing some keys sound began. So checked the console.
It says, "WebAudio autoplay test failed: DOMException: play() failed because the user didn't interact with the document first."
I noticed that Chrome keeps their browser from "autoplay" any contents by the policy.
I used the parameter named "health" to assign enemy health, and it worked fine with test mode.
But in HTML5 mode, the function call ignored this parameter and assigned 100 instead.
I changed the parameter name "health" to "_health" (added underbar) and it was fixed.
Assume that if you use a parameter name that already exists in the "built-in" field, it may occur unexpected result.
Until yesterday, I suffered from the extremely large size of audio files.
My co-worker gave me an additional soundtrack but due to the size limit (5MB), I could not include that file.
A strange thing is that - very illogical - the total size of raw audio files is only 1 MB, and other scripts and image files are under 1MB, but the package became over 6MB. What happened?
I checked subdirectories in the package and found that audio files were enlarged. Then how can I handle this problem? It was simple - audio quality.
In Sound Editor, we can find "Sample Rate" and "Bit Rate". The default values of those are 44100 and 128, and it is high-quality audio. 44.1kHz and 128kbp? It's too much!
Well, then adjust it! The package size became only 1.8 MB. I've made it.
There're many tips for optimizing audio for Gamemaker, so no more detail is needed, but if you want to reduce file size first, then adjust audio quality.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.