Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Changes In Branch trunk Excluding Merge-Ins
This is equivalent to a diff from 5f00236c4a to a10ec44a41
2016-03-16
| ||
20:11 | merge static motion and the trunk fixes Leaf check-in: 4210795708 user: jadon tags: static-motion | |
19:40 | quick fix to the readme title error Leaf check-in: a10ec44a41 user: jadon tags: trunk | |
19:36 | optimize code and removed uneccessary sleep command fixed the formatting check-in: f3787804df user: jadon tags: trunk | |
2016-01-08
| ||
04:51 | fixed X lag but with sacrifice check-in: df12a4d039 user: Tom tags: trunk | |
04:34 | attempt 1 failed fixing X coordinate lag error Leaf check-in: 5f00236c4a user: Tom tags: buggy | |
03:36 | added license info check-in: 62da6ae0fe user: jadon tags: trunk | |
Changes to GameLogic.js.
1 2 3 4 | /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var circleX = 400; | > | | > | | | | < | | < < < < < < < < < | > > | | | < < | | < < < < | | < < < | < | | | < < < < < < < < < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 | // copyright (c)) 2015 jadon belezos, tom burris /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ var circleX = 400; var circleY = 25 var mouseX = 400; var mouseY = 250; var mass = 5; var radius = 0; function start() { drawCircles(); var interval = setInterval(mainloop, 50); } function mainloop() { moveCircles(); clearCanvas(); drawCircles(); } function getCoordinates(e) { mouseX = e.clientX; mouseY = e.clientY; } function clearCanvas() { var c = document.getElementById("canvas"); var ctx = c.getContext("2d"); ctx.clearRect(0, 0, 801, 501); } function moveCircles() { var speed = .08; radius = Math.sqrt((mass * 100) / Math.PI); if ( mouseX > circleX ) { var difX = mouseX - circleX; if (difX > 5) circleX = circleX + difX * speed; } else { var difX = circleX - mouseX; if (difX > 5) circleX = circleX - difX * speed; } if ( mouseY > circleY ) { var difY = mouseY - circleY; if (difY > 5) circleY = circleY + difY * speed; } else { var difY = circleY - mouseY; if (difY > 5) circleY = circleY - difY * speed; } } function drawCircles() { var c = document.getElementById("canvas"); var ctx = c.getContext("2d"); ctx.beginPath(); //draw the player ctx.arc(circleX, circleY, radius, 0, 2 * Math.PI); ctx.closePath(); ctx.lineWidth = 5; ctx.fillStyle = 'green'; ctx.fill(); ctx.strokeStyle = 'darkgreen'; ctx.stroke(); } |
Changes to GetCoordinates.html.
1 2 3 4 5 6 7 8 9 10 | <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <!DOCTYPE html> <html> <head> <script type="text/javascript" src="GameLogic.js"> </script> <style type="text/css"> body { | > | | | < < | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | <!-- copyright 2015 jadon belezos --> <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <!DOCTYPE html> <html> <head> <script type="text/javascript" src="GameLogic.js"> </script> <style type="text/css"> body { font-size:70%; font-family:verdana,helvetica,arial,sans-serif; } </style> </head> <body style="margin:0px;" onload="start()"> <canvas id="canvas" height="501" width="801" style="background-color:#696969" onmousemove="getCoordinates(event)">your browser does not support the canvas tag</canvas> </body> </html> |
Added Main.html.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | <!-- copyright 2015 jadon belezos, tom burris --> <!-- This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> <!DOCTYPE HTML Frameset DTD> <html> <head> <Title>Cell Game</title> <style type="text/CSS"> body { background:url(background.jpg); background-repeat: no-repeat; background-attachment: fixed; } #titlecell { border: 5px solid black; background-color:#333; color:white; width:800px; padding:15px } #maincell { border: 5px solid black; background-color:#696969; color:white; width:801px; padding:0px; height:501px; } </style> </head> <body> <center> <div id="titlecell"> <h1>Cell Game</h1> </div> <br> <div id="maincell"> <iframe frameborder=0 src="GetCoordinates.html" style="overflow:hidden; height: 503px; width: 801"></iframe> </div> </center> </body> </html> |
Added readme.md.
> > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <h2> cell</h2> this is the game cell. it is based on the game agario. you are cell that is trying to get big and collect as much mass as possible to become the biggest baddest cell. one thing that might be added to our game are viruses that reduce mass instead of add to it. another potential will be zombie cells. so there cells that can only grow the game is entirely web based so all you need is a relatively modern web browser. we might add speed boost. mass boost. speed boost game modes. the one person with loses faster as he becomes bigger than everyone else. |