Share your repls and programming experiences

← Back to all posts
[GAME] The Killer
BobTheTomatoPie

This is one of my first things with canvas

I know its very simple and it probably has crappy graphics but let me know what you think of it. It wasn't too hard to make but it was definitally something new.

Gameplay!

You are an alien who's goal is to kill all the people in a crowd without the police running into you!

Sounds!

  1. When you kill something a sound will play, and haunting music will start to make you feel deadly. At the end a haunting noise will play alerting you you lose.

I DID NOT MAKE THE SOUNDS IN THIS GAME

Music: https://www.bensound.com
SFX: http://soundbible.com/tags-death.html
SFX-LosingSound: http://freesoundeffect.net/sound/casual-game-lose-sound-effect

How to play

You are the green square.
Use W,A,S,D to move
Once you start moving you can't stop.
Press M while over someone to kill.
Try to get the highest score

This game is hella hard

If you don't get a high score dont worry this game is harder than I intended for it to be as it was supposed to be a simple easy game. Although it looks bad I think it is fun.

Alien Killer

In this game you are a murderous alien. You run around and kill people. Each person you kill gives you an aditional score of 1.

Here are the rules

  1. To kill if you are on top of a person in the crowd press M.
  2. Blue squares are police, if you touch a police you instantly die.
  3. Light blue squares are voluntary police, if you press M while over one you die.

How it works

Each time you kill someone there is a chance that a police spawns, a voluntary police spawns, or 2 new people spawn. This keeps the crowd active and the game hard.

My record

My record is 29 try to beat it without cheating.
@Victor6767 holds the record with a score of 199!

@blackout4344 suck on this man!

I DID NOT MAKE THE SOUNDS IN THIS GAME

Music: https://www.bensound.com
SFX: http://soundbible.com/tags-death.html
SFX-LosingSound: http://freesoundeffect.net/sound/casual-game-lose-sound-effect

Voters
maxina
xXToluwaXx
vivionysmith
Nanowrimoijk
forceofyoda
BananaJellyfish
ShadowWalker258
ninja2k11
INCOGNITO001
coder400
Comments
hotnewtop
coder400

hey! I made a game library and i am recreating this, i have not used any of your code and was wondering if you would allow me to post it as a demo for my library or even as a post, i will @ you to tell everyone i based it off your game

BobTheTomatoPie

sure! that sounds really cool, can't wait to see the remake you create @coder400

Victor6767

@BobTheTomatoPie Hahaha this game is awesome

I'll keep playing and update this

BobTheTomatoPie

damnnnnnnn, thats such a highscore, i may update it soon, just been busy lol, also thx mate @Victor6767

elijahbernard

I finally made it to 22!

JonahElias

@BobTheTomatoPie How do you play audio in js.

I did the following code and it didn't work:

BobTheTomatoPie

yea i tend to put the audio.play() part after an if stateme t @JonahElias

brandosha

@JonahElias on some devices audio can only be played on a user interaction like onclick

mintbookworm

That's really good coding!

BobTheTomatoPie

thanks!! @mintbookworm

mintbookworm

your VERY welcome @BobTheTomatoPie

AlexTran11

I got 57 I was soo close to the highest

BobTheTomatoPie

yea lol good job tho @AlexTran11

YuAndy

BobTheTomatoPie

nice! @YuAndy

codeitfast

My top score is 12

BobTheTomatoPie
codeitfast
BobTheTomatoPie

awesome! you beat my high score and i made it lol @codeitfast

codeitfast

@BobTheTomatoPie XD I didn't know I did it! Sorta reminds me of pacman.

Name12

man oh man this is lot's of fun. awesome like always! keep going, dude!

BobTheTomatoPie

thx! @Name12

Name12
Krazy0range

I got 50! I got caught because I was getting bored, but good game!

BobTheTomatoPie

aweseome job! what could i add to make it less boring over time? also thanks! @KrazyOrange

Krazy0range

Maybe make the police get harder and harder, so that they chase you, and maybe try adding powerups or other things.
You could also try optimizing it to lag less. Maybe drawing the red squares very loop is power-consuming, so you could make them disappear after maybe, like 10 seconds. Other than that, it's great!
@BobTheTomatoPie

Spitfier720

The game is really fun, only problem is that I have to keep spamming M to make sure I kill someone, maybe there could be a better way for that.

Also, my high score is 35.

BobTheTomatoPie

yea but you can hold down m and until you turn it will insta kill them. also thnaks! @Spitfier720

Spitfier720

@BobTheTomatoPie I see, i guess the next challenge would be to hold down m and it will always work and not have to press it after you turn again.

They move so unpredictably lol

BobTheTomatoPie

lol yea but it would be so easy if i did that @Spitfier720

Spitfier720

@BobTheTomatoPie i see what you mean

GEISTCODER

Did not get the controls

BobTheTomatoPie

a,w,s,d to move and m to kill very simple also next time read the description it explains the controls @GEISTCODER

GEISTCODER
BobTheTomatoPie

Np hope you like it @GEISTCODER

GEISTCODER

I would be lying if i said i didnt @BobTheTomatoPie

avacadox21

NOICE!!!!!!!

BobTheTomatoPie
RayhanADev

Dude what is your secret xD. How did you get 50 updoots on a project I only got 50+ once ever xD.

BobTheTomatoPie

lol idk, i think if you post at certains times in the day more ppl see it so i aim for times when the last popular post was a couple days ago @RayhanADev

BobTheTomatoPie

btw check chat.txt @RayhanADev

RayhanADev

@BobTheTomatoPie crab nice strategy xD. Meanwhile my lyrics app get’s no updoots What time do you find is effective?

BobTheTomatoPie

idk like just pay attention to the times other things were posted, ive made a lyrics app once, is your like you type a song and get the lyrics?? @RayhanADev

RayhanADev

@BobTheTomatoPie something like that, I used the lyrics.ovh api along with Wikipedia’s api for cover art when it finds some. Got a good suggestion for more reliable cover art?

BobTheTomatoPie

nope lol, mine was a python thing that just spits out the text @RayhanADev

OctagonalT

49 💪

BobTheTomatoPie

damnnn thats good, 10 more and you beat the record @OctagonalT

BobTheTomatoPie

dang thats good, 10 more and you beat the record @OctagonalT

OctagonalT

@BobTheTomatoPie dont fuel my procrastination even more 😳

BobTheTomatoPie
OctagonalT

alright fine.
ill be back soon with a better score
@BobTheTomatoPie

BananaJellyfish

30!

BobTheTomatoPie
GeneralBaker

ANOTHER RECORD!!!

GeneralBaker

This time I killed one, kept hitting 'm' on it until there was so many guys the computer went slow. Then you have time to dodge ;)
2. Stay toward the middle! Those police are awfully sneaky around the borders, so you are better off staying where you can see them coming! @GeneralBaker

BobTheTomatoPie

damnnn you are the god of this game lol, i fixed the body bug btw where they spawn on dead body hit. @GeneralBaker

BobTheTomatoPie

i updated the record thing @GeneralBaker

GeneralBaker

Nice! Also if you need help with this I may be able to code a little.
Also, the body 'bug' you actually intended, so I would say that is more of 'exploiting a feature' if you see what I mean... Instead of getting rid of it, you could add a cap to the amount of people in the game at the same time. @BobTheTomatoPie

BobTheTomatoPie

yea thats a good idea, also you know what i meant lol, i will probably add a cap soon, thx for the feedback! @GeneralBaker

BobTheTomatoPie

so i looked into making a population cap and it will not work out because it would mean humans quit spawning over time. @GeneralBaker

GeneralBaker

I guess the only solution I see at this point would be making existing police harder and adding only 1 normal person every kill. @BobTheTomatoPie

CAFR

Bug: i went into inspect to see what was wrong i went into console and it showed up with: "Hit not registered" or something similar.

BobTheTomatoPie

hmm ,i would try again its working fine for me @CAFR

BobTheTomatoPie

also i console.log a ton of stuff that might not make sinse @CAFR

BobTheTomatoPie

yea i console.log() when someone goes off the page as hit and if they dont i log nothing happened it is not a bug just was for me when i was making this @CAFR

MylesW18

I have a bug to report. I've noticed that if you press M on a dead body more things will spawn. Idk if that is intentional, just seemed odd to me. (BTW my high is 30:)

MylesW18

ok lol nvm saw answer in other comments

BobTheTomatoPie

its intentional lol, a lot of ppl keep asking, thats a nice score! you beat mine lol @MylesW18

MylesW18

@BobTheTomatoPie Idk if just a hard mode would make more sense with more police spawning, because it is a bit annoying just spam clicking M over dead bodies accidently and having tons of police spawn in. Maybe it adds strategy?

BobTheTomatoPie

idk ill maybe remove it later @MylesW18

tankerguy1917

this is pretty fun. I got 21

BobTheTomatoPie

thanks also nice score! @tankerguy1917

TTyrtle

OMG I WAS ON 42 WHEN I DIED??? OH NO LMAO!

BobTheTomatoPie

dammnn 42 is good, the record is 45 @TTyrtle

TTyrtle

lmao i was so [email protected]

AnuskaGiri1

my high score is 10

DungeonMaster00

please remove swear words or i will report

BobTheTomatoPie

where are there any swear words?? @DungeonMaster00

DungeonMaster00

@BobTheTomatoPie i saw that comment about computer crashing and you replied wwith comments with swear words. also, it is in the post description

BobTheTomatoPie

okay well i will change the description but changing every comment it to much @DungeonMaster00

TravisRaney
BobTheTomatoPie

travis why, i thought we were friends @TravisRaney

DungeonMaster00

@BobTheTomatoPie ok good enough but still be careful

TravisRaney

@BobTheTomatoPie we are but I am not reporting you right now but if I see swear words then I will, ok?

TravisRaney

@BobTheTomatoPie plus, I need your help with the movie story part 2

BobTheTomatoPie

bruh so your blackmailing me, ever realized that i might not have the time to write a 100 line book with you @TravisRaney

TravisRaney

@BobTheTomatoPie no I am not black mailing you

BobTheTomatoPie

can you and @ilovebeef pls take this to discord i dont like the notification spam @TravisRaney

[deleted]

im playing ur game on another computer is it possible to shoot the human pixels? @BobTheTomatoPie

TravisRaney

@BobTheTomatoPie sorry but just one quick question can you help me out on the Movie Story Part 2 please?

BobTheTomatoPie

not yet, maybe someday @ilovebeef

BobTheTomatoPie

i think i made it pretty clear, i dont have the time man @TravisRaney

TravisRaney

@BobTheTomatoPie okay, well if you decided to come to my repl then you can be able to have access to the movie story part2, anyway thanks for letting me know @BobTheTomatoPie

[deleted]

that's my high score y this so hard @BobTheTomatoPie

[deleted]

so is there gonna be more aliens in the game like making the game [email protected]

BobTheTomatoPie

lol someone got 45 which is insane @ilovebeef

BobTheTomatoPie

i dont think so lol, this is like my first game with canvas so im def not ready to make it multiplayer. The plans are more types of ppl will spawn such as ones that run from you and police that run towards you. @ilovebeef

elijahnik1

@BobTheTomatoPie Bob, you always seem to surprise me with these new Ideas of yours!

BobTheTomatoPie

thanks! @elijahnik1

CatR3kd
TravisRaney
EpicGamer0118

Awesome Game

BobTheTomatoPie
iocoder

cool

BobTheTomatoPie

thanks! @ridark

Alikeyghobadi

it is good

BobTheTomatoPie
gwynethwingell

nice

BobTheTomatoPie
JonahElias

Among Us?

BobTheTomatoPie

yoo, thats where i got the inspiration! @JonahElias

JonahElias

@BobTheTomatoPie The music makes it way better

BobTheTomatoPie

yea that was my favorite part of making it finding all the songs @JonahElias

MaxLipkin

i literally cant move

BobTheTomatoPie

yikes, might be ur internet, or repl might be down, dont use the arrows use a w s d and if it still doesnt work try to remove cap locks, it works for everyone else @MaxLipkin

JBloves27

Cool!

BobTheTomatoPie

thx! @JBYT27

JBloves27