{"id":282,"date":"2017-08-25T11:00:51","date_gmt":"2017-08-25T19:00:51","guid":{"rendered":"http:\/\/adamantyr.com\/blog\/?p=282"},"modified":"2017-09-19T23:54:01","modified_gmt":"2017-09-20T07:54:01","slug":"putting-it-together","status":"publish","type":"post","link":"http:\/\/www.adamantyr.com\/index.php\/2017\/08\/25\/putting-it-together\/","title":{"rendered":"Putting it Together"},"content":{"rendered":"<p>Hello everyone&#8230; Or like, both of you. Or one of you. Maybe. \ud83d\ude42<\/p>\n<p>I&#8217;ve actually been hard at work on the CRPG for several months now&#8230; After the TI faire I got myself an AMS card, which gives the TI a megabyte of CPU memory to play with. I decided that I wanted to upgrade the CRPG to use it, so that I could do a bunch of things I wasn&#8217;t able to do before.<\/p>\n<p>The biggest pain point with this is the architecture change. Most TI software wasn&#8217;t designed with segment\/module coding in mind, and as a result, there&#8217;s almost no way to write them. A gentleman named Art Green did write an AMS linker way back in 1993, but it&#8217;s a bit heavier than I&#8217;d like, and it would require me to do all my compiling in emulation rather than with an external tool.<\/p>\n<p>So in order to make it work right, I will have to write three different sets of source code, one for each major module in the game coupled with a common module. Then I can compile each module to fit in the original 32K confines, take the compiled code and create the necessary binaries that will be loaded into paged memory. I&#8217;ll also have to write my own custom loader as well&#8230;<\/p>\n<p>This approach will let me do some things I really wanted to do but due to memory constraints couldn&#8217;t. For example:<\/p>\n<ul>\n<li>Double-sized monsters, occupying 4&#215;4 characters. Perfect for large creatures like giants and dragons<\/li>\n<li>Multiple monsters, such as a group of bandits accompanied by a bandit captain and a rogue sorcerer<\/li>\n<li>NPC&#8217;s who can join a party that is under 4 characters in size along your travels<\/li>\n<li>Graphics sets, items, spells and sound effects are all stored in CPU memory for much quicker load times! (I&#8217;ve been spoiled in emulation with extremely fast speeds)<\/li>\n<\/ul>\n<p>Right now, I&#8217;m working on content. I realized I needed to have some actual game content to complete, test, and refine the game engine. So I have divided the game into rough quarters, and am working on the first disk, or 25% of the game.<\/p>\n<p>What have I got done?<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-626\" src=\"http:\/\/test.adamantyr.com\/wp-content\/uploads\/2017\/09\/WorldGraphics-300x229.png\" alt=\"\" width=\"300\" height=\"229\" srcset=\"http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/WorldGraphics-300x229.png 300w, http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/WorldGraphics.png 544w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>Well, the first thing I did was rework the graphics. Now that my TI is setup and running, I was able to re-evaluate them on an actual NTSC screen. I also decided to change my approach and use more colors to make them &#8220;pop&#8221; better&#8230; something MSX games did to very good effect. I&#8217;ve been very pleased with the results! This is definitely a TI game that makes FULL use of bitmap graphics capacity.<\/p>\n<p>I then completed all the maps for the first disk. This was time-consuming, as some hadn&#8217;t really been even drawn on graph paper, and only existed in concept. I also didn&#8217;t want to waste a lot of map space on a map that had only one purpose, so I was removing and adding entries all the while. I also made elevation use an option, so not ALL maps have elevation. This saves some disk space and is more efficient, since most maps don&#8217;t need it.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-627 alignright\" src=\"http:\/\/test.adamantyr.com\/wp-content\/uploads\/2017\/09\/mapexample-300x229.png\" alt=\"\" width=\"300\" height=\"229\" srcset=\"http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/mapexample-300x229.png 300w, http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/mapexample.png 544w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>A big change was I&#8217;ve dropped the idea of storing battle maps on disk. As I increased the terrain types, I realized the battle map file was consuming a ridiculous amount of memory. I was aiming to keep each quarter of the game to fit on a single 180K disk, and the battle maps easily pushed it over. So my plan now is to create battle maps dynamically based on the terrain around the player. I&#8217;m still thinking about that algorithm, but with the added memory it should be doable&#8230;<\/p>\n<p>I also completed all the mobs (mobile objects) for the maps, although many have empty data values for monster tiles and dialogue\/transactions. My goal here was to determine how many mobs I would need, and it worked out about where I thought it would, just over a thousand for 64k of maps. As part of this, I wrote a new tool in C# to create the mob binary coding from text files. This lets me make changes quickly and easily, then just paste the entire block into a binary file.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-medium wp-image-628\" src=\"http:\/\/test.adamantyr.com\/wp-content\/uploads\/2017\/09\/mobfile-300x249.png\" alt=\"\" width=\"300\" height=\"249\" srcset=\"http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/mobfile-300x249.png 300w, http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/mobfile.png 440w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>I&#8217;ve written out all the dialogue for the first disk, although I&#8217;m constantly adding and removing entries&#8230; My compression algorithm wasn&#8217;t quite as effective as I&#8217;d hoped; it averages about 18%. But for now it works pretty well. I&#8217;d have to write some tools to find common words in my actual text blocks if I wanted to try and write a better one. A job for another day&#8230;<\/p>\n<p>I&#8217;ve also decided to make monsters game disk-specific as well&#8230; It just makes sense, monsters are geographically located and if you end up repeating a few it&#8217;s not a big deal. My initial write-up ended with around 84 monsters, but that could go up or down. This is ongoing work because I decided to give monsters a full bitmap color block, which means I have to redesign the graphics to take advantage. I realized that there weren&#8217;t really any good tools to do monsters easily, so I wrote my own! Hopefully I can have some fun with it while I draw them up&#8230;<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright size-medium wp-image-629\" src=\"http:\/\/test.adamantyr.com\/wp-content\/uploads\/2017\/09\/monster_editor-300x229.png\" alt=\"\" width=\"300\" height=\"229\" srcset=\"http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/monster_editor-300x229.png 300w, http:\/\/www.adamantyr.com\/wp-content\/uploads\/2017\/09\/monster_editor.png 544w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/p>\n<p>The next stage will be writing up all the transactions. I have a few done, but it will take awhile to write ALL of them&#8230; and there will be considerable cross-referencing done with the mobs and dialogue on the way, which makes it very time-consuming. I figured I&#8217;d end up with at least 2k (2048) transactions before I&#8217;m done, but it could be easily double that. Fortunately they take up very little space on disk.<\/p>\n<p>Once I have all the game data done, it&#8217;s on to the engine! My plan is to get the Travel module done first, followed by Management (Inventory &amp; transactions) and finally Combat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello everyone&#8230; Or like, both of you. Or one of you. Maybe. \ud83d\ude42 I&#8217;ve actually been hard at work on the CRPG for several months now&#8230; After the TI faire I got myself an AMS card, which gives the TI &hellip; <a href=\"http:\/\/www.adamantyr.com\/index.php\/2017\/08\/25\/putting-it-together\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2,4,5,11,12],"tags":[],"class_list":["post-282","post","type-post","status-publish","format-standard","hentry","category-blog","category-crpg","category-design","category-screenshots","category-ti-994a"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgaeMJ-4y","_links":{"self":[{"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":2,"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":642,"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/posts\/282\/revisions\/642"}],"wp:attachment":[{"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/media?parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/categories?post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.adamantyr.com\/index.php\/wp-json\/wp\/v2\/tags?post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}