Skip to content

Commit

Permalink
docs: add find_package and web support sections
Browse files Browse the repository at this point in the history
  • Loading branch information
RiscadoA committed Dec 17, 2024
1 parent ec4f462 commit 571c1af
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 6 deletions.
33 changes: 28 additions & 5 deletions content/0-5.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
###########

:date: 2024-12-02 00:00:00
:status: hidden
:category: Release
:summary: Cubos 0.5 Release!

Expand Down Expand Up @@ -114,14 +113,38 @@ taken from the UI sample available in the engine showcasing the text rendering i

**Note:** Currently only the ASCII charset is supported, UTF-8 support will be worked on in a future release.


On the Core
-----------

Core Feature 1 :dim:`(@Author3)`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A Proper CMake Configuration :dim:`(@RiscadoA)`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

TODO: explain feature and why it is useful
Previously, our `CMake <https://cmake.org/>`_ build configuration, while functional, was really incomplete in terms of features and was also extremely messy.
With the engine becoming more and more fleshed out, we started wanting to be able to install the engine as a library system-wide, so that we could use it in other projects
Before, we always simply added the engine repository as a ``git`` submodule in our projects, but this meant having one copy locally of the whole codebase for each project, which was not ideal.
So, we decided to clean up the CMake configuration, and add installation and ``find_package`` support. In pratice, this means that you can now install the whole Cubos project, and to use it in another project, you just need to add the following lines to your ``CMakeLists.txt``:

.. code-block:: cmake
find_package(cubos REQUIRED)
target_link_libraries(your_game PRIVATE cubos::engine)
One big advantage of this is that we can now also install Quadrados and Tesseratos, the tools we use for making games with Cubos, system-wide, as you would with any other application.
As of now, Cubos has only been packaged for NixOS, but we haven't contributed it to the Nixpkgs repository yet. We plan to do so in the future, and also to package it for other distributions.

Web Support with Emscripten :dim:`(@RiscadoA, @luishfonseca)`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

We've had a PR open since 0.2 for porting Cubos to the web with `Emscripten <https://emscripten.org/>`_, but it was constantly postponed due to some issues still being present, and the fact that we were focusing on other features.
Now, we finally made the final push to get it working, and now Cubos can be compiled to WebAssembly and run in the browser!

We think this is an important feature, as for game jams, for example, it's very useful to be able to share your game with others without them having to download anything, and also to be able to play it on any device.
We also think it's a good way to showcase the engine to people who might be interested in using it, but don't want to download it.
We plan on embedding each sample on their respective documentation page, but that will be left for a future release.

One of the major challenges was guaranteeing compatibility with WebGL2. Fortunately, the whole rendering code is built on top of a rendering API abstraction layer.
We had to make some changes to this layer to guarantee we cover strictly the intersection between the features of OpenGL 3.3 and WebGL2, but we managed to do it without much hassle.
As of now, this means we're making some performance sacrifices, as we're not using advanced features even when they're available. We plan to address this in the future.

Next Steps
==========
Expand Down
2 changes: 1 addition & 1 deletion content/example-release-post.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
###########

:date: 2024-12-02 00:00:00
:status: skip
:status: hidden
:category: Release
:summary: Cubos 0.X Release!

Expand Down

0 comments on commit 571c1af

Please sign in to comment.