Site Logo

Touhoumon Mystery Dungeon (DEVLOG)

TMD Explorers of Danmakufu

Welcome to my DevLog for my collaboration project with FrenticPony!

What is this Project?

This project is our own Pokémon Mystery Dungeon style Touhou fangame, made in Touhou Danmakufu ph3!
This project is the revival of Pokémon Mystery Dungeon: Explorers of Danmakufu.
As per doujin guidelines, this game will be distributed for free and we will assume all costs associated with commissions.
I plan to update this devlog every day I have done something for the project. As the person who has declared responsibility for the entirety of dungeon creation, I will try to make the game as authentic and fun to play as possible, and of course... lots and lots of strange items and moves.

Table of Contents


September 25, 2015

Today I was bored, so I ended up trying to actually throw items that bounce off of other items properly. However, this involved new CommonData, logic fixes, and the like. But in the end, you can't throw an item and expect it to just land on top of another item. They now bounce to the next tile. But I don't have the two-tile buffer yet, so they will just delete. The buffer will soon be expanded to two pixels, but until then, if a space is completely surrounded by items, any more items thrown will just disappear and will be unretrievable.

But anyways! DEVLOG VIDEO!!!!!

September 23, 2015

After quite a long hiatus, I finally got back to the program. Today's main achievement was throwing items. I first had to fix a minor issue (...easy to fix, but actually quite major) with my framework,. Then I worked on animating the throw. So that's all good now, although you can still throw two items to the same location - I'll fix that soon. Hopefully.

The other major happening was in regards to sprites. I began spriting Reimu, and although the first version left a few things to be desired, with the help of some other LOCAA members, I made the sprites not-terrible. Achy recommended making the eyes two pixels tall for cuteness purposes. It worked, and the Reimu we have now is animated and cute, though she still lacks a movement animation, attack animations, etc. That'll come later. But for now I no longer have to stare at the red circle with a dot in it. Hooray!

September 11, 2015

Another day of occasional code. I wrote some framework for sleep and invisible/transform/mobile status groups, then enabled the Mobile Spell! I then set the default HP to be the Max HP, so the test player no longer starts from like 1 HP. Player nickname support was added (sort of), and ObjTouhoumon was renamed globally to ObjCharacter for standardization purposes.

I also did some fixes for the Healing Herb (well, just extra messages), and implemented basic thrown item framework, though it is untested.

September 8, 2015

Once again, I didn't plan on doing anything but I ended up doing something. Namely, I took my 16x16 red circle and expanded it into a proper spritesheet (though the current arrangement is not yet permanant). I put little blue dots on the graphics to designate the direction the player is facing, and overhauled the player render code as a result. Anyways, I implemented the facing direction and it eventually worked, so I then went and did some framework changes to better support thrown items. Of course, you can't throw them yet, but that's something I'll be working on.

September 7, 2015

As another day where I din't intend to do anything for the project, nothing really happened. However, Achy got the Poison effect animations, so I quickly took the opportunity to create my first status effect animation! The positioning is a little wacky though and the status condition itself has not been implemented, so we're not exactly there yet.

September 5, 2015

Today was mainly devoted to bugtesting of Ephemeral Unnatural Balance, so I didn't really do anything for TMD. However, I began work on lib_Move, which will hold constants for moves, and will, in the future, do all the damage calculations based on types, STAB, status effects, buffs and debuffs, etc. It will also take care of animating attacks ( the future), and will do a bunch of other things.

September 3, 2015

Today there was more progress! I prepared some new Notify Events because I decided that I could just add new vertices to the tileset spritelist to patch over tiles that changed via Demolition Spell or whatever else may happen in the future. It took a while to work out, but afterwards, I ended up with a perfectly working (hopefully) Demolition Spell that maintains the existing room floor patterns. 2D arrays are not fun.

I made a basic framework for status effects after considering my options - it's going to be part of each Touhoumon, whether they have status problems or not. This way it is easy to manage, we don't need extra objects, and the values are easy to access and change. All changes will be done externally, of course. I am also considering renaming ObjTouhoumon to ObjCharacter but I doubt that will happen anytime soon.

After this, I worked on the item database - an HTML file that will hold information on the items. Will be helpful in the future. And that was when I decided to dump the Rejuvenation Orb. Its purpose was to test the fatigue system and to be an easy-to-implement item. Well, Achy made tea graphics, and those are replacing Apples and Vitamins (most likely). I basically ended up implementing four new items in a matter of like 10 minutes. Hooray!

To close, I have a new devlog video. Enjoy!

September 2, 2015

Progress happened today! Lifebar graphic was made, the provisional leveling system was added, and then I made level and HP displays since the information was actually available. Next was implementing the Healing Herb, which was easy to test because the default starting HP is still 1 out of 30. It was nice to see the HP system actually working on a really generic scale!

Instead of tackling the things I had planned to do since like forever (i.e. background sprite list to fill in all that black, confirmation before whisking you away to the next floor), I decided to implement terrain options. After a really quick and dirty random water placement experiment, I realized that it was suddenly the perfect time to continue working on tileset fixes - the thing I was doing back in like March when I abandoned the project for like 5 months.

In the end, I had some fun. Runesvale went from 4 to 6 floors, with the fifth floor being a sea. Full-floor water, lava, and chasm scenarios were prepared, and I ended up fixing what are hopefully the last problems with the map - I reran the game like 20 times to find any possible errors.

Afterwards, I implemented some basic skeleton stuff in preparation for thrown items and attacks - basically, what direction a given character is facing. And then, it was time for v0.00.00.38 release, which I handed out in the hope of finding as many bugs as possible.

Here's hoping that I get some more things and optimizations done, and we can enjoy another devlog video in the near future!

September 1, 2015

Today I actually implemented item usage. HOORAY!

To be exact, I implemented the Demolition Orb and realized that there are severe limits on 2D Sprite Lists for drawing the tiles because redrawing changes the graphics occasionally. IE there are two types of blank floor graphics, and a random one is chosen at draw time. So redrawing may change the graphic. To counteract this, I may have to create separate sprite lists simply to draw fixed tiles over the existing sprite list in order to not alter the other unchanged tiles.

I also implemented the Rejuvenation Sphere. Hooray. That's all I can do for now except for maybe the Bail Spell, since Status Effects and the basic battle and level/stat systems have not yet been implemented.

August 31, 2015

Another day of not implementing item usage.

...No, really. I didn't implement it. What I did do was prepare an empty Effect Animation Library for when we have lots and lots of pretty animations, and made some messages for the message box. And I fixed fatigue underflow and overflow, so it's no longer possible to have negative fatigue.

Today's crowning achievement (not really) was the new ability to drop items on the ground, swap them, and not be able to drop them if you're in a wall. Doesn't feel like much, but we're getting there. Hooray!

August 29, 2015

As usual, I started the day with no inspiration and ended up doing a lof of work. In LOCAA, I ended up in a discussion about whether a hunger system would be present. I said no, but carefully considered the benefits of such a system - it forces the player to leave the dungeon floor and, as with the wind and lack of Power Points, gives an incentive to only explore so much, and adds a risk/benefit layer to the game. So I implemented a Fatigue system working the same way. Currently, 20 steps gives you one fatigue, so 2000 steps will empty your meter. I have not yet implemented health loss and have not yet capped the fatigue meter, but those things will be done soon. Probably.

I also went back to the inventory menu and decided to fix it up. Instead of 15 items per page, there are now 10, which gives space for the "Inventory" label (not yet implemented) as well as a 2 line box for description text. I set it up, and after some tweaking, it worked pretty well! I had to fix some more inventory bugs, of course, and I also prepared some functions to hold item descriptions.

I rewrote the item determination code from a wall of if/else statements to a random indexed array system as well, which saves a lot of space and in general makes things easier. But by doing this, I felt the urge to make more items. And so I did. I implemented description text for all the herbs I had already planned, and began rolling out new items, although implementation will come much later. First came the herbs and orbs, and then a few new spells which are analogues of the Mobile and Escape orbs, respectively. And of course, I wanted to show off everything I had done, so... DEVLOG VIDEO!

August 27, 2015

Today was devoted mainly to the message box and getting things to work correctly. When I began, the main problem was that I couldn't move Sprite Lists without redrawing them. To keep my existing system, I had to make a task that would redraw them. And then the positioning had to be fixed, and then I had to prevent the "PICKED UP XYZ YEN" text from moving out of the box and into the playing field.

It wasn't fun, but I got things done.

Afterwards, I decided to fix the horribly broken inventory screen, which had item names rendering off of it because I never implemented multiple pages. Anyways, I fixed that. It took a while, but the cursor moved correctly afterwards. And then I worked on the message for picking up items.

Let's say that I didn't expect it to work with colors. BUT IT DID. AND IT WAS MARVELOUS. Hooray!

In the end, I never actually implemented the first item, but that's basically next, if you ignore the message confirming that you want to move to the next floor. Oh, and I published a new tag on Bitbucket: v0.00.00.29! Yes guys, we have an official release, though it was only shown to the dev team.

August 26, 2015

Today was another slow day. I wrote some constants in preparation for the new herb items that will replace berries and some seeds, and wrote some more framework for item usage. But not much else. It was basically just creating a file with some empty functions that I will have to fill in sometime in the future.

Anyways, Achy came out with a yin-yang graphic and a new spellcard graphic, so Yin-Yangs imbued with special powers will most likely be this game's equivalent of seeds. Or something like that. I don't really know at the moment.

Now that my classes have started, all my projects will slow down drastically, this included. It's been like a week only but I feel like I've accomplished a surprising amount. At least if this project goes on hiatus again, it will be in a state where making progress is far easier than before.

(You've got to admit though, the yin-yang orb is absolutely adorable, with the red dot looking like an eye and all)


August 25, 2015

As usual, progress slows down when it reaches a boring part. Today, I began working on a message log (for text in-dungeon) but never actually got to implementing and testing it (not to mention that it doesn't yet control text). And then I decided to tackle the items-delete-at-end-of-floor issue, which required me to turn off Object AutoDelete. This took a while, and may still have some problems.

I also dealt with some performance issues and some weird problems, and closed off by preparing framework for item usage (again, not tested) and by deciding names (which may change in the future) for the equivalent of berries (will be using herbs instead). And that's basically it for now.

August 24, 2015

WHOOHOO! Today there was progress!

Basically, I took Frentic's old text code (from the image from the games, not the font), and adapted it to work for my current system. I also wrote code for dynamically shaped text boxes and the like, which was surprisingly easy to do. But of course, I ran into problems.

Actually getting the main menu to work was a problem because the built-in pause system pauses the stage entirely, preventing anything from happening. Additionally, I had no idea what to do with the render target. So in the end, I implemented the main menu completely independently of the pause menu.

However, actually getting items to work... not so easy. Once the main menu was done, I took care of getting the items to render and enter the inventory, where they could be displayed. There's no way to use them yet, however, and they delete when you move to the next floor due to the AutoDelete settings. There is no easy way to fix this, so I will most likely end up turning the AutoDelete... off. It might be a little problematic, but in the end, there's not much I can do. Saving inventory will probably be a hassle as well, though that comes later.

Anyways, got a lot done today. Menus and inventory are on their way to completion, and I will hopefully have a usable, droppable, throwable, and swappable item ready tomorrow!

August 23, 2015

After yesterday's major success, it was time to fix the lagging threads and work on items. I ended up doing a terrible job of spriting, so we'll be using the official item sprites until we have suitable replacements. Anyways...

I ended up fixing a typo in the Random Dungeon Generator which basically fixed all the remaining problems with the existing framework (except for room edge issues, which may or may not exist because I have not yet tested them). But regardless, I did a lot of work with items. Specifically, I made ObjItem, prepared the framework for three types of items (single use, money, and stackables). Hopefully this will last. Anyways, I prepared a lot of render and position framework and also generated the code used to randomly generate and place them in the floor. Unfortunately, all I could really do was money, which I also ended up displaying on the HUD. We'll need a menu with accessible pages of inventory (and probably basic text) in order to have items really work.

All of this being said, we will be replacing orbs with single-use spellcards, and the first to be implemented will most likely be the equivalent of the One-Room Orb (super easy), and maybe Drought Orb and Mobile Orb (will require the Status Effect Object to get somewhere). And those are our short-term plans. AKA might do tomorrow.

August 22, 2015

Simply put, Randomly Generated Dungeons.

YES! We have randomly generated dungeons now, after about 6 hours of intense coding and bugfixing. I had to make a new object (ObjRoom), which took a long time to fix up. I was, by the way, using this link to learn what to do for starters - after the test dungeon, I will try to implement BSP, as that seems to be how the actual creators of PMD made some of their dungeons.

But wow. The fact that the map is a 2D array that is like, rows, then columns (when you view the actual map) was sort of painful. The player movement went flawlessly though, so I was able to test things. But in the end, everything went well until I found my first 2 hour long problem. Basically, my map was no longer a 2D array of tiles, so it wasn't a real object anymore. And so... passing it to a function and editing it in that function meant that the original didn't change. It took me a long time to realize this, but the solution was just saving the map as CommonData. Thank goodness for CommonData.

After the four or so hours it took me to get rooms working, came corridors. And here was where I basically died. 2D arrays, incorrect indexing, Array Index Out of Bounds, error, crash, weird mishaps in code, reflected...

...Basically, it was hell. Anyways, hell passed, and I was able to revel in the fact that I had corridors. HOORAY! There were (and still are) a few minor glitches, but you can actually make it to the stairs. As for moving to the next floor...

Today I would like to thank Infinite Ultima Wave the Great, for his powerful and intelligent discovery of the fact that Danmakufu will not consider a single script in a plural having ended (it can be closed but not ended) unless the Boss's HP is less than 0. And yes, this is a thing. Deleting the boss does not work. You must actually delete the boss with no or negative HP in order for it to work. Of course, this was a time of great suffering. But I persevered (Ultima got pissed too, for good reason), and today I present a DevLog Video!

August 21, 2015

Today I revived the project and WHOOHOO SO MUCH PROGRESS!!!!!

The important thing that happened was me actually getting back to the code. All three of us in the Dev Team sort of knew that doing it with Touhou characters would be much easier. But today I actually went back to the code and *did* stuff!

I changed all the "Poke" to "Touhou" (like, everywhere except for in the image on the STG_Frame), and then began a quick purge before deciding that fixing all possible situations in the map could wait, and that getting the player onto the screen would be more important. It was the correct decision - I made a stupid red circle for the player, then managed to render the player on the screen! Hooray! A few more issues fixed, and then the player was moving! Correctly! At a decent speed! And then... move validity!!!

...OK, I'll admit that fixing corners was far scarier than it actually was. In the end, there were a dozen or so checks and everything worked. At least with characters incapable of flying or anything. Still don't know what would happen if a player tried to leave the screen. Should probably fix that.

But after the elation of having a player move, the FPS was absolute crap, and I finally got into gear on converting my 2D array of Tile Objects to a single sprite list. I was scared that it would screw up somewhere.

Somehow, I was spared all agony, because the entire thing went off without any problems at all, except for the staircase screwing up because a sprite list can only be made from one texture. But the FPS was still abysmal, so... I almost gave up.

However, during a conversation with Ultima on if there was a container smaller than a Primitive Object, like a struct... I realized that there was. A Tile Object, so far, only had coordinates and a type. So why not make them integers instead of objects.

I began working. And changing and deleting. I was surprised that the only usage of tiles in the entire game was actually their terrain value. I saved, ran the program... and...

First try. 60 FPS. All collision and graphics working. Perfectly.

Major Success.

Devlog Image

In the near future, I hope to be able to obtain new images for the stairs, warp, and shop tiles so that they're all original, and hopefully get Achy to sprite a few characters so that we can get somewhere. The plot and style of the game have yet to be determined, but I think we're ready to implement basic items now. Fingers Crossed!

(btw, we have a Bitbucket repo for this project now. It's Bitbucket because Github is Open Source and I don't want any resources being stolen at this stage of the game)