loading...
Cover image for Improve your Coding Skills with this Fun Game
Pluralsight

Improve your Coding Skills with this Fun Game

jeremycmorgan profile image Jeremy Morgan Updated on ・2 min read

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!

Posted on by:

jeremycmorgan profile

Jeremy Morgan

@jeremycmorgan

Silicon Forest Developer/hacker. I write about .NET, DevOps, and Linux mostly. Once held the world record for being the youngest person alive.

Pluralsight

With our technology skills platform, companies can upskill teams and increase engineering impact.

Discussion

markdown guide
 

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.

 

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

 

Great post mate. Thanks for sharing +1

 

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 :)

 

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.

 

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

 

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?

 

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.

 

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