• Home
  • About 404TS
  • Contact

404 Tech Support

Where IT Help is Found

  • Articles
    • Code
    • Entertainment
    • Going Green
    • Hardware, Gadgets, and Products
    • Management
    • Network
    • News
    • Operating Systems
    • Security and Privacy
    • Software
    • System Administration
    • Talking Points
    • Tech Solutions
    • Web
    • Webmaster
  • Reviews
  • Media
    • Infographics
    • Videos
  • Tech Events
  • Tools
    • How do I find my IP address?
    • Browser and plugin tests
  • Get a Technical Consultation
You are here: Home / Articles / Code / Play CodeCombat to learn object-oriented programming

Play CodeCombat to learn object-oriented programming

2014-02-18 by Jason

CodeCombat is a non-traditional game where you control a character in a fantasy battle against ogres and the like. The trick to the game is that you control the character by writing JavaScript. You can make them move, say things, attack enemies, and other functions all with the corresponding lines of code like:

this.moveXY(34, 65);

That would move the character selected to the X,Y coordinates of 34,65.

Don’t know how to code? No worries, the beginner rounds walk you through everything you need to know. The functions you can use are all available in the lower-right corner and you can hover over them with your mouse to learn more about them.

Immediately beneath where you enter your code, there is a Spell Cast button. I recommend clicking the gear and changing the setting to manual. That defines how often your code is “compiled” and the character acts it out. If you have several lines of code to write, it seems silly (and bug-causing) to have the character act each one out. I prefer being able to type all the lines and then click the Spell Cast button to have the character obey. Then, if you made a mistake, you can use the timeline underneath the combat screen to go back in time, correct your code, and then have them act out again.

codecombat

You can play CodeCombat at www.codecombat.com. You can select which level you would like to play or just go through all the levels by clicking the Play button.

This video provides a quick example of playing through a level where I move the character closer to taunt the enemy and then retreat to lure them into a trap. Other levels are different and introduce the use of strings, understanding comments, or other functions.

CodeCombat is open-source. It currently includes a beginner campaign, some more challenging levels, and a few player-contributed levels. Try it out at www.codecombat.com

Filed Under: Code, Entertainment

Trending

  • Dell, Verizon, and Symantec 2015 Security Reports
    In Security and Privacy
  • phpBB: “Table is marked as crashed and should be repaired”
    In Tech Solutions, Webmaster
  • Updating The DigiNotar Breach Away – Adobe, Apple, Microsoft, Mozilla, Google React
    In Security and Privacy

Latest Media Posts

Find Out Where To Download SNES ROMs

Find Out Where To Download SNES ROMs

Multifunctional Video Conversion Tools – Wondershare Video Converter

Multifunctional Video Conversion Tools – Wondershare Video Converter

  • Popular
  • Latest
  • Today Week Month All
  • Access to the resource [servershare] has been disallowed Access to the resource [servershare] has been disallowed
  • Read the Event Logs on Windows Server Core Read the Event Logs on Windows Server Core
  • Increase IIS Private Memory Limit to improve WSUS availability Increase IIS Private Memory Limit to improve WSUS availability
  • How to ‘Unblock’ multiple files at a time with PowerShell How to 'Unblock' multiple files at a time with PowerShell
  • Setup your DFS namespace with DNS for compatibility in a mixed environment Setup your DFS namespace with DNS for compatibility in a mixed environment
  • How Virtual Reality Supports Mental Health Therapy How Virtual Reality Supports Mental Health Therapy
  • Key Strategies of Successful Coin Listing on Exchange Key Strategies of Successful Coin Listing on Exchange
  • Keeping Your Mac Healthy: A Comprehensive Guide to Maintenance and Troubleshooting Keeping Your Mac Healthy: A Comprehensive Guide to Maintenance and Troubleshooting
  • Making Distributed Software Development Work: Strategies and Best Practices for Managing Remote Teams Making Distributed Software Development Work: Strategies and Best Practices for Managing Remote Teams
  • customer contactless payment for drink with mobile phon at cafe counter bar,seller coffee shop accept payment by mobile.new normal lifestyle concept The Latest Innovations In Payment Technology
Ajax spinner

Elevator Pitch

404 Tech Support documents solutions to IT problems, shares worthwhile software and websites, and reviews hardware, consumer electronics, and technology-related books.

Subscribe to 404TS articles by email.

Recent Posts

  • How Virtual Reality Supports Mental Health Therapy
  • Key Strategies of Successful Coin Listing on Exchange
  • Keeping Your Mac Healthy: A Comprehensive Guide to Maintenance and Troubleshooting

Search

FTC Disclaimer

404TechSupport is an Amazon.com affiliate; when you click on an Amazon link from 404TS, the site gets a cut of the proceeds from whatever you buy. This site also uses Skimlinks for smart monetization of other affiliate links.
Use of this site requires displaying and viewing ads as they are presented.

Copyright © 2025 · Magazine Pro Theme on Genesis Framework · WordPress · Log in