Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Héctor Ramón
@hecrj
:+1:
Slyklaw
@Slyklaw
I'm guessing this is a good place to hit you up with Iced questions.
Héctor Ramón
@hecrj
Yes! Feel free to ask me anything.
I released the first alpha version today. Getting a lot of positive feedback on Reddit.
Still a long way to go though :3
Slyklaw
@Slyklaw
The ggez example is a great reference, but it's not a good starting place. How about a do-nothing example that can be used to start a new renderer implementation?
Héctor Ramón
@hecrj
Yes, that's probably a good idea.
We could make a template repository for it, as renderers are mostly meant to live in its own crate.
Slyklaw
@Slyklaw
yeah, that was my next question, renderer in its own crate. so I'd do like iced_three for mine.
Héctor Ramón
@hecrj
Yes. iced could entirely be an implementation detail of your UI toolkit, like coffee does. But if you are building a renderer for the built-in widgets, then iced_three makes sense. We may end up splitting the built-in widgets into their own crate too. Still unsure about this. Many things to learn from use cases.
Also, I imagine renderer crates could provide an API to render your own custom widgets efficiently. That would be great too.
Exciting.
Kumar Ankur
@krankur
This might be a stupid and off-topic question, but I am really curious about iced and need to know if I can use it for implementing GUI for my next project. I see that the examples use ggez or coffeee but can I use it without them just as a standalone GUI library?
Slyklaw
@Slyklaw
Yes, you can use iced without them, but you need to implement the widget renderers for your project.
Héctor Ramón
@hecrj

@krankur Depends on the complexity of the project.

Iced is renderer-agnostic. This means the library won't do any drawing for you at all. Therefore, in order to use it you need a renderer implementation. There is not a general purpose renderer for Iced yet (the library was just released!). Building such a renderer is the next milestone.

Because of this, Iced is not ready yet for anything too complicated. Currently, it is best suited for simple use cases where building your own simple renderer is feasible, like game menus, dev tools, simple apps, etc. I wouldn't recommend it for a somewhat complex GUI yet. That said, any efforts in this direction would be very welcome to improve the library.

And there are no stupid questions, feel free to ask anything here!
Kumar Ankur
@krankur
Thanks @Slyklaw @hecrj
Michael
@Maikel1963
I just stumbled over coffe and am very surprised about your work. If that is 0.4 how will 1.0 be :-))
I am working on something that needs text input at specific positions. Normally I would use a textbox or something similar for this. But with your work a label would be sufficient. But I couldn't figure out, if there is something like focus for the widgets.
Michael
@Maikel1963
Besides I was surprised to see that in your input-example I am not able to put more than 40 characters onto the screen. Each keystroke still is acknoledged and shown, but the buffer is not accepting any more characters (Backshift works). Where did you set max size?
Héctor Ramón
@hecrj
Hey, @Maikel1963. The character limit in the input example is defined here: https://github.com/hecrj/coffee/blob/master/examples/input.rs#L95
Thanks for the kind words!
What do you mean by focus? There is indeed no text input widget yet, but we should be able to reuse the widgets found in iced eventually (https://github.com/hecrj/iced).
Michael
@Maikel1963
Thanks for your answer. I found the line with the limit the next morning. Sometimes I am just blind.
"focus" in the context I am thinking of is to ignore all character input as long as there is no textbox selected which is meant to accept input via keyboard (has focus). But it is not very complicated to create a struct which handles just this. Only that I didn't want to invent it anew if it alredy exists.
Michael
@Maikel1963
I didn't regard iced before. Seems as if this is just what I am looking for. Thanks
Héctor Ramón
@hecrj
@Maikel1963 Feel free to join the Iced Zulip and ask any questions there: https://iced.zulipchat.com/
Kumar Ankur
@krankur
Is Coffee still being actively developed? I don't see any recent activities.
Héctor Ramón
@hecrj
No, not actively. I have plans to update it soon, but I am currently focusing on Iced.
Héctor Ramón
@hecrj
I updated it and released a new version a couple of days ago. It should work with the latest wgpu and winit now.
Lukáš Hozda [magnusi]
@luciusmagn
Howdy!
Héctor Ramón
@hecrj
Hey there!
Lukáš Hozda [magnusi]
@luciusmagn
i am currently trying to make a game with coffee, would it be okay to ask for some advice?
Héctor Ramón
@hecrj
@luciusmagn Sorry I missed this! Feel free to ask anything.
Lukáš Hozda [magnusi]
@luciusmagn
@hecrj no worries! thanks a lot!
me and my girl are trying to make a text adventure game with coffee and it's a pretty fun endeavor, haha :D
Lukáš Hozda [magnusi]
@luciusmagn
the code is here, but there's not much visually and gameplay-wise going on yet: https://git.sr.ht/~magnusi/heaven-underground
i tried some fun stuff, like declarative generics-based input processing (https://git.sr.ht/~magnusi/heaven-underground/tree/master/src/input.rs#L107) but i'm not experienced with gamedev at all :sweat_smile:
anyways, I got a few questions/concerns
\1. when I build for Windows (I'm a Linux guy mostly), fonts don't work in Vulkan. Am I doing something wrong and that shouldn't happen or is that a bug? I haven't seen it mentioned anywhere else :sweat_smile:
\2. how would one go about implementing something such as video playback? Like pre-recorded a cutscene? Is that even possible? This might not be related to coffee, I think, I don't know much about gamedev
Lukáš Hozda [magnusi]
@luciusmagn
\3. is there any recommended approach for playing sounds?
\4. this is just me being curious: do I understand it correctly that OpenGL is locked to 60fps and Vulkan is unlocked? I'm developing on a pretty old and weak thinkpad, so the 60fps might just be a coincidence :sweat_smile:
Héctor Ramón
@hecrj
Glad you are both having fun! :)
@luciusmagn 1. This may be that your Windows graphics drivers are different or do not support Vulkan that well. Try updating them, if you haven't yet.
\2. I'm honestly not completely sure. I imagine you'd need to decompress the video and stream that data to the GPU to finally display the result as a texture. It's easier said than done! :sweat_smile:
\3. I'd try rodio or cpal. I know some folks have used it with coffee. We should eventually offer built-in audio support.
\4. They should both enable Vsync. This may be related to the driver differences I mentioned in \1.
MiniApple
@MiniAppleTheApple
how to draw image?
in coffee?