Advertisement · 728 × 90

Posts by Karl Zylinski

It's tricky. My idea is to do no automatic scaling and just let the backbuffer be the set window size, then the programmer can scale using a camera + the reported DPI scale of the system.

This works fine on Windows. Wayland seems impossible. Web also tricky.

1 day ago 1 0 0 0
Preview
DPI scale uniformity · Issue #3 · karl-zylinski/karl2d Make sure all platforms behave the same with respects to window DPI scaling. In Windowed mode the Window should always have the resolution you state. So that the backbuffer gets that resolution. Yo...

I need to address this very soon github.com/karl-zylinsk... -- Currently the same window size passed to init will result in different sizes on different OSes because some don't support "disabling" DPI scaling and letting the game handle it.

1 day ago 4 0 1 0

Merged!

1 day ago 1 0 0 0
Preview
draw_texture_XXX API finalization pass + draw_text rotation by karl-zylinski · Pull Request #121 · karl-zylinski/karl2d API changes for the draw_texture procs so we always have origin and rotation available. Renamed the procs to more descriptive names. I've added deprecated versions of the old procs where possib...

See the PR for more details. I'll probably merge it later tonight: github.com/karl-zylinsk...

1 day ago 1 0 1 0
Post image

Alrighty... This is my current design for the Karl2D `draw_texture` refactor. It's fairly similar to raylib. The main differences are:
- origin/rotation always available, with zeroed default params
- I prefer these proc names to DrawTexture, DrawTextureRec, DrawTexturePro

1 day ago 11 0 1 0
Karl2D drawing API design
Karl2D drawing API design YouTube video by Karl Zylinski

Live: Looking at some drawing procedure API design ideas www.youtube.com/watch?v=XG9Q...

2 days ago 3 0 0 0
Preview
draw_texture_XXX refactor + other drawing procs refactor by karl-zylinski · Pull Request #121 · karl-zylinski/karl2d I'm trying to challenge names that are hand-overs from raylib and see how I can make the API better by using some Odin features.

Today I've been looking at making use of Odin features to change the texture drawing procs to just being `draw_texture` and `draw_texture_fit`: github.com/karl-zylinsk... -- This will make the API deviate more from my original raylib inspiration, while making use of Odin features.

2 days ago 8 0 0 0
Karl2D Web Build

New ⁠karl2D example: Dual grid tilemap.

Live web version: zylinski.se/karl2d/dual_...

3 days ago 3 0 0 0
Preview
Karl2D audio support, more YouTube... and a gamejam? A summary of what went into adding audio support to Karl2D

news.zylinski.se/p/karl2d-aud...

4 days ago 5 1 0 0

"ADVISE:
Be kind. Always."

I've found this to be the most important thing when building a community. Many people don't do this, because it is hard! It's much easier to be grumpy.

Being kind is good for your own mental health and also great marketing. It is hard work!

5 days ago 6 2 0 0
Advertisement
Post image

Pontus, digitized. Pontus, immortalized.

1 week ago 3 2 0 0
Preview
Release Beta 3: Audio · karl-zylinski/karl2d The third beta of Karl2D is here! The big thing: Audio support Since beta 2, audio support has been added. This is done using a custom software mixer. The mixer is part of karl2d.odin. It takes all...

Here's the release itself: github.com/karl-zylinsk...

1 week ago 2 0 0 0
My 2D game library now has audio support!
My 2D game library now has audio support! YouTube video by Karl Zylinski

Karl2D beta 3 is here! The audio support is now official! Here's a video about what audio features are available and a bit about the audio mixer: www.youtube.com/watch?v=HYwE...

1 week ago 6 1 1 0
Post image

com os cumprimentos do chef

2 weeks ago 130 22 0 2
Odin has a new type of built-in array
Odin has a new type of built-in array YouTube video by Karl Zylinski

New Odin release! Let's look at some of my favorite changes: www.youtube.com/watch?v=7Ty5...

1 week ago 6 2 0 0
Preview
Review Sound / Sound Instances · Issue #105 · karl-zylinski/karl2d Currently Sound is just a handle to a "Sound_Instance". You explicitly create sound instances. This makes it possible to play a sound multiple times simultaneously without duplicating the data. How...

Spent the evening thinking about a redesign of my "Sound Instance" concept (similar to SoundAlias in raylib). When I used raylib I found that I always wanted an Alias per played sound. I'm trying to optimize for that case.

Please read and give feedback: github.com/karl-zylinsk...

2 weeks ago 4 0 0 0

Regardless of the game genre, if there’s only a small number of cases just hard code them.
Please stop being clever when it’s small and able to be manually done.

2 weeks ago 18 2 1 0

NO FREAKIN WAY, GUYS LOOK 😭❤️ I was hoping top ten

2 weeks ago 30 5 9 0
Advertisement
Preview
Audio stream from bytes by karl-zylinski · Pull Request #106 · karl-zylinski/karl2d Stream audio from a byte buffer. This makes it possible to stream audio on web by doing for example k2.load_audio_stream_from_bytes(#load("some_file.ogg")). It's good for gamejams etc...

merged `load_audio_stream_from_bytes` into karl2D so you can stream from an in-memory byte buffer -- useful for whole-game-in-executable and web builds

github.com/karl-zylinsk...

2 weeks ago 3 0 0 0
Audio stream from bytes by karl-zylinski · Pull Request #106 · karl-zylinski/karl2d Stream audio from a byte buffer. This makes it possible to stream audio on web by doing for example k2.load_audio_stream_from_bytes(#load("some_file.ogg")). It's good for gamejams etc...

Now my `load_audio_stream_from_bytes` support is almost done. Today I did some documentation of it. I just need to test it some more with some short ogg files etc, so I can check that it loops correctly. github.com/karl-zylinsk...

Karl2D beta 3 (audio) is getting close!

3 weeks ago 5 1 0 0
Review Sound / Sound Instances · Issue #105 · karl-zylinski/karl2d Currently Sound is just a handle to a "Sound_Instance". You explicitly create sound instances. This makes it possible to play a sound multiple times simultaneously without duplicating the data. How...

I also spent some time thinking about "Sound Instances" (known in raylib as SoundAlias). I'm not sure the current approach is the right one. Outlined my ideas in this issue: github.com/karl-zylinsk...

3 weeks ago 1 0 0 0
Preview
Audio stream from bytes by karl-zylinski · Pull Request #106 · karl-zylinski/karl2d Stream audio from a byte buffer. This makes it possible to stream audio on web from a #load'ed file. It's good for gamejams etc. This PR also uses the new WASM support in the vorbis vendor ...

Worked on adding support for streaming of audio from an in-memory buffer. This is one way to get audio streaming on web: For the web build use `#load("music.ogg")` and pass it to `k2.load_audio_stream_from_bytes(the_bytes)`. Not optimal, but good for game jams etc.

github.com/karl-zylinsk...

3 weeks ago 3 0 1 0

I just winged it. A blob of memory with paths and file contents. String normalisation (two paths resolving to same file) is probably the biggest issue

3 weeks ago 1 0 0 0
Karl2D audio programming / Can I finish the audio work soon?!
Karl2D audio programming / Can I finish the audio work soon?! YouTube video by Karl Zylinski

Karl2D game library development -- Live now: Trying a less complicated way of bundling assets with with web builds
www.youtube.com/watch?v=2Uue...

3 weeks ago 3 0 0 0
Preview
Comparing master...virtual-fs · karl-zylinski/karl2d Odin 2D game library. Beginner friendly and easy to modify. - Comparing master...virtual-fs · karl-zylinski/karl2d

Experimented with creating a "virtual filesystem" for Karl2D web builds. It's a blob of memory that contains all the assets. This would make it possible to load files by filename even when there is no OS file support.

Not merged: github.com/karl-zylinsk... -- Need to try some other approaches first

3 weeks ago 12 0 1 0
Advertisement

Made in Odin!

3 weeks ago 5 0 1 0
Karl2D virtual filesystem for web
Karl2D virtual filesystem for web YouTube video by Karl Zylinski

Today I'm writing a "virtual filesystem" for web builds. Live now: www.youtube.com/watch?v=E59u...

3 weeks ago 2 0 1 0
Preview
Audio in Karl2D: Software mixing, OS APIs and general design As I’ve been making my own game creation library Karl2D I’ve noticed something about audio: While many people are fine with writing their own rendering, they still go for some library when implementin...

Read more how I wrote the software mixer for Karl2D: zylinski.se/posts/audio-...

3 weeks ago 2 2 0 0

Writing my own software audio mixer was easier than I expected! It has been an eye-opening journey.

I never imagined being able to see wav files loaded from disk, be played and then processed by own mixer and finally shipped off to some low-level sound API.

3 weeks ago 27 2 1 0

I've done quite a lot of game design and I still find that making a whole game engine is probably easier than making a single good game.

3 weeks ago 1 0 1 0