Ease Comes After
This is 7 lines of code! Maybe you could inline the let radius and make it 6 lines. So 6-7 lines! 6-7! That’s at least 6-7 things a beginner must learn. They just want to do 1 thing, why do they need to learn 6-7 things? Can we reduce this number? Can we remove some of these lines and make it easier for beginners to get started?
Let’s take the line use body=this. Is it really necessary?
If you are not familiar, use body=this says that this Hero has their own body. Sometimes an entity does not have its own body. For example, if our Hero picks up a Shield, the Shield entity would be attached to the Hero’s body, and so it would say use body=hero instead of use body=this because the Shield has no body of its own.
When you’re making a basic game, an entity almost always has their own body. This can make use body=this seem like nothing but an unnecessary stumbling block for beginners. Why do I have to type this? What is this for? What is use? What is a body? What is this? Why? Why? Whyyyyyyyy?
We are literally making the programming language, we have infinite power to make it do whatever we want, so why not remove one extra stumbling block for beginners? We could make the language assume use body=this until told otherwise, for example. Advanced programmers would have to undo it when they wanted to do something more advanced, but just like they tell autocorrect “no, thanks for the help but this time I didn’t want to type ‘duck'”, they could learn to do that, right?
We don’t do this because, once you start making sophisticated games, it is very common for one Easel body to be made of many entities. Unlike other game engines, in Easel an entity is not an object, it is a lifespan. Every little transient thing a hero does might be a short-lived entity: jumping, charging up their fireball, patting their dog etc. Making use body=this implicit makes life easier for beginners, but harder for advanced programmers. It lowers the ceiling of what Easel is capable of, and we don’t want to do that.
Another way to look at it is, to make use body=this implicit, we would need to add an exception to the rule where body does not work like everything else. This makes Easel less consistent and less simple. If we have to choose between simple and easy, we choose simple.
Teaching idiomatic Easel
If we cannot move the mountain Easel closer to the people, our only choice is to help bring people closer to Easel. To this end, we have created a completely new set of tutorials that have a much greater focus on teaching idiomatic Easel.
Idiomatic means that you are not just learning about how Easel works, you’re also learning how you should work. Particularly, you are learning the patterns that ye olde Easel programmers of yore discovered in the land before time, so you can avoid retreading the same mistakes they made and get straight to the good harvest.
For example, every beginner simply has to learn the 6-7 lines for a standard entity by rote. Like learning the times tables or “mitochondria is the powerhouse of the cell”. Later on, when the young Padawan becomes the Master, they will know when the rules can be bent or broken. You have the high ground? Who invented that rule anyway? The Jedi Council? Pfft. I know better.
There are now three new tutorials that teach idiomatic Easel, replacing the previous two.
A new Quickstart
The new Quickstart tutorial can be completed in around 15 minutes, whereas the previous tutorial was 1-2 hours. Some people come to Easel with an idea already in mind for a game they want to make, and they don’t want a gentle meander through the forests of the language, they want a crash course uploaded directly into their neural cavities. When you are in a hurry, sometimes the mere length of the initial tutorial makes Easel seem more difficult than it really is.
While the new quickstart tutorial is short, learners still see maybe 70% of the most important features of Easel in those 15 minutes, even if they might not absorb all of it at the time.
In-depth tutorials
After the quickstart, there is a new pair of tutorials designed to be completed in succession.
-
The Astroblast tutorial takes 1-2 hours and makes a complete multiplayer game. Unlike before, it doesn’t just show you the steps to make the game, it includes lessons on common tasks (like handling events), gives names to common patterns (like systems), and refers directly to Easel’s fundamental programming paradigms (like reactive programming) by name. It actively tries to teach you idiomatic Easel.
-
The Mechanics tutorial takes 4-6 hours and makes Astroblast a lot more sophisticated, but only by adding very common game mechanics that you might use yourself, like rounds, abilities, upgrades, powerups and leaderboards. Previously, without being shown that Easel was capable of these things, beginners might not have even realized they were even possible. This greatly lifts the ceiling of what beginners can achieve with Easel.
Additionally, the Astroblast tutorial now uses the high-quality free assets from Kenney, demonstrating that you can make a professional-looking game with Easel from the very beginning. We highly recommend more people check out Kenney’s assets – it is an excellent resource for all game developers!
Thinking in Easel
For programmers who are already familiar with Easel, we have created a new section of the documentation called Thinking in Easel. This is designed to be a collection of the idiomatic patterns used to solve common problems that Easel programmers face. The tutorials also continuously link back to this new section for those precocious beginners with an appetite to know more.
Compiling this section required naming the idioms. For example, systems is the name we are giving to the pattern where functions add ongoing behavior to an entity. It didn’t have a name before, which made it difficult to teach.
Try it!
If you are not too busy scrolling FaceTwitter right now, consider giving the new tutorials a test drive, starting with the Quickstart!
Fuente: Artículo original