Skip to content

Add files via upload - #601

Merged
LucasHT22 merged 6 commits into
hackclub:mainfrom
AKTHEPRO47:main
Dec 11, 2022
Merged

Add files via upload#601
LucasHT22 merged 6 commits into
hackclub:mainfrom
AKTHEPRO47:main

Conversation

@AKTHEPRO47

@AKTHEPRO47 AKTHEPRO47 commented Dec 3, 2022

Copy link
Copy Markdown
Contributor

Your checklist for this pull request

Aryan is the creator of the game

What is your game about?

Example: Pushing boxes to the goal. (from Sokoban Plus)

How to play your game?

Press WASD to move, , use the cricket bat to move the ball to the target

Code

Check off the items that are true.

  • The game was made using the Sprig editor.
  • The game is placed in the in the /games directory.
  • The code is significantly different from all other games in the Sprig gallery (except for games labeled "demo").
  • The game runs without errors.
  • The name of the file/game contains only alphanumeric characters, -s, or _s.
  • The game name is not the same as the others from gallery

Image (If an image is used)

  • The image is in the /games/img directory.
  • The name of the image matches the name of your file. Example: sokoban_plus.js -> sokoban_plus.png.

Thanks for PR!

@vercel

vercel Bot commented Dec 3, 2022

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
sprig ✅ Ready (Inspect) Visit Preview Dec 11, 2022 at 1:18AM (UTC)

@LucasHT22 LucasHT22 added the submission Game submission label Dec 3, 2022
@LucasHT22

Copy link
Copy Markdown
Member

Please complete the checks!

@LucasHT22

LucasHT22 commented Dec 3, 2022

Copy link
Copy Markdown
Member

Very good sprite:) What's the nome of the game? and levels 1, 6 and 7 seem to have no solution

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

The Name isCRICKET FRENZY

@LucasHT22

Copy link
Copy Markdown
Member

How solve levels 1,6 and 7?

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

new levels created

@LucasHT22

Copy link
Copy Markdown
Member

I didn't receive the updates :(

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

try seeing now sir

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

/*
@title: cricket_frenzy
@author: aryan.k
*/
const player = "p";
const box = "b";
const goal = "g";
const wall = "w";

setLegend(
[ player, bitmap ................ ................ ................ ................ ................ ......0000000000 .....00999999990 .000039999999990 0333339999999690 .0000399999966C0 .....00999999CC0 ......0000000000 ................ ................ ................ ................],
[ box, bitmap ................ ................ ................ .....000000..... ....03333330.... ...0333333330... ...0333333330... ...0333333330... ...03333333L0... ...0333333LL0... ....03333LL0.... .....000000..... ................ ................ ................ ................],
[ goal, bitmap ................ ................ ................ .....000000..... ....03333330.... ...0322222230... ...0323333230... ...0323223230... ...0323333230... ...0322222230... ....03333330.... .....000000..... ................ ................ ................ ................],
[ wall, bitmap 7777777777777777 7777777777777777 7777700000077777 7777703333077777 7777703333077777 7777700330077777 7777770330777777 7777770330777777 7777770330777777 7777770000777777 7777777007777777 7777777007777777 7777777777777777 7777770000777777 7777770330777777 7777770000777777]
);

let level = 0;
const levels = [
map w...ww .b..ww .p..gw,
map w...... ....... p..ww.. .b.w... ..wg... wwwwwww,
map p.wgw wbw.w ....w ....w ...ww,
map w....w p....w ..w..w .bw..w ..wgww,
map p.w. .bwg .... ..bg,
map w.gb. ..bg. ..... w.pw.,
map wwwwww...wwwwwwwwwwwwww ...........wwwwwwwwwwww ...www.....wwwwwwwwwwww .....ww....ww.w.wwwww.w ......ww...ww...wwww..w .b.....ww.......ww....w ........www...........w ..........ww..........w ...........www.....p..w .............www......w ...............ww....gw ...............wwwwwwww,
map ....w.......w.... ..b.w..wbw..w.b.. ...ww.......www.. .......www....... ..w.........ww... ..ww...ggg....... ...w...ggg......w ...w....p.....w.. ...w..........w.. ..wwwwwwwww.www.. .bw...w.b...w.b.. ..w...w.....w....

];

const melody = tune 41.666666666666664: e4^41.666666666666664, 41.666666666666664: f5^41.666666666666664 + g5^41.666666666666664 + b5/41.666666666666664 + f4^41.666666666666664, 41.666666666666664: d4~41.666666666666664 + g5^41.666666666666664 + f5^41.666666666666664 + b5/41.666666666666664 + a5/41.666666666666664, 41.666666666666664: f4~41.666666666666664 + e4~41.666666666666664 + f5^41.666666666666664 + g5^41.666666666666664 + a5/41.666666666666664, 41.666666666666664: a4~41.666666666666664 + g4^41.666666666666664 + a5/41.666666666666664, 41.666666666666664: c5~41.666666666666664 + b4~41.666666666666664 + e4~41.666666666666664 + d4~41.666666666666664 + g5/41.666666666666664, 41.666666666666664: d5~41.666666666666664 + d4~41.666666666666664 + c5-41.666666666666664 + g5/41.666666666666664 + a4^41.666666666666664, 41.666666666666664: f5~41.666666666666664 + e5~41.666666666666664 + e4~41.666666666666664 + g5/41.666666666666664 + a4^41.666666666666664, 41.666666666666664: g5~41.666666666666664 + e4~41.666666666666664 + b4-41.666666666666664 + c5-41.666666666666664 + f5/41.666666666666664, 41.666666666666664: a5~41.666666666666664 + g5~41.666666666666664 + e4~41.666666666666664 + f4~41.666666666666664 + c5-41.666666666666664, 41.666666666666664: g5~41.666666666666664 + f4~41.666666666666664 + b4-41.666666666666664 + f5/41.666666666666664 + c5^41.666666666666664, 41.666666666666664: f5/41.666666666666664 + e4~41.666666666666664 + a4-41.666666666666664 + a5~41.666666666666664 + c5^41.666666666666664, 41.666666666666664: e5~41.666666666666664 + e4~41.666666666666664 + a4-41.666666666666664 + a5~41.666666666666664 + f5/41.666666666666664, 41.666666666666664: e5~41.666666666666664 + e4~41.666666666666664 + g5~41.666666666666664 + f5/41.666666666666664 + d5^41.666666666666664, 41.666666666666664: d5~41.666666666666664 + f4~41.666666666666664 + g5~41.666666666666664 + a5~41.666666666666664 + b5~41.666666666666664, 41.666666666666664: c5~41.666666666666664 + a5~41.666666666666664 + e5^41.666666666666664 + d5^41.666666666666664, 41.666666666666664: b4~41.666666666666664 + a4~41.666666666666664 + e5^41.666666666666664 + d4-41.666666666666664, 41.666666666666664: g4~41.666666666666664 + e5-41.666666666666664 + d5-41.666666666666664 + e4-41.666666666666664 + d4-41.666666666666664, 41.666666666666664: g4~41.666666666666664 + d5-41.666666666666664 + d4-41.666666666666664 + e5^41.666666666666664, 41.666666666666664: f4~41.666666666666664 + d5/41.666666666666664 + d4-41.666666666666664 + e5^41.666666666666664, 41.666666666666664: f4~41.666666666666664 + d5-41.666666666666664 + b4^41.666666666666664 + c4-41.666666666666664 + d4-41.666666666666664, 41.666666666666664: e4~41.666666666666664 + e5-41.666666666666664 + b4^41.666666666666664 + c4-41.666666666666664 + d4-41.666666666666664, 41.666666666666664: e4~41.666666666666664 + e5-41.666666666666664 + b4^41.666666666666664 + a4^41.666666666666664 + b5/41.666666666666664, 41.666666666666664: e4~41.666666666666664 + f5-41.666666666666664 + a4^41.666666666666664 + b5/41.666666666666664 + c5/41.666666666666664, 41.666666666666664: e4~41.666666666666664 + a4^41.666666666666664 + a5/41.666666666666664 + b4/41.666666666666664 + g5^41.666666666666664, 41.666666666666664: e4~41.666666666666664 + a4/41.666666666666664 + b4/41.666666666666664 + a5/41.666666666666664 + g5^41.666666666666664, 41.666666666666664: f4~41.666666666666664 + b4^41.666666666666664 + a5/41.666666666666664 + a4/41.666666666666664 + g5^41.666666666666664, 41.666666666666664: f4~41.666666666666664 + c4/41.666666666666664 + c5^41.666666666666664 + d5^41.666666666666664 + e5^41.666666666666664, 41.666666666666664: f4/41.666666666666664 + c4/41.666666666666664 + f5/41.666666666666664 + g5/41.666666666666664 + a5^41.666666666666664, 41.666666666666664: f4/41.666666666666664 + d4/41.666666666666664 + e5/41.666666666666664 + f5/41.666666666666664 + a5^41.666666666666664, 41.666666666666664: g4~41.666666666666664 + b5^41.666666666666664 + a5^41.666666666666664, 41.666666666666664: a4~41.666666666666664 + b5^41.666666666666664

const playback = playTune(melody, Infinity)
const currentLevel = levels[level];
setMap(currentLevel);

setSolids([ player, box, wall ]);

setPushables({
[player]: []
});

onInput("s", () => {
getFirst(player).y += 1;
});

onInput("d", () => {
getFirst(player).x += 1;
});

onInput("w", () => {
getFirst(player).y -= 1;
});

onInput("a", () => {
getFirst(player).x -= 1;
});

onInput("j", () => {
const currentLevel = levels[level];
if (currentLevel !== undefined) {
clearText("");
setMap(currentLevel);
}
});

afterInput(() => {

const targetNumber = tilesWith(goal).length;

const numberCovered = tilesWith(goal, box).length;

if (numberCovered === targetNumber) {

level = level + 1;

const currentLevel = levels[level];


if (currentLevel !== undefined) {
  setMap(currentLevel);
} else {
  addText("COMPLETED", { y: 4, color: color`3` });
}

}
});

setPushables({
[player ]: [ box, player ]
})

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

above is the full code

@samdev-7

samdev-7 commented Dec 4, 2022

Copy link
Copy Markdown
Member

Can you paste the code into the file?
image
Then:
image

@LucasHT22

Copy link
Copy Markdown
Member

^^^

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

done sir

@LucasHT22

Copy link
Copy Markdown
Member

sorry, but how to play your game?

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

use WASD to move bat to hit ball to target

@LucasHT22

Copy link
Copy Markdown
Member

oh, sorry, when i did an update i deleted the player by mistake

@LucasHT22

Copy link
Copy Markdown
Member

about the music, don't you think it's too shrill?

@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

to me the music makes the player tense

@LucasHT22

Copy link
Copy Markdown
Member

oh, ok! makes sense.

@LucasHT22 LucasHT22 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! Congrats:)
If you're a teen, you can get your sprig here! https://sprig-order.hackclub.dev/

@LucasHT22
LucasHT22 merged commit 5233f50 into hackclub:main Dec 11, 2022
LucasHT22 added a commit that referenced this pull request Dec 11, 2022
@AKTHEPRO47

Copy link
Copy Markdown
Contributor Author

THANK YOU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

submission Game submission

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants