ctmatthews

Indie game developer

a trans woman in the UK making 2D action games about ducks:

Ducky's Delivery Service (Steam/itch/Switch)

Chessplosion (Steam/itch)


i mostly post on my Blog / Newsletter / Patreon


i play fighting games! i won Evo in 2021.


pfp/header by NomnomNami


πŸ“° Blog
ctmatthews.com/blog
πŸ’Œ Newsletter
ctmatthews.com/newsletter
βœ‰οΈ Contact (email/DM)
ctmatthews.com/contact
πŸ’» itch.io
ctmatthews.itch.io/
🐣 Patreon
patreon.com/ctmatthews
πŸ–ΌοΈ pfp/header by NomnomNami
nomnomnami.com/

Anonymous User asked:

i was really struck by this image of your imgui setup -- https://staging.cohostcdn.org/attachment/1779f3c9-092d-4f37-8a14-950f6dcebe06/dds_engine_and_editor.jpg -- but i've been struggling to recreate something similar, is there an example or resources you'd point towards?

Thanks for asking! I use the docking branch of dear imgui, which lets you dock windows like in that image.

The dockspace example code (and accompanying comments) in imgui_demo.cpp does everything I need, if I remember correctly.

I just create the dockspace by calling ImGui::Begin and ImGui::DockSpace, then I call ImGui::BeginMenuBar and do everything that's in the menu at the very top of the screen (File, Edit, the Rewind timeline etc), then I call ImGui::EndMenuBar and ImGui::End. After that, I just make all of those other windows ("Game", "Visibility", "Achievements", "Progression" etc) by calling ImGui::Begin, then the window contents, then ImGui::End, just like normal.

The "Game" window uses ImGui::Image to display the contents of the main game framebuffer, along with some additional code to force its aspect ratio to 16:9 and to fudge my in-game mouse positions so I can click on things in the game.

I learned pretty much everything I know about dear imgui from the imgui_demo.cpp example code (which you can see in your game by calling ImGui::ShowDemoWindow) and from the "examples" folder that shows you how to hook it up to OpenGL, DirectX and so on. So I recommend checking those out too. But me know if there's anything I missed out!


You must log in to comment.

in reply to @ctmatthews's post:

The first time I saw this screenshot from Omar using ImGui in Wonder Boy: The Dragon's Trap I was just completely hooked. The idea that you could just have your game running in a window and edit assets alongside it has really driven me to a lot of things :eggbug-smile-hearts: