DISCOVER
×

How to Make Games With JavaScript

Designing your own video game doesn't have to be complicated. A fun way to make your own video games is to use the simple scripting language called JavaScript. With a text editor such as Notepad and some basic knowledge of creating scripts you can start making your own simple JavaScript video games. There are many websites that can teach you how to use JavaScript and that also show you the raw code used to make video games.

Learn how to write some JavaScript scripts. Websites such as TrainingTools.com,

W3Schools.com and WebDevelopersNotes.com offer tutorials teaching you how to create JavaScript scripts. Also, The JavaScript Source and JavaScript Kit offer completed JavaScript game code.

Develop your video game concept. Write down exactly what the object of your game is, how to achieve the goal and how to keep track of any scores. Keep it simple to start with. Match each idea to what you have learnt about JavaScript, be sure you have the skills to program it and that JavaScript has the ability to do what you want.

Open your text editor, start a new text document and begin writing your JavaScript code.

After you have completed the script, open it in your web browser and test your game. If there are any mistakes or program errors go back to the text editor and fix the bugs.

Test your video game on different web browsers. Sometimes there are small differences, so you may have to tinker with the script to get your game to display properly.

Show the game to a friend or a test audience. Bugs you did not find may pop up when someone else plays your video game.

Give your video game a catchy name -- brainstorm a name by writing down any names that might describe your game or other ideas that pop into your head. Then try combining them or mixing them together until you find one that jumps out at you.

Tip

Start with a simple game idea as you learn to create scripts and then work up to more complex games. You can find more advanced script editors with features that can speed up your script creation. Try adding more features to the first version of your game by allowing the player to change some options.

Things You'll Need

  • Text editor software
Cite this Article A tool to create a citation to reference this article Cite this Article

About the Author

Toronto-based Mark Stanisz started his writing career in 1996 as a local reporter for "The York Guardian." Stanisz worked from 1998-2010 as an online producer at The Canadian Press. He holds a Bachelor of Arts in political science from the University of Toronto and a Print Journalism Diploma from Toronto's Centennial College.