What is Crayon like?
It's actually quite a bit like what Python would look like if:
- PyGame was the only library available.
- Python was a curly brace language but maintained roughly the same behaviors.
- It ran in a browser.
How does Crayon work? Like...is it translated? Compiled?
Your code is compiled into a byte code. The VM, which is actually written in Crayon itself, is translated into various languages and platforms and interprets your byte code on that platform. This ensures that your code will behave identically on all platforms.
What does Crayon code look like?
Why have you done this?
Asking a user to download your game as a zip file which includes either natively executable code or some other format that requires more downloads isn't as universally acceptable as it was many years ago. Most operating systems, browsers, or virus scanners, will rightfully think they're under attack when native code is downloaded and executed. Most app and game distribution occurs in some sort of app marketplace or via the web. Flash was the answer for web games from the late 90's for about 10 years, until HTML5 and Canvas became a viable platform for games and Flash continued to be plagued by security vulnerabilities.
Additionally being able to write games now that could be instantly ported to mobile in the future when the addition of mobile platforms is completed was also important.
But aren't native apps still useful for certain cases?
Yes. And you can still create native apps in Crayon using the C# export. The driving philosophy of Crayon is to not block people into one particular platform.
Crayon is still relatively new. Mobile support is highly desired and currently in the works. Android, iOS, and even Windows Phone are very important markets. Here's the reasoning and history of each of the 4 currently supported platforms:
- When Crayon was in its initial development, it was a just an experimental fun side project. Python and PyGame was quick and easy and I didn't have long term plans. As more platforms were added, there wasn't a reason to remove it, so it's still here.
- Native apps are still important, so C# was chosen next. There are many C#-only platforms such as XBox that a C# implementation would be a good stepping stone to.
- Java AWT-based projects, even though it isn't very useful for game distribution nor does it have good performance, was added next for two reasons:
- Java and C# are nearly identical languages, so adding Java support was basically "free".
- As stated earlier, Android is very important. The Java implementation served as a stepping stone for a Android Java OpenGL ES apps.
Are there any text editors that support syntax highlighting for Crayon?
I have written a Notepad++ syntax highlighter definition
I found a bug. How do I get you to fix it?
Report it in the issue tracker on GitHub
. If you don't have a GitHub account, send an email to the mailing list
and then ask yourself the troubling question of why you don't have a GitHub account by now.
I'm a PyGame user. Should I use Crayon instead?
For most use-cases, yes. The number of features supported by PyGame that are not supported by Crayon is shrinking considerably with each release. If you already know Python and some other curly brace language, the learning curve is virtually non-existent. PyGame was the main inspiration behind most of the built-in Crayon library.
I'm an HTML5/Canvas/JS user. Should I use Crayon instead?
. Because Crayon is a VM+ByteCode, there's no need to worry about cross-browser compatibility.
I'm a Unity user. Should I use Crayon instead?
Depends, but probably not, as the target use-cases are generally different. Crayon is currently 2D only and, while it supports many platforms, it doesn't target all of them, yet (although hopefully this will change). But if you're a Unity 2D user and are trying to make a game that you want people to be able to play in a browser and are tired of people downloading a plugin, then perhaps. Some of the benefits of Crayon over Unity are:
- Always free. Even if you sell billions of copies of your game.
- Very little magic infrastructure that you have to learn the quirks of. The Crayon API is very direct and deals mostly with graphical primitives. Whether this is an advantage or a disadvantage, depends on your programming style.
- Runs in the browser without a plugin.
- Output is typically smaller.
- Creating prototype games generally goes faster in loosely/duck typed languages, making it an ideal language for Game Jams.
I've written a cool game in Crayon. How do I add it to the demos page?
Feel free to reach out on the mailing list. Or tweet it to me. Or use the IRC channel. Several communication channels are listed on the community page
Who are you?
My name is Blake
. I like to make games.