Ali Helmy is the Animation Programmer at Crytek in charge of all character animation systems on Crytek’s VR focused research development team. He has been involved with the current generation of VR hardware from very early on and has been in charge of all character animation systems in Crytek’s VR efforts. From Dinosaur demos VR Benchmarks to full games like The Climb Robinson: The Journey, he has been involved with every aspect of making animations work for the entirely new realm that is VR.

Alex Zook is a Senior Data Scientist at Blizzard Entertainment and PhD candidate at the Georgia Institute of Technology. As a Blizzard data scientist he's work on problems including identifying gameplay styles of World of Warcraft players, analyzing map design in Overwatch, and refining matchmaking in Hearthstone and Heroes of the Storm.

Chris Seddon is a Team Lead Programmer at Ubisoft Toronto focused on creating artificial intelligence that helps make games more realistic and fun to play. Chris joined the studio in 2013 as a Senior Gameplay Programmer creating intelligent companions and creatures for Far Cry 4 with Shangri-La and most recently on Far Cry Primal with the fan-favourite Beast Master feature. Prior to joining Ubisoft, Chris started his career programming GPS tracking tools for an agricultural software company. Making games since the age of 15, Chris made the decision to follow his passion, joining the video game industry where he worked on multiple award-winning video games including Bioshock 2, The Darkness 2, Star Trek, FIFA Soccer, Tiger Woods 2006 and 2007, Madden 2008 and NCAA 2008. Chris is a computer programming graduate of Seneca College in Toronto.

Carol O’Sullivan is the Professor of Visual Computing at Trinity College Dublin, where she has been on the faculty since 1997. From 2013-2016 she was a Senior Research Scientist with Disney Research Los Angeles, and also spent time in the Movement Research Lab in Seoul National University as a Visiting Professor from 2012-2013. Her research interests include perception, animation, virtual humans, and crowds. She was the co-Editor in Chief of the ACM Transactions on Applied Perception, and was formerly Associate EIC of IEEE CGA. She has served on many editorial boards and program committees, including the SIGGRAPH and Eurographics papers committees, and has been program or general chair for several conferences, e.g., Eurographics, ACM Symposium on Computer Animation, ACM Symposium on Applied Perception, and others.

By replacing
msg
with
Msg
, we’ve made the
update
function much more restrictive. It now accepts only two messages:
Increment
and
Decrement
. Before, it could accept
any
message.

We’ve created a mechanism for handling messages, but we still don’t have a way to create them. Modify the
view
function to fire messages when the
+
and
-
buttons are clicked.

The message type changed from
msg
to
Msg
in the
view
function too. Previously, the HTML returned by
view
wasn’t creating any messages, so we just used
msg
. Now, it uses the
onClick
function from the
Html.Events
module to generate messages of type
Msg
. Import the
Html.Events
module in
Counter.elm
.

The Elm Architecture essentially boils down to these three parts: Model, View, and Update. The entire application can be viewed as one giant machine that runs in perpetuity. It takes an initial model, presents it to the users, lets them issue messages from the view, updates the model based on those messages, and presents the updated model back to the users again.

The diagram below illustrates the interaction between the Elm runtime and various components in our app.

Not sure if you noticed, but we didn’t include the
main
function’s type annotation when we defined it. Let’s ask Elm what the type should be. Delete the
build-artifacts
directory located inside
beginning-elm/elm-stuff
and run the following command from the
beginning-elm
directory in terminal.

elm-make
doesn’t recompile our code if nothing has changed since the last compilation. By deleting the
build-artifacts
directory, we’re forcing it to recompile. Without recompilation, the warnings won’t be displayed.

Copy and paste the type annotation from the warning right above the
main
function in
Counter.elm
.