Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 90 lines (68 sloc) 2.639 kb
a08ee9a7 »
2011-02-13 replace schematic with README
1 Blockgame is a demonstration of using a NerdKit for simple games. It
2 is an implementation of the classic "clear rows of three matching
3 pieces" game.
4
d18948d7 »
2011-02-14 add link to informative blog post
5 More information, including a demo, is available at
6 http://blog.beerriot.com/2011/02/14/nerdkit-gaming/
7
a08ee9a7 »
2011-02-13 replace schematic with README
8 * Basic Play
9
10 Play begins with a board of random tiles:
11
f39e7f7c »
2011-03-03 fix rendering of example boards
12 : abcdefg
13 : cabfgde
14 : gbacedf
a08ee9a7 »
2011-02-13 replace schematic with README
15
16 The player makes a move by choosing two adjacent tiles to swap, such
17 that a line of three matching tiles are made. For example, swapping
18 the 'a' and 'b' in the second row of the example above creates a line
19 of 'b':
20
f39e7f7c »
2011-03-03 fix rendering of example boards
21 : abcdefg
22 : cbafgde
23 : gbacedf
a08ee9a7 »
2011-02-13 replace schematic with README
24
25 The 'b' tiles are then removed from the board, and new random tiles
26 added to the right side:
27
f39e7f7c »
2011-03-03 fix rendering of example boards
28 : acdefga
29 : cafgded
30 : gacedfb
a08ee9a7 »
2011-02-13 replace schematic with README
31
32 Play continues until it is not possible to make a match with just one
33 swap.
34
35 This version differs from other common versions, in that matches and
36 swaps may "wrap" around any side.
37
38 * Nerdkit Play
39
40 At startup, the player is presented with choices of what size of
41 playing field to use, and how many unique tile types to play with (the
42 "variety").
43
44 The player chooses tiles to swap by clicking left/down/up/right
45 buttons until the cursor is over one of the pieces to be swapped. The
46 player then presses the select button, then moves to the other tile to
47 swap, and presses the select button again. A selected tile is noted
48 by a capital letter (all other tiles are lower-case).
49
50 When no moves remain, a "game over" screen is shown for a few seconds.
51 The user is then returned to the start menu to begin a new game.
52
53 * Nerdkit schematic
54
55 The schematic for the NerdKit while running the game is:
56
57 #+BEGIN_EXAMPLE
58 |---|
59 ^__|1 |_
60 _| |__/ o--| (select)
61 _| A |__/ o--| (right)
62 lcd14_____________| T |__/ o--| (up)
63 lcd13_____________| m |__/ o--| (down)
64 lcd12_____________| e |__/ o--| (left)
65 ^_____________| g |_______|
66 | _________| a |__^ gnd
67 0.1uF = | ____| 1 |__|
68 gnd_|__| |_X__| 6 |_ (14.7Mhz xtal)
69 lcd11_____________| 8 |_
70 lcd6______________| |_
71 lcd4______________| |_
72 _| |_
73 lcd2-^ |---|
74 lcd5--------|
75 lcd1--------|
76 lcd3--vvvv--|
77 1k gnd
78 #+END_EXAMPLE
79
80 For programming, connect the yellow programmer wire to ATmega168 pin 2,
81 and the green programmer wire to pin 3, then tie pin 14 to ground.
82
83 * Nerdkit Building
84
85 To compile and program the NerdKit, connect the programmer, and type
86 'make' at the commandline (the top of Makefile will give you an idea
87 of where the NerdKit libraries should be located).
88
89 To compile without programming, use 'make blockgame.hex'.
Something went wrong with that request. Please try again.