{"author_link":"\/users\/huvaakoodia","author_name":"HuvaaKoodia","author_uid":"huvaakoodia","comments":[],"epoch":1503151428,"event":"LD39","format":"md","ldjam_node_id":48981,"likes":5,"metadata":{"p_key":"100828","p_author":"HuvaaKoodia","p_authorkey":"1000996","p_urlkey":"316538","p_title":"Using AnimationCurves for NonAnimations","p_cat":"LDJam ","p_event":"LD39","p_time":"1503151428","p_likes":"5","p_comments":"0","p_status":"WAYBACK","us_key":"1000996","us_name":"HuvaaKoodia","us_username":"huvaakoodia","event_start":"1501200000","event_key":"74","event_name":"LD 39"},"node":{"_collation":{"body_sanitizer":"TextUtils::SanitizeHTML via existing importer","event":"LD39","removed_author":false},"_superparent":32802,"_trust":7,"author":996,"body":"I used AnimationCurves in [Mr Mayor's Energy Crisis](https:\/\/ldjam.com\/events\/ludum-dare\/39\/mr-mayors-energy-crisis) to denote stat changes in the world.\n\n### AnimationCurve?\n\nIs a data type representing a curve in 2D. The current value of the curve on the Y axis can be evaluated in code based on a value on the X axis. These values can stand for anything, for instance position, acceleration, Max HP, monetary value, etc.\n\n![AnimationCurveCode.PNG](\/\/\/raw\/4e3\/z\/8ef5.png)\n*Data type in code*\n\n![AnimationCurveEditor.PNG](\/\/\/raw\/4e3\/z\/8ef6.png)\n*Data type in inspector*\n![AnimationCurveEditor2.PNG](\/\/\/raw\/4e3\/z\/8ef7.png)\n*Curve editor*\n\n![AnimationCurveCode2.PNG](\/\/\/raw\/4e3\/z\/8ef8.png)\n*Evaluating the prior curve at X position 0.5. This evaluation returns 1 as you can see from the curve itself.*\n\n### Proper examples\n\nFrom MMEC (the abbreviation doesn't quite work). \n\n![AnimationCurves.PNG](\/\/\/raw\/4e3\/z\/8ef9.png)\n*The names speak for themselves.*\n\nLet's look at the first one, Day to population increase, in detail.\n![AnimationCurveEditor3.PNG](\/\/\/raw\/4e3\/z\/8efc.png)\nThis curve indicates how much the population increases every day, if that wasn't clear already. It could have also indicated the exact population count per day, both approaches work just fine. \n\nReading the curve reveals that there is a spike in population influx at day 4 with 16 people, tapering down to 13 people by day 15.\n\nOne more example:\n\n![AnimationCurveEditor4.PNG](\/\/\/raw\/4e3\/z\/8efb.png)\n\nThis one is the nuclear meltdown chance based on the nuclear plant condition. As you can see the chance is 0 when the condition is higher than 0.4 (as in 40%), but then rises greatly once the condition closes on 0.\n\n## Nutshell\n\nAnimationCurves are flexible, easy to use and most importantly they allow clear visualization of data which you don't get with mere numbers and algorithms.\n\nCheers!","comments":3,"comments-timestamp":"2017-08-19T20:25:51Z","created":"2017-08-17T19:43:40Z","files":[],"files-timestamp":0,"id":48981,"love":5,"love-timestamp":"2017-08-19T19:49:45Z","meta":[],"modified":"2017-10-23T10:50:45Z","name":"Using AnimationCurves for NonAnimations","node-timestamp":"2017-10-23T10:50:45Z","parent":42158,"parents":[1,5,9,32802,42158],"path":"\/events\/ludum-dare\/39\/mr-mayors-energy-crisis\/using-animationcurves-for-nonanimations","published":"2017-08-19T14:03:48Z","scope":"public","slug":"using-animationcurves-for-nonanimations","subsubtype":"","subtype":"","type":"post","version":142730},"node_metadata":{"n_key":"48981","n_urlkey":"316538","n_parent":"42158","n_path":"\/events\/ludum-dare\/39\/mr-mayors-energy-crisis\/using-animationcurves-for-nonanimations","n_slug":"using-animationcurves-for-nonani","n_type":"post","n_subtype":"","n_subsubtype":"","n_author":"996","n_created":"1502999020","n_modified":"1508755845","n_version":"142730","n_status":"WAYBACK"},"source_url":"https:\/\/ldjam.com\/events\/ludum-dare\/39\/mr-mayors-energy-crisis\/using-animationcurves-for-nonanimations","text":"I used AnimationCurves in [Mr Mayor's Energy Crisis](https:\/\/ldjam.com\/events\/ludum-dare\/39\/mr-mayors-energy-crisis) to denote stat changes in the world.\n\n### AnimationCurve?\n\nIs a data type representing a curve in 2D. The current value of the curve on the Y axis can be evaluated in code based on a value on the X axis. These values can stand for anything, for instance position, acceleration, Max HP, monetary value, etc.\n\n![AnimationCurveCode.PNG](\/\/\/raw\/4e3\/z\/8ef5.png)\n*Data type in code*\n\n![AnimationCurveEditor.PNG](\/\/\/raw\/4e3\/z\/8ef6.png)\n*Data type in inspector*\n![AnimationCurveEditor2.PNG](\/\/\/raw\/4e3\/z\/8ef7.png)\n*Curve editor*\n\n![AnimationCurveCode2.PNG](\/\/\/raw\/4e3\/z\/8ef8.png)\n*Evaluating the prior curve at X position 0.5. This evaluation returns 1 as you can see from the curve itself.*\n\n### Proper examples\n\nFrom MMEC (the abbreviation doesn't quite work). \n\n![AnimationCurves.PNG](\/\/\/raw\/4e3\/z\/8ef9.png)\n*The names speak for themselves.*\n\nLet's look at the first one, Day to population increase, in detail.\n![AnimationCurveEditor3.PNG](\/\/\/raw\/4e3\/z\/8efc.png)\nThis curve indicates how much the population increases every day, if that wasn't clear already. It could have also indicated the exact population count per day, both approaches work just fine. \n\nReading the curve reveals that there is a spike in population influx at day 4 with 16 people, tapering down to 13 people by day 15.\n\nOne more example:\n\n![AnimationCurveEditor4.PNG](\/\/\/raw\/4e3\/z\/8efb.png)\n\nThis one is the nuclear meltdown chance based on the nuclear plant condition. As you can see the chance is 0 when the condition is higher than 0.4 (as in 40%), but then rises greatly once the condition closes on 0.\n\n## Nutshell\n\nAnimationCurves are flexible, easy to use and most importantly they allow clear visualization of data which you don't get with mere numbers and algorithms.\n\nCheers!","title":"Using AnimationCurves for NonAnimations","wayback_source":[]}