{"id":323,"date":"2008-08-25T09:34:32","date_gmt":"2008-08-25T17:34:32","guid":{"rendered":"http:\/\/www.lostvectors.com\/blog\/?p=323"},"modified":"2010-10-11T09:37:18","modified_gmt":"2010-10-11T17:37:18","slug":"dont-forget-to-removeeventlistener","status":"publish","type":"post","link":"https:\/\/www.lostvectors.com\/blog\/2008\/08\/25\/dont-forget-to-removeeventlistener\/","title":{"rendered":"don&#8217;t forget to removeEventListener!"},"content":{"rendered":"<p>Lately I&rsquo;ve been working on the action bar user interface,  skill book, and user profile saving system. The saving system will work  similarly to Bowmaster Prelude in that data is stored to your computer via  Flash Shared Objects. I&rsquo;ve currently finished integrating code that automatically  saves the user&rsquo;s action bar configuration. This may sound exactly how Prelude  worked, but there are new features to BM2 that required some extra programming.  For example, since your skills may have skill-modifications (mods: rapid fire,  multi shot, no-grav), the game saves what current mod is selected for each  skill. So when you use quick keys to switch between multi fire arrow, and rapid  fire ice arrow, the system will know to activate the active mod when switching  between the fire and ice arrows (instead of defaulting to single shot). I&rsquo;m  working tirelessly to ensure the new action bar user interface is as intuitive  and useful as possible.<\/p>\n<p>I&rsquo;ve also played around with some new unit animation  techniques. For example I&rsquo;m planning on having multiple death sequences for the  same unit. Depending on how the unit dies, there may be unique animation  specific to that situation. I&rsquo;m still researching the complexity of  implementing the types of animations I want, but chances are I&rsquo;ll have more  than just a single death animation per unit.<\/p>\n<p>With the action bar, skill book user interface, and profile  saving systems nearly complete I&rsquo;m now starting on code for the Skill Upgrade  Shop. What&rsquo;s different about this shop compared to Prelude is that there will  be certain preconditions that you&rsquo;ll need to meet before you can purchase  certain types of skills. For example, in order to have access to Skill D,  you&rsquo;ll need Skills A, B, and C and with at least hero rank 5. So now it&rsquo;s not  just about how much gold you have. Skill preconditions will add an element of  strategy to the game. The precondition system is similar to the tech-tree systems  found in Diablo or WoW.<\/p>\n<p>Another cool feature of the upgrade shop is that I plan on  having more than just bow shooting and troop building skills available for  purchase. Now you&rsquo;ll be able to purchase such upgrades as hero-stat bonuses and  castle upgrades (e.g. hit point increase). My current skill system allows for  endless possibilities &ndash; I could create a perk that when purchased makes it so  that any time a demon dies it summons a cloud that rains bunnies&hellip; but I&rsquo;ll have  to defer the decision to implement that feature until after I&rsquo;ve completed all  the main game systems \ud83d\ude09 There&rsquo;s also a ton of game-balancing work that will  result from creating all of the upgrades and perks so I make no promises as to  what they will be just yet (the bunny-cloud perk might be too powerful).<\/p>\n<p>I&rsquo;m making good progress these days. Every day I get one  step closer to completion. Right now I&rsquo;m in what might be considered the  &ldquo;boring&rdquo; phase (I find it interesting&hellip; but it&rsquo;s hard to explain  multidimensional arrays and event listeners in an exciting way). This means  that I&rsquo;m working on a lot of the behind the scenes code that make the game work.  E.g. windows management, memory management, physics, maintenance documentation,  system testing, etc&hellip; I&rsquo;m closer than ever before to completing this phase.<\/p>\n<p>The next phase is content creation which is where I switch  modes from &ldquo;application designer&rdquo; to &ldquo;game designer.&rdquo; Content creation means I  start using the existing framework developed during the application development  phase (game engine) as the tool for making the complete game.<\/p>\n<p>This involves such tasks as:<\/p>\n<ul type=\"disc\">\n<li>Upgrade       creation<\/li>\n<li>Spell       creation<\/li>\n<li>Final AI       programming<\/li>\n<li>Graphics,       animation and sound integration<\/li>\n<li>Level       design and game pacing<\/li>\n<li>Game       testing and balancing<\/li>\n<\/ul>\n<p>The content creation phase is where I spend as much time  playing the game as I spend developing. This phase is where I have the most fun  developing too. I&rsquo;m so excited to be so close to this phase because there are  so many new features that the BM2 engine supports. Particularly, the collision  detection system I&rsquo;ve created allows for the most precise detection I&rsquo;ve ever  created for a projectile based game (In my Test Battle, notice how shielded  units can block, but they are still vulnerable at their exposed regions). This  system alone will enable me to create some very interesting enemies.<\/p>\n<p>My elemental system is new an improved when compared to features  in my other games. Having elemental magic is a common theme among many of my  games, but BM2 has the most sophisticated elemental system of all of them. And  my intention is not to make game players have to memorize a complex fantasy  periodic table of elements. The true purpose of the system is to allow for new  types of spells and attacks. Certain spells and abilities the player can use  will be unique to a certain type of magic and will act completely differently  than other spells. &ldquo;Chain Lighting&rdquo; is way different than &ldquo;Poison Plague&rdquo; which  is way different than &ldquo;Flame Wave.&rdquo;<\/p>\n<p>Of course there will be enemies that have elemental  weaknesses and strengths, but I will not severely punish players for making the  wrong choices. Obviously an ice arrow will do less damage to an ice golem but  rather than result in no damage, the other attributes of the projectile will  come into play. For example, if a huge comet hits a tiny ice resistant frog, it  makes no sense to have the frog go unscathed &ndash; the frog should go splat from  the brute physical force of the comet. My damage system considers both physical  and magical attributes between the two colliding objects and determines what  sort of reaction will result.<\/p>\n<p>I could go on and on about the features in the current game engine,  but I won&rsquo;t. Just know that I&rsquo;m excited to start the next phase. Most of my  other game development projects were like hand crafted clay pots &ndash; fun to make  but difficult to modify. For BM2 I&rsquo;m using a different design approach&hellip; It&rsquo;s  more like a Mr. Potato Head*. I spent all this time making the parts (sometimes  I even slapped them together for demo purposes). I have a general idea what the  final product is going to look like. And most importantly, it will be easy for  me to make adjustments. I can&rsquo;t wait to start playing with my new toy&hellip; but not  before I clean my room.<\/p>\n<p>Thanks for your patience. Stay tuned for more news.<\/p>\n<p>-Jason<\/p>\n<p>* Google Image search &ldquo;Mr. Potato Head&rdquo; if you&rsquo;re not  familiar with that toy. You may remember him from Pixar&rsquo;s Toy Story.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lately I&rsquo;ve been working on the action bar user interface,  skill book, and user profile saving system. The saving system will work  similarly to Bowmaster Prelude in that data is stored to your computer via  Flash Shared Objects. I&rsquo;ve currently finished integrating code that automatically  saves the user&rsquo;s action bar configuration. This may sound exactly how Prelude  worked, but there are new features to BM2 that required some extra programming.  For example, since your skills may have skill-modifications (mods: rapid fire,  multi shot, no-grav), the game saves what current mod is selected for each  skill. So when you use quick keys to switch between multi fire arrow, and rapid  fire ice arrow, the system will know to activate the active mod when switching  between the fire and ice arrows (instead of defaulting to single shot). I&rsquo;m  working tirelessly to ensure the new action bar user interface is as intuitive  and useful as possible.<\/p>\n<p> <a class=\"continue-reading-link\" href=\"https:\/\/www.lostvectors.com\/blog\/2008\/08\/25\/dont-forget-to-removeeventlistener\/\"> Continue reading <span class=\"meta-nav\">&rarr; <\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-323","post","type-post","status-publish","format-standard","hentry","category-devlog"],"_links":{"self":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts\/323","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/comments?post=323"}],"version-history":[{"count":2,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts\/323\/revisions"}],"predecessor-version":[{"id":325,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/posts\/323\/revisions\/325"}],"wp:attachment":[{"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/media?parent=323"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/categories?post=323"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lostvectors.com\/blog\/wp-json\/wp\/v2\/tags?post=323"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}