loodakrawa / SpriterDotNet

A pure C# Spriter implementation
zlib License
220 stars 75 forks source link

More of a question than an issue about the project #110

Closed elvismd closed 5 years ago

elvismd commented 5 years ago

Hi! So I was going to download this repository to try it out and use in my game and I noticed in the README that you wrote you plan to fix the issues and i'm glad you will keep developing it, but I got curious on " "...implement version 2.0 with the development philosophy inspired by the fantastic Handmade Hero...", I'm also a big fan of Handmade Hero (and the Network as well) but I was wondering how would you implement its philosophy using C# ? (Since not being able to manage the memory already takes away some of the good approaches casey presents in the series) (also i'm sorry for asking you this in the issues, but I was really curious and dont know where else I could send you a message)

loodakrawa commented 5 years ago

Hi,

Happy to discuss it here :)

The idea is to make it less object-oriented and more.... procedural? data-centric? Not sure how exactly to call it but going to the next point.

Although you can't control the memory the way you can in C, C# struct gives you a lot of power in that regard. So instead of having object references for sprite/bone transforms I plan to lay out all this data in contiguous memory and access them using the relatively new Span and Memory. Also, I plan to use SIMD intrinsics exposed via Vector.

elvismd commented 5 years ago

Interesting, I'm not sure i'm familiar with this Spam thing... but thats great, cant wait to see how it will turn out! I'm currently using SpriterDotNet and it works just fine, had a little trouble with the content pipeline thing (until I finally found out I had to have dependencies of the DLL at the same folder as the spriter dot net importer DLL folder), but it works pretty well! Thank you!

loodakrawa commented 5 years ago

If you want to learn more about Span: https://blogs.msdn.microsoft.com/mazhou/2018/03/25/c-7-series-part-10-spant-and-universal-memory-management/ https://channel9.msdn.com/Events/Connect/2017/T125

And yeah, the content pipeline can be a pain. That's another thing I want to make better/easier for version 2.

elvismd commented 5 years ago

Thanks!