Flappy Word v3
Yup, still plugging away at this. The game should be embedded below.
Read more...Yup, still plugging away at this. The game should be embedded below.
Read more...Flappy Word!
I’ve made some changes to Flappy Word since version 1 back in November. Tell me what you think after the break!
Read more...People seem to like Flappy Word. According to one person it is “officially more addicting than Flappy Bird!”
Is that good?
##Technical Issues
The game runs, but not as well as it ought to.
It takes an annoyingly long time to start up. With no loading screen it seems like nothing is happening, so I need to look into ways to both improve the load time and implement a loading screen if possible.
On some computers it didn’t work at all. The issue was usually reported as something to do with the browser not being able to allocate enough memory to hold the game, but I haven’t sat down at one of the offending computers to see the error for myself.
I’ll start by looking at storage usage. The folder containing the v1 WebGL release build of Flappy Word is 32.3 MB. That’s a lot considering how simple this game is. In 1990 the capacity of a normal desktop computer’s hard drive was about 40 MB (source). Consumer-available RAM units didn’t break the 40 MB barrier until around 2000 (source).
Where’s all this data coming from?
The Compressed folder just contains tiny versions of the files in the Release folder, but since the game still loads and runs just fine if I delete them it’s not clear if they’re used at all.
Within the Release folder the biggest file by a long way is build.js, which I believe contains engine code, game logic code, and so on all compiled into JavaScript. No text file should be this large. Sublime Text can’t seem to open it. Notepad struggles. Notepad++ craps itself when you try to scroll down through the wall of whitespace-less code.
I guess that if I were to simply write this game in JavaScript the all the source files put together would amount to a tiny fraction of this 20 MB monolith. It might take a bit longer to make because I’m not exactly experienced in JS, but this is not a complicated game and it doesn’t need a heavyweight engine like Unity backing it up. I don’t think I can control the size of the builds.js file that Unity creates, but I’ll certainly look into it.
So what’s in the asset-containing file, builds.data? It accounts for almost 20% of the folder size, and in this case I actually can control how much space it takes up.
I’ve changed the game a little bit since v1, but if I launch Unity, rebuild the game and look at the editor log I get to look at a breakdown of the assets which the game uses. Unused assets are stripped out of the build.
1.1 mb 17.1% Assets/Resources/dictionary.txt
717.7 kb 11.1% Assets/COURBD.TTF
52.5 kb 0.8% Assets/Blast-SoundBible.com-2068539061.wav
25.3 kb 0.4% Resources/unity_builtin_extra
24.8 kb 0.4% Assets/Typewriter SFX/Stereo/Tab 1.wav
6.4 kb 0.1% Assets/Typewriter SFX/Stereo/Key 04.wav
...
The biggest space-hog by a long way is the dictionary, but even then 1.1 MB isn’t much to worry about. There are probably smarter ways to handle the dictionary file that I haven’t had time to figure out yet. Currently the entire thing is loaded into memory for fast access and to sort it by word length, which my gut tells me is better than doing a bunch of file reading operations every time I need to get a new word.
My next question is how much the game actually takes up in memory. If I run it in the Unity editor and look at the profiler, I get this:
472 MB. It seems like a large amount of space, but this is running unoptimized in the editor, after all. How much memory is it using when it runs in the browser? Chrome’s task manager says the tab with Flappy Word running in it sits at around 230 MB or so, meaning the game uses less memory in release than it does in the editor, as you’d expect. I haven’t found a way to see the game’s exact memory usage in the browser yet. Still, looking back at our RAM-capacity-over-time stats… it’s a lot.
Another technical issue others have reported and that I’ve seen for myself is a certain amount of input lag or choppiness in framerate from time to time. I think this might just be Unity’s WebGL player’s fault. There might be ways I can improve it.
Anyway. That’s all very interesting and the biggest problems seem outside my control. What about the actual game?
##The Actual Game
So that’s where Flappy Word is at the moment.
Here’s a little game I’ve been making over the last few weeks because the name popped into my head one day. I’ve put it behind a break because otherwise it autoplays.
Read more...This is just a test post to see if I can host images on this interblog.
Here should be a photograph I took of one of the wind turbines on my dad’s farm:
Here should be an animated gif: