Share your repls and programming experiences

← Back to all posts
Gold and Zombies
h
numcomx (105)

A simple dodger game where you must dodge zombies and collect gold
https://gold-and-zombies--numcomx.repl.co/
I recommend open it on new tab :)

Commentshotnewtop
numcomx (105)

BTW, may it take a little time to load the game and start playing :)
looks like i forgot to include the url for the code :P, here it is:
https://repl.it/@numcomx/Gold-and-Zombies

numcomx (105)

Update: included a loading animation :)

amasad (2496)

Even works on mobile!!

numcomx (105)

@user23802991: thanks for the feedback :)
this game was one of the first i made, so while it works on mobile, it need to resize or adapt to any screen size :P

hayaodeh (184)

any instructions how to play?

numcomx (105)

@user7282973: just click on the screen and move your mouse/cursor to avoid zombies or collect gold :)

hayaodeh (184)

@numcomx: yeh I think I figured it out, thanks :)

numcomx (105)

Game Updated:
++ The game now has a menu
++ You can select if want turn on or off the music before playing
++ When game over now you can select if replay or return to main menu
++ Placeholders for Leaderboard Feature included, will code the leaderboard flow in the next days

amasad (2496)

@numcomx we built a scoreboard API that's much easier to use. We'll be adding more features to it in the future. Check it out https://repl.it/ibuiltthis/games/p/attention-scoreboard-api

numcomx (105)

@user23802991: thanks, i will check it out :)
i made the scoreboard with google firebase realtime database :)

haya (5)

@numcomx @mason-clayton- is building a Repl.it leaderboard API, do you want to try it? I can get you in to the beta

numcomx (105)

@haya: that's great it integrate the Repl.it accounts, that will make more easy to save the scores :)

numcomx (105)

Game Updated:
Leaderboard included is now functional :)
You can submit your highscores :)

haya (5)

@numcomx: I'll see how much I'll score 😁I think after I score certain limit I should be able to start shooting these zombies, before they kill me

haya (5)

I scored 885. Can people have their score automatically inserted on the board once they are done? they can ignore it or add it to the board?

numcomx (105)

@haya: i can insert it to the board on game over, but i need a way to retrieve your name so you can submit your name and score so we will know who done the highscore

hayaodeh (184)

@numcomx: what if I enter my username before starting the game, this way you'll have my username automatically added to your system. would that help?
Maybe later on we can add like a log in, so I can have my game score history?

numcomx (105)

@user7282973: that's a good option, will check the leaderboard @haya mentioned before, i think that will be much better approach where i can get your Repl.it username and use it automatically :) or i think that will be the aproche with the API @haya mentioned :P

lifeyears332 (1)

This is amazing mate.

dosmaster4life (333)

Their is a small bug if you move the character to the very top Left corner he can't die their.

numcomx (105)

@dosmaster4life: looks like the zombies are not respawing there,i will check that :P

hlane16 (0)

such an inventive idea and a wonderful coding job (*claps*)

numcomx (105)

@hlane16: Thanks for the feeback :)

hayaodeh (184)

@numcomx I'm very curious how much everyone have you scored. Can we have a way to see what's the highest score!

numcomx (105)

@user7282973: that feature is no implemented, may in the next days will implement a leaderboard :)

hayaodeh (184)

@heerokdas: hahaha nice! my average score is around 540 and when I get into it I score around the 880, I never scored this much of points

numcomx (105)

@brandonwooledge: hahaha, i will implement the leaderboard today so i can see the scores :)

haya (5)

@numcomx: yes please ! can we mute the sound too?

numcomx (105)

@haya: yes, i will try :)

hayaodeh (184)

@numcomx: cause sometimes I want to play and listen to my music in the same time.

haya (5)

@numcomx: nice! wow that was very fast! Thanks!

hayaodeh (184)

@brandonwooledge: XD you're crushing it in all the games here? would you like to compete with multi players ? Do you like the games here in Repl.it?

numcomx (105)

Looks like i can get the username if i run the game inside html viewer on editor cause i can get the localStorage and retrieve the username, but this feature is not working on the repl.co cause there is no localStorage data saved :)

dosmaster4life (333)

It lets you change your score modifier in the source code so my score was infinity, you might want to do a server sided score board.

numcomx (105)

@dosmaster4life: there is some validations i want to implement, even if you put score very strange it also submits the playtime, so if you put 9999999999 as score and it sends with 10 seconds of playtime, i will know you cheated :p

I need to research how to secure the leaderboard :P

haya (5)

@dosmaster4life: This is what @amjad-masad built and shared, server sided score board, for games that would like to have a score board.
https://repl.it/ibuiltthis/games/p/attention-scoreboard-api

dosmaster4life (333)

@numcomx: I hope you find a method to check that but another issue is someone can change the time also through the source code/console to make themselves win with a reasonable Time for their score.

AnhPhuc (0)

Can we attack them?

numcomx (105)

@anhphuc: nope, im planning to design a way to move and attack for mobile browsers :)

michaelpigle (0)

You Left Your Firebase Key In The Script

numcomx (105)

@michaelpigle: it's a public key for a test project :)

michaelpigle (0)

@numcomx: I know but you can change all the values

SashankNanneboy (0)

lmao if u go on the very edge of the page the zombies cant get u XD