MegaBrutal [Thu, 16 Mar 2017 00:05:30 +0000 (01:05 +0100)]
Reorganized code: created Guard class
Previously guards were not defined as a distinct class.
Since I want to build a conveniently manageable codebase which
would make a nice framework for my future additions, I need to
revise the actual post-LD code heavily.
The goal is to create a clean, well thought-out object-oriented
framework which is extensible and easy to depend on.
This is the first change towards that state, and seeing how
messy the code currently is, there will be many more.
Converted SVGs to PNGs for Internet Explorer compatibility
The game's SVGs are now converted to PNGs, and the PNGs are used
by the game. With this, the game is finally compatible with
Internet Explorer, while the compatibility is preserved with
other browsers.
new file: bird.png
new file: birdcage.png
new file: csaj.png
new file: ground.png
new file: guard.png
new file: kecskecsaj.png
modified: shapeshift.js
Prevent default browser action for SPACEBAR and ARROW keys
SPACEBAR scrolls the page down on some browsers, and ARROW keys
may also cause the page to scroll. Now the game prevents the
browser from performing these default actions when the game is
in focus.
Also, I removed an unused optional parameter from putText,
because Internet Explorer was complaining about it. The game
still doesn't work with IE though, because SVGs are not displayed.
Changes to be committed:
new file: bird.svg
new file: birdcage.svg
new file: csaj.svg
new file: ground.svg
new file: guard.svg
new file: index.html
new file: kecskecsaj.svg
new file: shapeshift.html
new file: shapeshift.js