@ocornut@mastodon.gamedev.place avatar

ocornut

@ocornut@mastodon.gamedev.place

game programmer.
dear imgui / wonder boy: the dragon's trap / tearaway, dreams / pixeljunk shooter, 4am / soul bubbles

This profile is from a federated server and may be incomplete. Browse more on the original instance.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Working on Demo code for upcoming features, I rewrote it many times already. As the features are more involved, writing demo code that is as simple as possible becomes challenging, but it is a recurring motivation to find elegant design.

image/png

ocornut,
@ocornut@mastodon.gamedev.place avatar

"as simple as possible" isn't the only evaluation criteria: the demo needs to be as simple as possible while being as representative as possible of what a real application code would do, and what the programmer needs to understand.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@daniel_collin Yes definitively. In my situation there's an additional difficulty: multi-select system doesn't make assumption about how users store their items or stores selection. But in order to test variety of use case in the demo it is tempting to add abstraction layer that end-user wouldn't necessarily need.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@daniel_collin In the name of higher flexibility for the user I have made some choices that have been difficult to develop the lib for. I sometimes have second thoughts.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@daniel_collin Yes definitively. The frustration is that it's not easy to demonstrate multi-select in small amount of code, I can't have a 20 lines minimal demo, instead there's an e.g. "ExampleSelection" class in demo that mimics what users would go through, but it's more cumbersome than usual dear imgui code.
It did however got much nicer over last few months so I'm satisfied of that progress :)

pervognsen, to random
@pervognsen@mastodon.social avatar

If you're writing a C library please don't require zero-terminated strings as inputs. It isn't even a good way of interfacing with other C code (e.g. I want to pass a substring of a zero-terminated string).

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen how would you interface this for a string-heavy call-count-heavy using-string-literal-heavy api like dear imgui ? (fyi we have a string view patch, not sure how to best expose it for C users)

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen I think we may make dear bindings generate both versions. I think a majority of C users would still prefer zero terminated const char*. What’s ideal compact syntax in modern C to pass a constructed string view struct?

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen I also like the idea of making the const char* version be inlines calling strlen() directly, since api usage tends to be literals-heavy api it means strlen() can be baked by compiler.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen @pkhuong @vurtun Thank you all 3 for those pointers and ideas. I can't focus too much on this right ATM but I kept this in my notes for this feature. (If you are curious about current state of C&other lang binding generator: https://github.com/dearimgui/dear_bindings/actions/runs/6071389936 <- this doesn't have the ImStrv feature in)

ocornut,
@ocornut@mastodon.gamedev.place avatar

@pervognsen @pkhuong @vurtun Ideally I'd like a scheme where literals can use optimized value whereas non-literals would use strlen() BUT then I would prefer if that strlen() call was not inlined at call site (both for C and C++).

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Dear ImGui 1.89.9 released!
https://github.com/ocornut/imgui/releases/tag/v1.89.9

  • general maintenance release, 20+ fixes/improvements.
  • mostly working on finishing new rangeselect/multiselect feature (currently in wip-branch, merged hopefully next release)

image/png
image/png
image/png

ocornut,
@ocornut@mastodon.gamedev.place avatar

(
Screenshots credits:

ocornut,
@ocornut@mastodon.gamedev.place avatar

@sol_hsa I worked on many things this year which required large API breaking-change in multiselect hence its status. Its an unfortunately complex API but it really got better now.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Some very nice debug watch features in RemedyBG outlined in this video: https://youtu.be/r9eQth4Q5jg?si=zpJhlE2Tc0uIFe4z

ocornut,
@ocornut@mastodon.gamedev.place avatar

Seeing nice apps out there, partly enabled by dear imgui, helps me make peace with some of its current flaws and apparent clunky-fluglyness. I still hope to make it look great by default eventually, but can’t rush that ahead of being happy with core features. Long term gardening.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Needed to rebuild an older game and thought I'd share the building steps/guide I wrote for future-myself in 2017: https://gist.github.com/ocornut/b991f2720e12720e6c7b0522a72aa023

In spite of efforts to make building code+data+packaging simple, it's easy to forget how to use a custom pipeline, so good to write some docs.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Dear ImGui 1.89.8 released!
https://github.com/ocornut/imgui/releases/tag/v1.89.8

  • general maintenance, 20+ fixes/small features
  • opt-in support for OpenType SVG emoji/colorful fonts via Freetype+lunasvg
  • (+ near finish-line tweaks to range-select branch before merging in 1.90)

In-game viewport bits of Remedy's Northlight Engine
Custom text editor by sakiodre

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

I’ve been feeling so often/regularly physically exhausted in the past years I tend to fall sleep in random situations, anywhere.

I’m worrying about my ability to keep doing my job for many more years.

(Yes I’ve been to doctors, did many tests, still searching but i haven’t found the key reason yet)

ocornut,
@ocornut@mastodon.gamedev.place avatar

@charlesrandall I haven’t thought of this but I know it happens regardless of the places I am in, live or sleep at.

ocornut,
@ocornut@mastodon.gamedev.place avatar

@grumpygamer I suspect that’s part of it, but it’s more of a softish-slow burnout.

Never ending project + no deadline + piles of tasks and pressure probably doesn’t give me the ideal setup? (even tho intellectually I do enjoy working on it, and I want to pursue it)

ocornut,
@ocornut@mastodon.gamedev.place avatar

@mike I sleep 8 hours every night and tend to need coffee. I think treating my ADHD medically may be one of my next step to try.

On some tasks I can focus very well on some I don’t (and I mean, both within eg programming realm) but overall easily distracted and often need to micro-control my environment to avoid distraction.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Not a great doc writer but started a "Quick start" guide to showcase how most existing games/engine/apps can integrate Dear ImGui in ~20 lines of code.

I thought standalone examples showed it already, but this form seems easier to digest:
https://github.com/ocornut/imgui/wiki/Quickstart

Often seeing people taking 2+ hours or more to integrate it, often for the wrong reasons (unnecessarily wrapping/rewriting stuff) when the backends are designed in theory to just work in any app/engine with those ~20 lines of code.

ocornut, to random
@ocornut@mastodon.gamedev.place avatar

Dear ImGui v1.89.6 released!
https://github.com/ocornut/imgui/releases/tag/v1.89.6

30+ small fixes and improvements. Fixes 1.89.4/5 platform-focus related regressions with multi-viewports. Improved gamepad/keyboard nav.

(Very engine-ey screenshots today. Screenshots credits:

image/png
image/png
image/png

  • All
  • Subscribed
  • Moderated
  • Favorites
  • JUstTest
  • rosin
  • mdbf
  • tacticalgear
  • osvaldo12
  • InstantRegret
  • DreamBathrooms
  • cubers
  • magazineikmin
  • thenastyranch
  • khanakhh
  • Youngstown
  • slotface
  • kavyap
  • megavids
  • ethstaker
  • tester
  • GTA5RPClips
  • Durango
  • modclub
  • Leos
  • ngwrru68w68
  • everett
  • anitta
  • cisconetworking
  • provamag3
  • normalnudes
  • lostlight
  • All magazines