Coterie

Coterie

Growing up I deeply enjoyed two specific cards games: Triple Triad in Final Fantasy VIII and Tetra Master in Final Fantasy IX. Having some extra time this past week I developed a simple card game variant called Coterie. What started as an excuse to get more familiar with flexbox in css ended up actually being fun to play! This two player game starts with each player having a different colored set of 8 cards. Each card will have random points distributed around its corners and sides - these points may range from 0-2. The players take turns setting a single…

Read More

Cleaner complex IF Statements

Cleaner complex IF Statements

So you have this long if statement that's relatively simple in design but ugly to the eyes and somewhat hard to read. if(x1>=img.left&&x1<=img.left+img.current.width&& y1>=img.top&&y1<=img.top+img.current.height&& x2>=img.left&&x2<=img.left+img.current.width&& y2>=img.top&&y2<=img.top+img.current.height){ img.scaling = Math.pow(x1-x2,2)+Math.pow(y1-y2,2); } //end if What can we do to make it…

Read More

Pigeon Hole Stepping

Pigeon Hole Stepping

For 7DRL this year I developed a new map generation algorithm called Pigeon Hole Stepping. Fill the map with walls This map generation algorithm relies on negative building techniques. This concept will make more sense as the later steps are explained. Dig Hallways Essentially, we can assume that hallways that are parallel to each other are at least the length of a single room and up to two rooms apart in distance. Because of this assumption, we can make a random walker that will move around with this restriction in mind until map is filled completely. Allocate Rooms Assuming the…

Read More

NPM Module: Slush Jugs

NPM Module: Slush Jugs

Last week I updated the npm module slush-jugs to include support for a more robust script compilation system using Webpack inside of Gulp. This will allow us to have a commons module that automatically pulls out any vendor-specific code that might be duplicated across the application and separate it into it's own file. This is also important if we don't want to constantly update cached versions of vendor assets on users computers when all they need to do is update the smaller footprint of the actual application code that was updated. Below are a list of all the changes in…

Read More