Skip to content

Instantly share code, notes, and snippets.

@saikyun
Last active September 13, 2021 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saikyun/b40b4f131a05e00c005be6e8cece650e to your computer and use it in GitHub Desktop.
Save saikyun/b40b4f131a05e00c005be6e8cece650e to your computer and use it in GitHub Desktop.

FAQ for Freja

Why 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

What fun stuff to do?

  • 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

How to learn?

  • Stream every tuesday and thursday
  • Discourse forum
  • Youtube clips
  • Blog tutorials

Why Janet?

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.

Why Raylib?

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.

Why use Freja instead of Unity?

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

Why use Freja instead of Visual Studio Code?

  • 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
  • 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment