Devlog Dec 21 2019 – A Tiny Adventure
I'm working on a simple game that is teaching me how to use Svelte. It's called A Tiny Adventure and is a spiritual successor to a game I created long ago called Foobar The BazBarian. Whereas here I'm figuring out how to create it with Svelte components, and learning how Svelte handles events.
Basically Svelte allows you to pass events up from child to parent. And pass data back down via “props”. I'm learning how to use this to pass the direction data from my control component to my display component. Right now all this does is let the display component render the direction. But this is a minor milestone for me because now I can separate out the components and create a simple store where I can place descriptions, items, and monsters.If you want to play around with this, you can visit the code here:
Next up is to get the display component to react to this value change and do something interesting.
Written with StackEdit.
Top comments (0)