Skip to content

Commit

Permalink
canvas size 3
Browse files Browse the repository at this point in the history
  • Loading branch information
heybobjones committed Jun 25, 2024
1 parent 096f8e8 commit 2b9d873
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const flashOverlay = document.getElementById('flashOverlay');
const player = {
x: 50,
y: 200,
radius: 30, // Increased radius for the player
radius: 20,
speed: 15,
image: null,
velocityX: 0,
Expand Down Expand Up @@ -91,8 +91,8 @@ function createObstacle() {
const type = types[Math.floor(Math.random() * types.length)];
const obstacle = {
x: canvas.width,
y: Math.random() * (canvas.height - 60), // Adjusted to fit larger obstacles
radius: 35, // Increased radius for obstacles
y: Math.random() * (canvas.height - 40),
radius: 25,
speed: 2 + Math.random() * 3,
type: type,
title: getTitle(type)
Expand Down Expand Up @@ -146,7 +146,7 @@ function moveObstacles() {
obstacle.y += dy / dist * 0.5;
break;
case 'marketer':
if (Math.random() < 0.001 && obstacle.radius > 20) { // Adjusted to fit larger obstacles
if (Math.random() < 0.001 && obstacle.radius > 15) {
obstacle.radius *= 0.7;
obstacles.push({...obstacle, y: obstacle.y + 30});
}
Expand Down

0 comments on commit 2b9d873

Please sign in to comment.