Water, Imported Assets and Web Export

Water

Add water from the Place panel (the Water section) or from the Add menu. There are three kinds:

Kind Shape Good for
Lake A closed spline: the points outline the shore ponds, lakes, pools
River An open spline: the water flows from point 1 to the last point streams, rivers, waterfalls-lite
Ocean A big square with rolling Gerstner waves seas and coasts

Editing the spline

  1. Select the water. Blue numbered points appear in the viewport.
  2. Click a point to select it, then drag the gizmo arrows to move it.
  3. Ctrl+click the ground to add a point. It goes after the selected point, or at the end if none is selected.
  4. Delete removes the selected point. Esc deselects it.
  5. Details → Water → Spline points lists every point with exact numbers.

Shape details:

  • Rivers: Snap to ground puts every point just above the terrain so the river follows the hills. The water flows faster where the river goes downhill.
  • Lakes: a lake is flat. Move the whole lake up or down to change the water level. Lake to ground sets the level just below the lowest shore point.

Water carves the terrain

Lakes dig a bed and rivers dig a channel into Terrain, so water never ends up buried under hills. Grass is removed under water automatically.

Look and motion (Details → Water)

  • Presets: Calm, Stream, Ocean, Tropical.
  • Colours: Shallow near the shore, Deep further out. Opacity sets how see-through it is.
  • Waves: Wave height, Wave length and Wave speed move the surface. Use them for oceans; 0 = flat.
  • Ripples: small detail on the surface. Ripple size sets their scale.
  • Flow speed (rivers).
  • Wind direction: which way waves and ripples travel.
  • Foam: along shores, river banks, fast water and wave crests. Shore width sets how far it reaches.

Gameplay

  • The player swims in water: slower, floats with their head above the surface, and Space splashes up.
  • Scripts can check Fyn.IsPlayerInWater().

Importing models and textures

Drag files from Windows Explorer onto the editor window. That's it.

File type What happens
.fbx .obj The model is converted to Assets/Models/<name>.fynmesh and placed in the viewport where you dropped it. Textures used by the model are found and copied too: embedded ones are extracted, and files next to the model or in a textures folder are copied.
.png .jpg .tga .bmp Copied to Assets/Textures/. Drop it onto an object to apply it straight away.

You can also use File → Import Model / Texture... or the Import... button in Content → Assets.

Content → Assets lists everything:

  • Models: drag into the viewport or double-click to place.
  • Textures: hover to preview, drag onto any object, or double-click to apply to the selected object.

In Details → Mesh:

  • Shape → Model (FBX / OBJ), then pick the model.
  • Texture: any imported texture. For models, (model's own) uses the texture found inside the FBX.
  • Tiling: repeats the texture. Great for bricks or wood on scaled cubes.

Tips:

  • Units are converted to metres and the axes to Y-up (Blender, Maya and Unreal FBX all work). If a model shows up huge, the import message in the Console says so; scale it in Details.
  • Skeletal animation isn't supported yet. Animated FBX files import in their rest pose.
  • Models are drawn double-sided, so open meshes (single planes, leaves) look right.
  • Re-dropping a texture with the same name keeps the project copy.

Export for Web (HTML)

File → Export for Web (HTML)...

  1. Type a game name and pick a folder.
  2. Press Export. You get one .html file containing everything: the engine (WebAssembly), the level, Lua scripts, prefabs, other levels, models and textures.

Ways to share it:

  • Play locally: double-click the .html. It opens in Chrome, Edge or Firefox (WebGL 2 needed).
  • itch.io: zip the .html, upload it as HTML, and tick This file will be played in the browser.
  • Your own site (e.g. GitHub Pages): upload the file as-is.

In the browser:

  • The game shows a loading screen, then Click to play, which captures the mouse.
  • Esc releases the mouse and opens the pause menu.
  • Everything works as in Play mode: scripts, Game Mode / Game Instance, Fyn.LoadLevel, water, grass and imported models.

Notes:

  • File size: roughly 2 MB of engine plus your assets. Big textures make bigger files; prefer 1024px or smaller JPGs for the web.
  • Browsers render with WebGL 2. Quality is set by the player's Settings → Quality.
  • The editor needs WebPlayer/fyn_webplayer.html next to FynEngine.exe (it's in the zip). Rebuild it from source with Emscripten; see web/CMakeLists.txt.