# In progress: web target, IFC, mORMot sample

**URL:** <https://forum.castle-engine.io/t/in-progress-web-target-ifc-mormot-sample/1445>\
**Category:** News\
**Created:** [November 30, 2024, 5:17pm UTC](https://forum.castle-engine.io/t/in-progress-web-target-ifc-mormot-sample/1445 "2024-11-30T17:17:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [November 30, 2024, 5:17pm UTC](https://forum.castle-engine.io/t/in-progress-web-target-ifc-mormot-sample/1445/1 "2024-11-30T17:17:26Z")

</div>

| [![Web target - initial logs](https://forum.castle-engine.io/uploads/default/original/2X/8/84642a3f493506bb16d4ee3654162737bf41324d.png)](https://castle-engine.io/wp/wp-content/uploads/2024/11/web_platformer.png "Web target - initial logs") |
| [![IFC example](https://forum.castle-engine.io/uploads/default/original/2X/5/5d9c23ea75cbde4ce2179a4cb1fc58d4820da600.png)](https://castle-engine.io/wp/wp-content/uploads/2024/11/example_ifc.png "IFC example") |
| [![mORMot and Castle Game Engine](https://forum.castle-engine.io/uploads/default/original/2X/7/77a98829ec1d91401bac164d76a5be88e5dde1af.png)](https://castle-engine.io/wp/wp-content/uploads/2024/11/mormot_screenshot1.png "mORMot and Castle Game Engine") |
| [![mORMot and Castle Game Engine](https://forum.castle-engine.io/uploads/default/original/2X/5/5f64b0e96990fb4fb71c5239e616adafde807247.png)](https://castle-engine.io/wp/wp-content/uploads/2024/11/mormot_screenshot2.png "mORMot and Castle Game Engine") |

This post contains a relatively unimpressive screenshot that actually shows a very important achievement 🙂

Things we are working on right now in [Castle Game Engine](https://castle-engine.io/):

1. [Web target](https://castle-engine.io/web).

Yes, it means what you think 🙂 Just recompile any Castle Game Engine project to run in a modern WWW browser! No plugins of course, it’s using JS + WebAssembly, it just works.

What we have: We have a CGE branch with _build tool_ that can execute `castle-engine compile --target=web` and then `castle-engine run --target=web` to:

  - build a wrapper using [Pas2js](https://getpas2js.freepascal.org/),

  - then build your game using [FPC for WebAssembly](https://wiki.freepascal.org/WebAssembly),

  - generate skeleton HTML file with `<canvas>` element,

  - run a HTTP server (just `compileserver` from pas2js, on port 3000),

  - run a WWW browser to open `http://localhost:3000/` and execute Pas2js-generated JavaScript that in turn runs the WebAssembly code.

  - The WebAssembly code initializes log (you will see typical CGE log messages in both the browser console and in HTML content), and then opens `TCastleWindow` with a special WebAssembly backend…

  - …and, nothing more yet 🙂 TODO: We fail at the moment we want to use `glGetString`. Next steps are known, we need to use WebGL from WebAssembly, and the way to do this seems to use `TJSWebGL2RenderingContext` from `job_web`. Stay tuned!

More information (what we have, what we plan) on the [dedicated web target docs](https://castle-engine.io/web).

2. [IFC (Industry Foundation Classes) format support](https://castle-engine.io/ifc).

3. [Collaborative editing of 3D world using Castle Game Engine and mORMot2](https://github.com/castle-engine/castle-and-mormot-collaborative-editing/).

Have fun with _Castle Game Engine_! And if you like what we do — [please support us](https://castle-engine.io/donate)!

---

<div class="post-metadata">

**Author:** ![michalis](https://forum.castle-engine.io/user_avatar/forum.castle-engine.io/michalis/32/3_2.png) [@michalis](https://forum.castle-engine.io/u/michalis)\
**Post date:** [December 28, 2024, 1:37pm UTC](https://forum.castle-engine.io/t/in-progress-web-target-ifc-mormot-sample/1445/2 "2024-12-28T13:37:38Z")

</div>


