github karl-zylinski/karl2d beta-4
Beta 4

4 hours ago

178 days, almost half a year, has passed since the previous release of Karl2D!

The previous release was done just before the Karl2D Gamejam. A HUGE thanks to everyone who participated in the jam!

The jam was very good for collecting feedback. I got a huge amount of issues to look into. This release shows the massive amount of work that has gone into Karl2D since the jam. Also, thank you to everyone who has contributed with PRs!

Without further ado, here is the changelog since the previous release.

Changelog

Audio

  • Audio mixer thread. Used on all platforms that support threading
  • Audio API redesigned
    • Three main audio types: Audio_Clip, Sound and Audio_Stream.
    • Audio_Clip is for fire-and-forget audio effects
    • Sound is a wrapper for Audio_Clip that remembers settings
    • Audio_Stream streams a file, for playing music etc
  • OGG files can be loaded as audio clips
  • More WAV variations supported
  • Seeking of sounds and streams
  • Audio buses with volume, pan and custom effect
  • Fixed crash when more than one ogg stream played at once

Rendering

  • Camera.flip_y: Flip the Y axis of a camera
  • Depth testing: Init_Options.depth_test, set_z
  • Additive blend mode
  • set_shader_texture for setting the current texture on a specific bindpoint
  • Camera procs renamed:
    • screen_to_world -> screen_to_camera
    • world_to_screen -> camera_to_screen
    • camera_world_matrix -> camera_inverse_view_matrix
  • vsync control and an FPS limit: set_vsync, set_fps_limit, plus init options
  • Default values for shader constants/uniforms
  • Font rendering: Replaced fontstash with custom font cache solution
    • All dynamic fonts share one atlas that grows to 4096×4096 and then evicts the least recently used glyphs
  • Image type: load_image_from_*, load_texture_from_image, update_texture
  • Triangle winding order no longer matters, because culling is disabled
  • Render textures keep the camera projection
  • Scissor bug on WebGL

Window management

  • Monitor queries: get_monitors, get_window_monitor, set_window_monitor
  • Window icons: set_window_icon
  • Cursors: set_cursor, create_custom_cursor

Input

  • Touch support: get_touches. Only for web right now
  • Mouse locking: set_mouse_locked
  • Text input: get_typed_runes
  • Key repeat support using the allow_repeat = true parameter to key_went_down
  • Horizontal mouse wheel support

Linux

  • Wayland and X11 are now loaded at runtime, so end users only need one of them
  • ALSA and udev are loaded at runtime
  • Fallbacks when ALSA's 'default' audio device doesn't work
  • Client-side window decorations for Wayland, made with GNOME in mind
  • High DPI on X11
  • Correct window size right after init + fullscreen on X11
  • Wayland crash fixes

Windows

  • Fixed 100% CPU while minimized
  • Faster gamepad polling
  • Both gamepad triggers can be pressed at once

Web

  • Keyboard input works inside an iframe
  • main.wasm preload
  • shoulder/trigger gamepad buttons are no longer swapped

Mac

  • Modifier keys work

Misc

  • Rect helpers: rect_split_left/right/top/bottom.
  • Many procs that load something, such as load_texture_from_file now return a second, optional bool. In the past you could check the return value for the zero value. But returning an optional bool lets you use or_else. Whenever the bool is false, then you can still use the first return value, but it may not render anything etc.

Examples

  • New examples: audio_bus, cursors, depth_test, logo, monitors, mouse_locking and touch
  • ui and box2d were reworked
  • The old fonts example was removed and measure_text was renamed to fonts. It now shows Chinese and Japanese text

Don't miss a new karl2d release

NewReleases is sending notifications on new releases.