{"id":117,"date":"2015-03-25T18:41:20","date_gmt":"2015-03-25T18:41:20","guid":{"rendered":"https:\/\/blogs.scummvm.org\/subr3v\/?p=117"},"modified":"2022-05-23T18:41:45","modified_gmt":"2022-05-23T18:41:45","slug":"scriping-and-dynamics-iv","status":"publish","type":"post","link":"https:\/\/blogs.scummvm.org\/subr3v\/2015\/03\/25\/scriping-and-dynamics-iv\/","title":{"rendered":"Scriping and Dynamics &#8211; IV"},"content":{"rendered":"<p>As I mentioned in the previous post, I have been working on fire grids and I wanted to post some updates on my progress.<\/p>\n<p>To start things off I created two main classes: FireGrid and GridCell; a fire grid is simply a 2D array of GridCell instances that also provides utility methods to get a specific cell from a coordinate or to get the neighbours of the provided cell.<\/p>\n<p>I will be using an expression to simulate the logic and I decided to structure my code so that everything happens in steps: those are going to be calculated and executed every frame through an expression that calls some python code and that\u2019s where most of the logic is going to lie.<\/p>\n<p>In order to test things out I create a polyCube instance for each Cell and I have added some global variables to regulate both the cell size and the grid size: those will be exposed later on by the tool I will be writing to allow the user to tweak the simulation based on how big the scene is going to be.<\/p>\n<p>For the next week my plan is to research and find a way to specify a material for each cell, one of the methods I have in mind to solve it would be raycasting but I would need to research this further and look at the documentation to find out if it\u2019s possible to do so.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As I mentioned in the previous post, I have been working on fire grids and I wanted to post some updates on my progress. To start things off I created two main classes: FireGrid and GridCell; a fire grid is simply a 2D array of GridCell instances that also provides utility methods to get a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":2,"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":119,"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/posts\/117\/revisions\/119"}],"wp:attachment":[{"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.scummvm.org\/subr3v\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}