Code edit (4 edits merged)
Please save this source code
User prompt
add some randomness to the food spawn time
User prompt
add some randomness to the food spawner
User prompt
there's a bug where food is not collected by player_up
User prompt
improve the collision detection between the player_up and the food. The food should only be collected when it's center intersects the player
User prompt
food can't be collected by player_down
User prompt
improve the collision detection between the food and the player_up
User prompt
the player should be able to collect the food. this happens when the player_up asset collides with the food. increment the score by 1 for each food collected
User prompt
when the food touches the player collect it and increment the score by 1
Code edit (6 edits merged)
Please save this source code
User prompt
create a new class for the Food which is going to be what the player can collect. Food is spawned from the right edge of the screen and travels towards the left with a speed of 10. this spawner is located at the y position of 500
Code edit (2 edits merged)
Please save this source code
User prompt
the player should be double the size
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
User prompt
move the player lower on the screen
User prompt
contain the player_up and player_down into a single class called the Player. all code related to the player should be centralized in this class. also give it it's own x and y coordinates for easi manipulation, so all frames inside can be moved around using these coordinates on the screen
Code edit (1 edits merged)
Please save this source code
User prompt
move the player_down asset 100 pixels to the left
Code edit (1 edits merged)
Please save this source code
User prompt
instead of aligning the player states relative to the center of the assets, anchor them to the bottom part of the asset
User prompt
the tapping doesn't work. taps should move from one frame to the other. start with Player Up and when tapping go to Player_Down. tapping basically alternates between these 2 states
User prompt
add a second frame to the Player_up, which is called Player_Down. on each Tap on the screen, alternate between these 2 frames
User prompt
Add the Player_Up in the center of the screen, and give it x and y coordinates. also place it in the midground container
User prompt
create a BackgroundContainer, MidgroundContainer and ForegroundContainer in that order
===================================================================
--- original.js
+++ change.js
@@ -109,9 +109,9 @@
player.switchFrame();
};
// Spawn food from the right edge of the screen at y position of 500
game.update = function () {
- if (LK.ticks % Math.floor(Math.random() * 60 + 30) == 0) {
+ if (LK.ticks % Math.floor(Math.random() * 120 + 60) == 0) {
// every second
var newFood = new Food();
newFood.x = 2048; // right edge of the screen
newFood.y = 1900;
hamburger. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
poop UI element . pixelated. 8 bit.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
text saying "Constipated" against a poop banner. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
text saying "You’re on a roll!" against a toilet paper banner. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
text saying "Holy Crap!" against a divine angelic poop banner. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixelated text saying "Shit Yeah!" as a shitty newspaper headline. pixelated. 8-bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
macdonalds fries but with the M letter rotated so it looks like a 3. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
large KFC bucket with the digit 5 on it. pixelated. 8 bit. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
8-bit pixelated image of a video game character sitting with hands on a large belly, wearing a white shirt and brown pants. The setting is a simple bathroom, with the character as the main focus. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.