Skip to content

Commit

Permalink
Updating Plan
Browse files Browse the repository at this point in the history
  • Loading branch information
abi1961 committed Oct 13, 2023
1 parent 6d99a1e commit 46dafd2
Showing 1 changed file with 103 additions and 20 deletions.
123 changes: 103 additions & 20 deletions _notebooks/2023-10-05-Plan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,12 @@
"Over my Computer Science years I have found that it is a lot more interesting to code if you start with something fun. Loops are kind of boring, but if you add animation, alien planet, and monkeys what is not to like.\n",
"\n",
"Initial concepts: \n",
"\n",
"- Mr M (Product Owner, Scrum Master)\n",
" - Introduce basic concepts to non coder, even younger children\n",
" - Make game easy, instead of start over continue but require more events for success\n",
" - Use Mario features like squish to help in countdown\n",
" - Try to integrate some code into game\n",
"\n",
"- Main Character: ()\n",
" \n",
"\n",
"- Main Character: Pacman\n",
" - Ghosts (Opponents)\n",
" - C++3PO\n",
" - Darth Compiler\n",
Expand All @@ -55,16 +51,53 @@
" - Star power up\n",
" - Black hole\n",
"\n",
"- Mr Lopez\n",
" - Surfaces with different properties\n",
" - Bouncy\n",
" - Sticky\n",
" - Damaging\n",
"- Abigail\n",
" - Setting up Maze:\n",
" - Establishing Game Barrier (ip):\n",
" //Make player loop through boundaries\n",
" if (player.position.x >= 800) {\n",
" player.position.x = 799;\n",
" }\n",
" else if (player.position.x <= 0) {\n",
" player.position.x = 1;\n",
" }\n",
" if (player.position.y >= 800) {\n",
" player.position.y = 799;\n",
" }\n",
" else if (player.position.y <= 0) {\n",
" player.position.y = 1;\n",
" }\n",
" - Restricting Coordinates rather than setting up \n",
" - Game Over Screen Code (ip):\n",
"\n",
" - Create obstacles or challenges that require players to use conditional statements (e.g., if-else) to make decisions, such as determining if a door is locked or open based on collected keys.\n",
" - Use abilities by calling functions.\n",
" - Different resources require different variables which we show the player.\n",
" - Introduce the concept of objects and classes by having players interact with different spaceship types, each with its own properties and behaviors\n",
" %%javascript\n",
"let score = 0;\n",
"// Score Display\n",
"function drawScore() {\n",
" ctx.font = \"16px Arial\";\n",
" ctx.fillStyle = \"#0095DD\";\n",
" ctx.fillText(`Score: ${score}`, 8, 20);\n",
" }\n",
" // Pacman eating pixels\n",
" function collisionDetection() {\n",
" for (let c = 0; c < brickColumnCount; c++) {\n",
" const b = bricks[c];\n",
" if (b.status === 1) {\n",
" if (\n",
" x > b.x &&\n",
" x < b.x + brickWidth &&\n",
" y > b.y &&\n",
" y < b.y + brickHeight\n",
" ) {\n",
" dy = -dy;\n",
" b.status = 0;\n",
" score++;\n",
" }\n",
" }\n",
" \n",
" }\n",
" }\n",
" \n",
"\n",
"- Rohan\n",
" - Maybe add some competitive aspects to the game --> who completed the course in fastest time\n",
Expand Down Expand Up @@ -171,6 +204,60 @@
"[Game Repository](https://github.com/Gavaruba/Game)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"vscode": {
"languageId": "javascript"
}
},
"outputs": [
{
"data": {
"application/javascript": "let score = 0;\n// Score Display\nfunction drawScore() {\n ctx.font = \"16px Arial\";\n ctx.fillStyle = \"#0095DD\";\n ctx.fillText(`Score: ${score}`, 8, 20);\n }\n // Pacman eating pixels\n function collisionDetection() {\n for (let c = 0; c < brickColumnCount; c++) {\n const b = bricks[c];\n if (b.status === 1) {\n if (\n x > b.x &&\n x < b.x + brickWidth &&\n y > b.y &&\n y < b.y + brickHeight\n ) {\n dy = -dy;\n b.status = 0;\n score++;\n }\n }\n \n }\n }\n \n\n\n\n",
"text/plain": [
"<IPython.core.display.Javascript object>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"%%javascript\n",
"let score = 0;\n",
"// Score Display\n",
"function drawScore() {\n",
" ctx.font = \"16px Arial\";\n",
" ctx.fillStyle = \"#0095DD\";\n",
" ctx.fillText(`Score: ${score}`, 8, 20);\n",
" }\n",
" // Pacman eating pixels\n",
" function collisionDetection() {\n",
" for (let c = 0; c < brickColumnCount; c++) {\n",
" const b = bricks[c];\n",
" if (b.status === 1) {\n",
" if (\n",
" x > b.x &&\n",
" x < b.x + brickWidth &&\n",
" y > b.y &&\n",
" y < b.y + brickHeight\n",
" ) {\n",
" dy = -dy;\n",
" b.status = 0;\n",
" score++;\n",
" }\n",
" }\n",
" \n",
" }\n",
" }\n",
" \n",
"\n",
"\n",
"\n"
]
},
{
"attachments": {},
"cell_type": "markdown",
Expand All @@ -192,11 +279,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "plaintext"
}
},
"metadata": {},
"outputs": [],
"source": [
"## Anatomy of repository\n",
Expand Down Expand Up @@ -225,7 +308,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
"version": "3.10.12"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 46dafd2

Please sign in to comment.