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,SoundandAudio_Stream. Audio_Clipis for fire-and-forget audio effectsSoundis a wrapper forAudio_Clipthat remembers settingsAudio_Streamstreams a file, for playing music etc
- Three main audio types:
- 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_texturefor setting the current texture on a specific bindpoint- Camera procs renamed:
screen_to_world->screen_to_cameraworld_to_screen->camera_to_screencamera_world_matrix->camera_inverse_view_matrix
- vsync control and an FPS limit:
set_vsync,set_fps_limit, plusinitoptions - 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
Imagetype: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 = trueparameter tokey_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.wasmpreload- 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_filenow 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 useor_else. Whenever the bool isfalse, 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_lockingandtouch uiandbox2dwere reworked- The old
fontsexample was removed andmeasure_textwas renamed tofonts. It now shows Chinese and Japanese text