> LeekScript Tutorial
Welcome to Leek Wars! If you're here, you're probably a programming beginner who wants to learn while having fun. Or maybe you already have some programming experience and you're curious about a game built around it.
Either way, this tutorial will teach you everything you need to know about LeekScript to make your leek fight effectively.
Programming means creating a computer program. A program is written in a "programming language". This language lets you describe to the computer that reads the program what it has to do. People who program are called programmers or developers. And whatever you do, don't say "programmating" or "programmists": you wouldn't last long around here.
An example of a program in LeekScript looks like this:
setWeapon(WEAPON_PISTOL); var enemy = getNearestEnemy(); moveToward(enemy); useWeapon(enemy);
On Leek Wars, we tend to talk about AIs rather than programs. That's because we create an artificial intelligence for our leeks. These aren't programs meant to run on a computer, but rather a script that our leek reads and follows to the letter.
Here, you'll learn the basics of programming using LeekScript. You'll learn how to use variables, arrays, conditions, loops and functions. Other pages of the tutorial then cover more advanced concepts, such as recursion, manipulating types or optimization.
This tutorial isn't meant to explain how a computer works. Some explanations will accompany the various programming concepts you'll discover, but if you really want to understand how a computer program and a computer work, you'll need to turn to courses on more "low-level" languages, that is, languages closer to how the machine actually works.
How hard it is to learn programming depends on the person. Depending on your age, your knowledge and your abilities, you'll find it more or less difficult to grasp the logic of programming. All you need to learn programming is logic.
You may have been told that you need to be good at math to program. The answer is yes and no. Yes, you'll need some math. To learn the basics, knowing how to do basic operations is enough. Can you add, subtract, multiply and divide? Then you'll be fine. However, Leek Wars fights take place on a 2D map. If you want to use the terrain to your advantage, you'll need a few notions of geometry and 2D spatial reasoning. But again, nothing extraordinary: you just need to know how to use coordinates in a coordinate system.
Programming sometimes calls for patience and a cool head. Unfortunately, your code won't always work the first time (or ever, actually). You can be sure that at some point you won't understand why your program doesn't work, even though the mistake is a really simple one. Learning to reread your code and track down bugs comes with experience. Don't underestimate outside help: a fresh pair of eyes on your code will often save you a lot of headaches.
In short, if you want to learn programming and become a talented leek farmer, you only need one thing. If you want to learn, you'll make quick progress. Ask questions on the game chat, or on the forum when you don't understand something: you'll always find a kind soul ready to explain (even, and especially, between midnight and 4 a.m.).
Remember that there are no dumb questions. Asking a question proves that you want to understand, and there's nothing stupid about that.
Impossible de charger les données du jeu.
Vérifiez votre connexion et réessayez.