DEV Community

Cover image for I made a Game with vanilla HTML CSS and JavaScript
Ayushman Bilas Thakur
Ayushman Bilas Thakur

Posted on

I made a Game with vanilla HTML CSS and JavaScript

Recently I have not been writing posts. The reason is I had been developing a simple game using vanilla HTML, CSS and JavaScript (no framework used). The game is available as a PWA at https://oddneven.netlify.app/

If you want to check out the frontend code go to https://github.com/AyushmanBilasThakur/Odd_N_Even

I will write posts about my experience developing this game if I get positive responses. Also, there is a small backend managing the leaderboard. I will be unveiling that code after editing some things out.

Comment your high scores and what do you want to learn about the project.

Discussion (18)

Collapse
salyadav profile image
Saloni Yadav

Hey, can you throw some light on how did you make the global leaderboard? I have been developing a game and thought I need mongoDB and node for keeping a track of username and their scores. But I dont see any such thing your codebase. Can you give a brief of how you added this? Thanks :)

Collapse
ayushmanbthakur profile image
Ayushman Bilas Thakur Author

For the global leaderboard I have actually used nodejs + mongodb(and called the api from my frontend when necessary), but due to security reasons I don't have that code public in my GitHub. However, for the local highscore, I've used localstorage.

Collapse
salyadav profile image
Saloni Yadav

Security reasons, that makes sense :) I wanted to know if I was headed in the right direction. Thanks :)

Collapse
weiqingteh profile image
Weiqing Teh CG BOSS • Edited on

Hi This is nice. Been wanting to make games with a Web Dev Tools. Thanks for sharing and inspiring.

Collapse
seanmclem profile image
Seanmclem

Did you need to do collision detection?

Collapse
ayushmanbthakur profile image
Ayushman Bilas Thakur Author

Actually no... I thought that the collision detection and physics based things are best left for game engines.

Collapse
seanmclem profile image
Seanmclem

Of course, I just wasn't sure if you had to implement your own

Collapse
zsgomoridev profile image
Zsolt Gomori

Am I the only one who's been playing with the game for more than 30 minutes? Awesome, good job!

Collapse
ayushmanbthakur profile image
Ayushman Bilas Thakur Author

Sure. I have previously not worked in 3D in web, but I would be interested to work with a library.

Collapse
zamanphp profile image
zamanphp

my high scores was 8!

Collapse
giorgosk profile image
Giorgos Kontopoulos πŸ‘€

This is a great game man. I have got 47 after 10 minutes of playing. Very addictive... Keep it up!

Collapse
olalani profile image
Olalani Oluwaseun

Nice game concept πŸ‘ but my high scores was 6-10 range πŸ™ˆ.... Don't laugh pls. Love it

Collapse
iykex profile image
iyke ‒ツ 🀴

My high score was 32, yeeaaah cool game.
Thumbs up πŸ‘

Collapse
ayushmanbthakur profile image
Ayushman Bilas Thakur Author
Collapse
ayushmanbthakur profile image
Ayushman Bilas Thakur Author

I have a 2 months old post on PWA which is archived for being not upto my satisfaction mark. I'm currently working on that and will publish that post as soon as possible.