
I applied for a job recently, and as part of the application process they gave you the option to skip the whole interview process and just make something instead. I hate interviews, and have always believed that a business should hire based on skill, especially in industries where the whole job is based on that. I mean c'mon, anybody can lie their way through an interview, but you can't lie your way through a project... well, maybe you could, but it wouldn't be easy. Anyway, here were the specs of the assignment.
The game you will create will be a 7x6 game, two player local game. The user should be able to click on the column that they want to place their piece in and the piece will tween down from the top of the column into place. There should be a player turn indicator. When the board is filled up, detect that all the places have been used. Detecting when a player wins is not necessary. We expect this task to take between 6 to 8 hours.
This swf should be 900x550 and all primary development should be done .as files. This project must be written in Actionscript 3.
I love these kind of 'interviews'. The whole base setup took me about 6 hours to complete, but I lost track of time while working on all the extra credit. It was just a fun project to work on and I kind of lost myself in it. Here is the asDoc on this little guy, and below are some examples of what this thing can do.
If you leave everything blank in the settings file, this is what you get. With the settings file you can customize almost everything about this game. Continue on to the next example to see some of those customizations.
<gameboard columns = "" rows = "" blockSize = "" boardColor = "" dropSlotColor = "" disableShadows = "" shadowColor = "" shadowDistance = "" shadowAngle = "" /> <user playerNames = "" playerColors = "" playerIconColor = "" playerBorderColor = "" winningColor = "" winningIconColor = "" winningBorderColor = "" splosionColor = "" /> <background img = "" imgAlpha = "" tileTheImg = "" imgOffsets = "" bgColor = "" bgShadingColors = "" disableShading = "" /> <ui winDialogColor = "" winDialogTextColor = "" winDialogBtnColors = "" winDialogBtnTextColor = "" playerTitleColor = "" playerTitleStrokeColor = "" playerScoreColor = "" />
In this example I've increased the columns to 10 and rows to 7. Due to the increased columns and rows, the blockSize had to be decreased to ensure that the game fit properly on the stage.
A lot of the coloring for the game has been customized as well. The colors for the game board, shadows, player colors, and the winner dialog have been changed. Any time a property ends in the plural, it means that you have to add two properties in order to change it. For example 'playerColors' needs two properties, where 'winningColor' only needs one.
One last customization was the addition of a background image. The tile image is 320x340, and is tiled (by default) to cover the whole background.
<gameboard columns = "10" rows = "7" blockSize = "50" boardColor = "008282" dropSlotColor = "" disableShadows = "" shadowColor = "131A17" shadowDistance = "" shadowAngle = "" /> <user playerNames = "" playerColors = "CC3300,FFFF00" playerIconColor = "990000,FF6600" playerBorderColor = "990000,FF6600" winningColor = "" winningIconColor = "99FF99" winningBorderColor = "009300" splosionColor = "" /> <background img = "imgs/Carpet0018.jpg" imgAlpha = "" tileTheImg = "" imgOffsets = "" bgColor = "" bgShadingColors = "6699CC,303D38" disableShading = "" /> <ui winDialogColor = "23C2BB" winDialogTextColor = "131A17" winDialogBtnColors = "96DEDC, 96DEDC" winDialogBtnTextColor = "154442" playerTitleColor = "" playerTitleStrokeColor = "" playerScoreColor = "" />
This example shows just what can be accomplished via the settings. All the colors, the size of the game board, and the background have been completely customized.
You have the option with the background to disable tiling, and to offset it's default positioning (which is at the center of the stage). Those properties along with being able to set background color and background shading colors, you can do anything you want to the background.
Also, you may notice there seems to be a glow effect applied to the elements as well. In fact, the shadow color and positioning were just altered to give that appearance.
<gameboard columns = "6" rows = "5" blockSize = "68" boardColor = "000000" dropSlotColor = "AAAAAA" disableShadows = "" shadowColor = "1DF1DC" shadowDistance = "0" shadowAngle = "" /> <user playerNames = "Sam, Clu" playerColors = "000000,000000" playerIconColor = "" playerBorderColor = "0093FF,00FF66" winningColor = "000000" winningIconColor = "132828" winningBorderColor = "1DF1DC" splosionColor = "1DF1DC" /> <background img = "imgs/tron5.jpg" imgAlpha = "" tileTheImg = "false" imgOffsets = "-8,-165" bgColor = "000000" bgShadingColors = "001A33, 000000" disableShading = "true" /> <ui winDialogColor = "000000" winDialogTextColor = "1DF1DC" winDialogBtnColors = "111111,111111" winDialogBtnTextColor = "1DF1DC" playerTitleColor = "111111" playerTitleStrokeColor = "2c5e5f" playerScoreColor = "111111" />