I might make a more thorough post later... But for now, I'm happy to announce that I published @hubol/smooch to npm.
I even automated the process of publishing in GitHub Actions. I did some really hacky stuff but I'm pretty happy with it overall!
So now with the asset generation tool working, I've been able to sort of get started on Igua 2. For now, I am basically bringing the old engine in piece-by-piece and making improvements as I see fit. Some of those changes include:
- Some abbreviated method names for commonly-used methods: .withStep -> .step, .withAsync -> .async
- A loooot of reorganization. I'm trying to carefully separate Igua-specific code from game engine code so that I might be able to reuse this engine for other projects
- Using a new library to maintain a context local to an asynchronous chain. In the original engine, I was using zone.js which is this big black box from Angular. To use it, I had to configure my bundler to target web browsers that didn't support native async/await, which was a hassle. I found this obscure stackoverflow answer that indicated someone had made a solution that works with native promises:
https://stackoverflow.com/questions/66960129/something-like-async-hooks-for-the-browser/75621061#75621061Those are the big things! I've gotten smooch integrated with the project now too!
https://github.com/hubol/igua-rpg2If you take a look at the src/assets/generated/ directories you'll see the output from smooch! Take a look at the smooch.json file at the root to see how that output was generated. I'm so happy with it!
Finally, I adapted my crude "continuous deployment" workflow from Igua 1. The game is now pushed to heroku whenever I commit to main. Thinking about it right now, I'm not sure why I didn't try to get it working with GitHub Pages instead... I guess because I already knew how to do this... Maybe some other time I'll try Pages, though.
Anyway, you can see the fruits of my efforts here
https://igua-rpg2-d76be5c97e6f.herokuapp.com/For now, this is a crude sandbox that I am testing the game engine with
It might take a second to load because of the heroku plan i have ^_^