FAQ for Freja
Freja is a code, pixel and music editor. It is also a GUI library, which means you can create native graphical applications.
Compared to a browser, you get:
- Easy interop with C
- Easier access to the underlying system, including:
- File system
- Graphics card
- Sockets
- Faster startup & lower memory usage
Compared to C you get:
- Easier to create multiplatform
- Can do live coding, which means you can edit the program while it's running
- Create games while streaming
- Can do it on MBA 2014
- Nice feedback when loading code into editor
- Create GUI tools for any task that is tricky to do in browser
- Prototype quicker than VSCode and Unity, thanks to <200ms feedback whenever code changes
- Stream every tuesday and thursday
- Discourse forum
- Youtube clips
- Blog tutorials
Janet has a great mix of support for live coding and close access to C, which makes it easy to create powerful applications, while still keeping iteration times down to a minimum.
Janet runs on Windows, macOS and Linux.
Raylib is an easy to use, multi platform, 2D and 3D game development toolkit. Specifically it adds a layer on top off GLFW. You get easy to use functions as DrawPixel
and DrawRectangle
while still retaining the ability to write custom shaders. Just like Janet, you get ease of use without sacrificing power.
Raylib is also usable for GUI programming in general. Thanks to great support for render textures it's easy to do partial rerenders when state changes, rather than having to rerender the screen each frame.
Unity is a great product, but I have found certain parts of it painful:
- Not open source
- Unity and C# is not optimal for live coding
- Need to wait for recompile (especially noticeable on low spec computers)
- Tricky to modify scene during game runtime and persist the changes
- Not straight forward to do things like "render a rectangle on screen"
- API is generally optimized for big teams rather than quick experimentation
- Leads to a steep learning curve
- Bigger build sizes
In addition to the above, Freja is also a text editor. With Unity you need to use e.g. Visual Studio Code, which comes with their own set of tradeoffs (See "Why use Freja instead of Visual Studio Code?")
The benefits of Unity over Freja:
- Huge community
- Easier to hire
- Easier to get help
- Easy to build games for essentially any platform
- C# and Unity are proved to work
- Lots of documentation / tutorials
- Easier to customize
- No need for debug mode, just write some code and hit Ctrl+L to run it
- Better integration with its focus language, Janet
- Freja can parse and understand Janet, which leads to:
- jump-to-definition that isn't dependent on top-level definitions. works with functions generated during runtime
- Can run Janet projects inside Freja, which means e.g. printing big values can be done more efficiently
- Freja can parse and understand Janet, which leads to:
- Less memory usage
- Less CPU intensive
The benefits of Visual Studio Code over Freja:
- supports utf8, freja only works with ascii
- Huge community
- Lots of plugins
- Better for all languages except Janet