Writing games using dynamic interactivity in mathematica is an amusing subject! I will vote up your post for this. But I agree with others that it is hard to answer your question, you should work out minimal example for us first.
Below I am giving my code for tetris. I recognize, it is a nonminimal answer, but it is working and can be useful for you. Controls are with arrow keys. To make controls working, make the focus on the panel, e.g. click "MatTetris!". Enjoy.
numFigures=6;speed=6;
gLen=16;gWidth=10;bckgColor=Black;bckgColor2=Gray;figColor=Red;patColor=Blue;
fig[1]={{1,-1},{1,0},{0,0},{0,1}};
fig[2]={{-1,-1},{-1,0},{0,0},{0,1}};
fig[3]={{-1,0},{0,0},{1,0},{0,1}};
fig[4]={{-1,0},{0,0},{1,0},{2,0}};fig[5]={{-1,1},{0,1},{0,0},{0,-1}};
fig[6]={{1,1},{0,1},{0,0},{0,-1}};
mRight={{0,1},{-1,0}};
mLeft={{0,-1},{1,0}};
MovementPossible[where_]:=Block[{altData=Which[
where=="down",{figData[[1]]+{0,-1},figData[[2]]},
where=="left",{figData[[1]]+{-1,0},figData[[2]]},
where=="right",{figData[[1]]+{1,0},figData[[2]]},
where=="rotleft",{figData[[1]],(mLeft.#)&/@figData[[2]]},
where=="rotright",{figData[[1]],(mRight.#)&/@figData[[2]]}
]}
,(Count[patData,Alternatives@@((altData[[1]]+#)&/@figData[[2]])]==0)&&(Count[altData[[1,2]]+altData[[2,All,2]],x_/;x<1]==0)&&(Count[altData[[1,1]]+altData[[2,All,1]],x_/;((x<1)||(x>gWidth))]==0)];
Move[where_]:=(figData=Which[
where=="down",{figData[[1]]+{0,-1},figData[[2]]},
where=="left",{figData[[1]]+{-1,0},figData[[2]]},
where=="right",{figData[[1]]+{1,0},figData[[2]]},
where=="rotleft",{figData[[1]],(mLeft.#)&/@figData[[2]]},
where=="rotright",{figData[[1]],(mRight.#)&/@figData[[2]]}
]);
AddFigureToPattern:=(patData=Union[patData,(figData[[1]]+#)&/@figData[[2]]];figData={{0,0},{}});
AddingFigurePossible:=(Count[patData,Alternatives@@(({Round[gWidth/2],gLen-1}+#)&/@prefigData)]==0);
AddFigure:=(figData={{Round[gWidth/2],gLen-1},prefigData};prefigData=fig[RandomInteger[{1,numFigures}]]);
DeleteLines:=Block[{lineCount=0,ic=1},
While[ic<=gLen,
If[Count[patData,{_,ic}]==gWidth,
patData=DeleteCases[patData,{_,ic}];patData=((#/.{xx_,yy_/;yy>ic}:>{xx,yy-1})&/@patData);++lineCount;--ic,
++ic];
]
Score[lineCount]];
Score[lC_]:=Which[lC==1,totScore+=1,
lC==2,totScore+=3,
lC==3,totScore+=6,
lC==4,totScore+=10];
GameOver:=(CreateDialog[{Column[{Style["Game Over!",FontColor->Red,FontSize->18],
Row[{Style["Your score is: ",FontColor->Blue,FontSize->18],Style[totScore,FontColor->Blue,FontSize->18]}]
}],DefaultButton[ResetGame;DialogReturn[]]}];)
ResetGame:=(patData={};prefigData=fig[RandomInteger[{1,numFigures}]];FigureActive=False;totScore=0;notGamingOver=True)
MainCycle:=If[FigureActive,
If[MovementPossible["down"],
Move["down"];,
FigureActive=False;AddFigureToPattern;DeleteLines;],
If[AddingFigurePossible,
AddFigure;FigureActive=True;,
If[notGamingOver,notGamingOver=False;GameOver];]
];
gameBoard:=EventHandler[
Panel[Row[
{Dynamic@Graphics[{{bckgColor,Rectangle[{0,0},{gWidth,gLen}]},{figColor,Rectangle[#-{1,1},#]&/@((figData[[1]]+#)&/@figData[[2]])},{patColor,Rectangle[#-{1,1},#]&/@patData}},ImageSize->300],
Column[{
Style["MatTetris!",FontColor->Blue,FontSize->18],,Row[{Style["Score: ",FontColor->Red,FontSize->18],Dynamic@Style[totScore,FontColor->Red,FontSize->18]}],,,Dynamic@Graphics[{{bckgColor2,Rectangle[{-2,-2},{2,1}]},{figColor,Rectangle[#-{1,1},#]&/@prefigData}}],,,,,,,,,,,,,,,,""
},Center]
}]],
{"LeftArrowKeyDown":>If[MovementPossible["left"],Move["left"]],"RightArrowKeyDown":>If[MovementPossible["right"],Move["right"]],"DownArrowKeyDown":>If[MovementPossible["down"],Move["down"]],"UpArrowKeyDown":>If[MovementPossible["rotleft"],Move["rotleft"]]}];
LaunchGame:=(ResetGame;MainCycle;gameBoard);
LaunchGame
While[True, MainCycle; Pause[1 - speed/10]]
DynamicandEventHandler. Then start out trying smaller constructions, then try to build this game again, and come back when you know more about what you are trying to accomplish. – jVincent Jul 30 '13 at 14:58DynamicModulefor your variables, perhapsPanel,Grid, etc for layout, place your controls or write your own withEventHandler, etc. -- these links are guides to the functions that can help you do what you want. But you'll have to decide what you want (or ask an expert). – Michael E2 Jul 30 '13 at 17:34DynamicModuleto create a little snake following the mouse. Maybe it's an eel, though. Not sure. – Jens Jul 31 '13 at 03:57