Context: I started off with ggez + specs and a very basic understanding of #rustlang and the game I wanted to make. I decided to investigate macroquad+hecs as an alternative and ended up attempting a re-write. This is a thread about my attempt!
βοΈ How much did you actually rewrite vs reuse?
I started with an empty main. I asked myself how each thing was implemented before and if it still made sense. I reused some of the components I had from before but I also changed a lot. Some core ideas stayed and some changed.
β±οΈ How long did it take?
Judging from the commits and dates, I think it took about 12-14 hours of development. One thing to note is that a rewrite was only possible in this time because my understanding of both rust and the task have significantly improved since I first started.
π Why macroquad+hecs?
They have very clean and simple APIs with minimal boilerplate. Been a joy to work with, I have not yet found something I needed but wasn't there. Also, I really wanted a web build and ggez doesn't support wasm, but mq does (I have yet to try it though!).
π How has the code changed?
The code is much simpler now for two big reasons: better design and less boilerplate.
5,348 β‘οΈ 1,879 lines of code - that's a 65% reduction in code, it's pretty significant given it's roughly the same functionality.