DEV Community

Cover image for Improve your Coding Skills with this Fun Game
Jeremy Morgan for Pluralsight

Posted on • Updated on

Improve your Coding Skills with this Fun Game

Of all the ways of improving your coding skills, a game is one of my favorites. To skip my commentary you can just play the game here.

Elevator Saga is a fun game that uses JavaScript to control elevators. It starts out simple enough, it starts out with one elevator, and 3 floors. Your goal is to move 15 people in 60 seconds or less. 

Fun JavaScript Game

You do this by editing the JavaScript included on the page, you can do things like: 

  • controlling where elevators go
  • controlling what happens when elevator buttons are pressed
  • make changes based on how many people are on the elevator

And much more. There’s full API documentation here. 

You don’t need a ton of JavaScript experience to play this game, and it’s not extremely technical. But you will need a mind for solving problems and building software. If you don’t have that already this game will help build that. 

What to consider

Theoretically, you could just have elevators going up and down floors fast enough and it would move all the people through. This works in the first couple levels but after that you need optimization.

Here are some things you need to think about:

  • Coordinating elevators - Don’t just make two elevators take the same path, it’s wasteful.
  • Prioritizing busier floors - Some floors are busier than others, which means just going up and down floors sequentially won’t cut it
  • Optimizing your routes - Taking wasteful trips adds up. You need to be intentional about controlling where elevators go. 
  • Capacity of elevators - You have to be mindful about cramming too many people in an elevator. 

These are some things you must think about and write code around. You need to think of the entire system and how to keep people moving quickly. 

How does this make me a better coder? 

While this game doesn’t use complex JavaScript, it will improve skills you’ll use for development. You must think about the strategy and workflow. You’ll optimize your JavaScript code because it gets old scrolling through all the lines to make changes. You may even start experimenting with different algorithms. 

You can improve your skills and have fun doing it. While it may feel like you’re wasting your time with a game, you’re improving your abilities. I encourage you to give it a try even for a few minutes. It’s lots of fun! 

If you want some more games to try, Francesco Leardini has shared a bunch of games to improve your web dev skills here. Check it out!

Top comments (11)

Collapse
 
paco_ita profile image
Francesco Leardini

Nice description for Elevator Saga. I wrote an article about frontend games few days ago. Have a look at it if you are interested in discover some new ones.

A couple of games, listed in the article, allow also to practice with languages like c++, c#, Java usually considered "backend" ones.

Collapse
 
jeremycmorgan profile image
Jeremy Morgan

Nice I haven't seen that one! I'll check it out!

Collapse
 
andresdandrea profile image
andresdandrea

Great post mate. Thanks for sharing +1

Collapse
 
andresdandrea profile image
andresdandrea

Hi Jeremy, thanks for the this post.

I share your taste for games to learn or improve programming skills. Have you seen twilioquest? It's a good one.

Where could I find more games of this type?

Cheers :)

Collapse
 
seraphwedd profile image
Seraph Wedd • Edited

I don't really know if you will like it but theres a website called CodinGame that has many programming games supporting a variety of Programming Languages.

Collapse
 
andresdandrea profile image
andresdandrea

Thanks. I'll have a look at it. Cheers.

Collapse
 
integerman profile image
Matt Eland

I used to work with a guy who asked every potential hire how they would program / design an elevator processing system - just to get a sense for their thought process. It may have come from this. Who knows?

Collapse
 
imakashrana profile image
Akash Chauhan

The importance of gaming in Javascript is vast. It helps with hand-eye coordination, problem solving, and logic skills. Gaming can also relieve stress, improve moods, and promote social interaction.
Here find how you can improve your JavaScript skills with Javascript gaming

Collapse
 
alexkapustin profile image
Oleksandr

Last time when I had played that (few years ago) it was quite buggy. And the last commit was 4 years ago. So I guess nothing has been changed.

Collapse
 
denno020 profile image
Luke Denton

This is the best game! I have been searching all over for games similar but haven't quite found something as simple, yet challenging as Elevator Saga yet

Collapse
 
othmanekahtal profile image
Othmane kahtal

waaaw fun😎😎