Simple game made in 2006 for a high-school Java class, revised for educational purposes.
If you're interested in learning to make simple games like this one, check out the tutorial, or you can play the official demo. There's also a pre-made fiddle if you want to mess with it.
Initializing a new game is easy with the PixelatedGame class.
new PixelatedGame( container , rows , columns , colors );
jQuery was used in a few places to make DOM interactions more straightforward for beginners.
You can use your own call to new PixelatedGame and avoid the demo.js file if you wish.
core.js -- the PixelatedGame class
core.css -- basic styling for blocks and buttons
demo.js -- example game init with options
To include them in your project:
<script src="../core.js"></script>
<link rel="stylesheet" href="../core.css" />
That's it!
For demo purposes, a few options are built in. You can set the rows, columns, and colors. More colors usually creates a harder game. Colors can be expressed as hex, rgb, or css color names.
new PixelatedGame('.game_container', 6, 9, [
'blue',
'#f00',
'orange',
'rgb(255, 150, 150)',
'yellow'
]);
For a full playground with all available options, check out this fiddle.
- jQuery - Javascript framework used for simplifying DOM interactions
- Dan Lindsey - Initial work - SISYN
This project is licensed under the GPL v3 License - see the LICENSE file for details