Streak Club is a place for hosting and participating in creative streaks.
I've been having difficulty getting past a problem which caused me to not commit any code the past few days as I simply read and learned instead.
But I've conquered it! Wahey!
Essentially, I was trying to figure out how to tie my Main -> State -> Editor -> World -> TileList -> Tile structure together such that the children had no knowledge of the parent and the parents blindly passed signal context (events) to the child. This allowed Tile to listen for a click and update itself within TileList.
This is due to Elm being a functional language which doesn't have state on objects, simply functions and data. It makes everything a lot easier, once you've got your head around a couple of concepts. It is a language in early and rapid development so I'm sure this will improve.
Anyhoo, here's a gif of the initial editing a world (along with a mouse position bug due to image overlays).
daily from
Post a comment
@saluk I have a fairly complete game design in my head, but I'm not writing anything down yet just to let it be fluid based on what is possible. So half and half at the moment.
I'm really enjoying the way functional works. It is a little confusing at first doing it without traditional state, but you obviously have initial data and it can be saved and loaded as json. But have a look into the timetravel debugger to see the full power of this style, it's pretty mind blowing. And try the mario demo of that.
Man, I get how functional languages work, we did a little bit of lisp in one of my classes. I can't imagine writing a game without state though! Have you figured out your concept yet, or are you still mostly seeing what you can do from the technical side first?
Thanks for sharing about Elm, it's always fun to see new ways to build things.