DEV Community

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

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.

Top comments (15)

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
 
abthakur profile image
Ayushman

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
 
seanmclem profile image
Seanmclem

Did you need to do collision detection?

Collapse
 
abthakur profile image
Ayushman

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
 
abthakur profile image
Ayushman

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

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
 
weiqingteh profile image
Weiqing Teh // CG BOSS • Edited

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

Collapse
 
zamanphp profile image
zamanphp

my high scores was 8!

Collapse
 
iykex profile image
Nana Quame Vybes

My high score was 32, yeeaaah cool game.
Thumbs 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
 
abthakur profile image
Ayushman
Collapse
 
abthakur profile image
Ayushman

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.