Bombfuse / emerald

A 2D rust game engine focused on portability.
MIT License
558 stars 16 forks source link

Hotreload example explanation #186

Open nezvers opened 2 years ago

nezvers commented 2 years ago

Hi, As a just-born Rustacian coming from weekend C, I conveniently landed on this project by trying to track the engine of Rebel Transmute. This is the first project I encountered examples of rust libraries and learned how to use them. Then I went through them but for the Hotreload, I have no clue how actually utilize it. It would be great if it had some comments or language tooltip documentation on how it is used.

P.S. I love what I'm seeing with this project and I think I'll be able to help a bit after I catch up with the Rust language.

Bombfuse commented 2 years ago

Hey Nezvers!

I really appreciate that you're enjoying the engine and we love to see more contributors!

As for Rebel Transmute, I think that may be made in Unity, can probably find out more in their discord.

Unfortunately I haven't had a ton of free time to document then engine :/ I do my best to document features through examples, adding a new example that demonstrates how to use a feature whenever one is added. I will do my best to write a thorough book on the engine in the future though!

As for the hot reload feature specifically, I think it only works on PNG files right now. So if you edit any png file being used by a sprite then it should update in real time as long as the hotreload function is called.

nezvers commented 2 years ago

Oh, I was hoping for code or configuration hotreloading, since that's the most needed for game development iterations. TanTan showed his hotreload approach for that. I'm willing to work on examples.

Bombfuse commented 2 years ago

Oh yah I'm not quite sure how to get code horeloading setup, configuration hotreloading we could probably do. I think it's possible to add an api for users to add their own file types to watch & hotreload.

I'd definitely be down to see some examples, code hotreloading sounds like it would be super good to have