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.
Posts by Karl Zylinski
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.
Merged!
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
Live: Looking at some drawing procedure API design ideas www.youtube.com/watch?v=XG9Q...
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.
"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!
Pontus, digitized. Pontus, immortalized.
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...
com os cumprimentos do chef
New Odin release! Let's look at some of my favorite changes: www.youtube.com/watch?v=7Ty5...
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...
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.
NO FREAKIN WAY, GUYS LOOK 😭❤️ I was hoping top ten
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...
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!
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...
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...
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
Karl2D game library development -- Live now: Trying a less complicated way of bundling assets with with web builds
www.youtube.com/watch?v=2Uue...
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
Made in Odin!
Today I'm writing a "virtual filesystem" for web builds. Live now: www.youtube.com/watch?v=E59u...
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.
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.