Hello Danmakufu ph3 scripters!
Over the past few weeks I've been tinkering around with Danmakufu a lot more than usual, experimenting with shaders and render targets for my RaNGE 19 Contest Entry, building data structures and implementing bit operators (sort of) in Danmakufu, and more recently, utilizing File Objects.
So today I'd like to announce a new project - DNHAPM, a profiling and game monitoring tool/system/script for Touhou Danmakufu ph3.
What is DNHAPM?DNHAPM is a Danmakufu ph3 script that can be run in any stage/plural/single (recommended that you use a stage). It monitors playthroughs of your script, logs data, and on request, will spit out a report.
What do I mean by report? Well, take a look below!
FPS MonitoringLook at those lag spikes! At the S# notes (spell card declarations), the FPS tanks due to all of the fancy primitive effects in my spell card cutin animation. And the lag spike at 3m20s is probably the boss explosion - enough particle effects to knock any computer below 60 FPS!
But this FPS profiler also catches some less savory issues - gradual FPS drops near the ends of Nonspells 2 and 3. Maybe I should check those out and see if there are objects that aren't being deleted, hmm...
Graze Monitoring70 graze in the first nonspell?! Wow! The graze graph shows which spell cards the player grazed in. Interesting for level design, that's for sure!
Here you can see where heavy grazing occurred, or where grazing was particularly low.
Score MonitoringHere you can see where your players are getting their score from (assuming score is enabled). This will probably correlate strongly with the graze graph, though with spikes for spell card captures, bullet clear bonuses, and other bonuses, like the stage clear bonus at the end.
Enemy Bullet Count MonitoringAnother interesting graph comes our way. With the enemy bullet count graph, you can see every time the player bombs (to an extent), as well as now the bullet count fluctuates over time.
In spells 2 and 3, the peaks are all around the same height - that's really good, since it means that all the bullets are deleting properly. But maybe having 1200 bullets on screen at once is a little problematic? Hmm... the graph still beats dredging through the lag-inducing log window.
Death & Bomb MonitoringThis graph shows where the player died and bombed (image does not show bombs or prior runs). Taking a look at the graph gives a good sense of which parts are the deadliest. Some attacks are easier than others~
User-Defined MonitoringNo graph for this one, unfortunately, as this depends on what
you need. Want to log points? Power? Your custom game-specific feature? If someone's cheating during an all-horizontal script? This is the tool for you
UsageSo what is this, really? It's a tool - for scripters - that takes data from the game and displays it in HTML + CSS + SVG for you to analyze. It's highly customizable, and more features are coming soon!
To use the project, head over to the
GitHub page and go to Releases. The SparenDNHAPM_#.#.tar.gz file contains the project README as well as the .dnh file. The README on GitHub gives the full rundown of the project + configuration and usage and other details, but to summarize here:
- Run the SparenDNHAPM.dnh script via @Loading in your target script
- Ensure that you've configured everything the way you like
- Ensure that you're outputting the report at a good time (DNHAPM requires at least 4 frames of buffer time between calling the event for report generation and closing the stage scene)
- Add annotations in your spells/wherever you want to add notes
- Run! voila!
There are some quirks that are detailed in the README, especially in regards to aggregating multiple runs, but this tool (still in development!) should be helpful to some scripters.
Potential use cases:
- Embed into your release, distribute to beta testers, have them return the .csv files. Run the script on aggregate mode and look for trends in the graph (i.e. everyone is lagging here; something went wrong here; etc). Analyze, fix bugs, and profit.
- Log runs to look for specific ways to optimize/find pain points in your script. For example, there is a bomb & death profiler that logs player deaths and bombs - should be interesting to see where players tend to die.
- ... and many more.
LATEST VERSION: 1.0 [2018 JUL 23]
Have feedback, comments, bug reports, suggestions, etc? Please feel free to post here or create an issue on GitHub. This project is in continuous development and knowing what best helps other scripters make balanced, optimized games will help me tailor the project/add features that benefit the Danmakufu community.
--Sparen of Iria