Thursday, October 15, 2015

Programming Philosophy

Binary: What does it mean to be?
Early days of computing (Assembly, Fortran, Basic, C): What does it mean to be good?
C: What did you say?
Java: What do you mean?
Perl: What does this mean?
Javascript: What does "this" mean?
Danmakufu: What the ...?

*rimshot*

Saturday, June 13, 2015

Oh shift!

This is package.dnh, a Danmakufu source with nearly 1199 lines. Look at the shift key on the heatmap.

Wednesday, April 1, 2015

Updates on Nightmare of Torrential Precipitation

For a while, I've been working on Nightmare of Torrential Precipitation, a full, completely original game written in Danmakufu! Yeah, that's right: 9782 lines of unadulterated Danmakufu code.

Unfortunately, due to a show-stopping bug, the release of the next demo will have to be delayed to April 4. We apologize for your inconvenience.
In addition, the Japanese translator for NTP has redacted his offer to translate the game due to a heated argument, and a mistake with another user has caused me to be "permanently suspended" from LOCAA, as Sparen had told me the other day. Moreover, I have been temporarily banned from MoTK due to participating in a flamewar, and KermMartian, founder of Cemetech, has explicitly refused to pardon my account.
Furthermore, due to megahomework over spring break from my Spanish teacher, I might not be able to develop NTP that much during that period, and I have been accused of raising a crowdfunding campaign for the (still extremely-WIP) Project Youmu engine.
On the bright side, the anti-crowdfunding policies of Touhou Prono are hereby repealed, given that not everyone wishes to be a "starving artist".

Everything in this post except the first two sentences and this one is an April Fool's prank; happy belated April Fool's day!

Sunday, February 22, 2015

How to make added strings works with regular strings

If you see my UTF-8 reader, you can see that I managed to make it compatible with regular strings. Line #69 is the key here, and I'll reproduce it for you:
return ToString(res);
Yes, if you use ToString, then the result will be completely compatible with regular strings!

Saturday, February 14, 2015

/r/DNHTIL

TIL that if you try to yield in @Initialize, Yukari will gap into your house and eat your brains.

Rectangle Horror

Thanks to Achy from LOCAA.

"the one above has a correct rect, and the one below should have a pixel from the bullets next to it stuck on it." - Achy

Wait, I don't get it. Is the top really supposed to look like that, or did you mess up the order? Probably the latter.

Elaboration:

For the red one I have (1,1,9,9)
but those 9's, other bullets are starting on them
so why are pixels from them not showing up>
[02:11:59] Achy: And with the orange one above...
(9,1,16,8)
the bullets on screen are 8x8

Wednesday, February 11, 2015

More about string adding

For the ignorant

I hoped that the behavior mentioned in my previous post could be the way to get around wonky Unicode reading in mkm's binary file functions until pre7 is finally released.
But arithmetic operations on strings returns a completely different type of string incompatible with ordinary strings. So ("A" + "!" - "A") == ("A" + "!" - "A") returns true, but ("A" + "!" - "A") == "!" gives an error.
So mkm can write a great danmaku engine, but he can't get typing quite right.

Tuesday, January 27, 2015

WARNING!

From benign phenomena and whimpy errors to deadly crashes, the pitfalls of Danmakufu make it far from the safest place in Gensokyo. Heed the messages of these signs to prevent yourself from being hurt.










Want to make your own? Use this image!

Sunday, January 25, 2015

WTF Danmakufu

Drag the image to your tab bar (who the heck is still using a browser without tabs?!) to see it full-size. Beware; my monitor is huge.

Needless to say, the fix was to move the event body into a separate task.

Saturday, January 24, 2015

Crash!

I was testing out Nightmare of Torrential Precipitation after some changes.

I got the title, screen, and tried to start a game. Danmakufu didn't even freeze; it just gave up. No error message, and nothing in the log.

I knew it wasn't forgetting to yield. It's something else, like mistakenly using index for a variable name. I opened up Git Bash, and grepped to try to search for such cases. Didn't see anything unusual about that.

It might be a buffer overflow since the scripts might be too long due to large files included. I created a test script that defined a long string of Yukari. Worked fine, even if I tried to print it in the log.

Okay. What might it be? I looked at the log file, and saw that Danmakufu did load the background and the digit graphic, but nothing after those two. I also noted that I changed the TPIV task to exit when the hidden mode was activated.

I put a WriteLog call both before and after the main part of the definition:


task TPIV {
 WriteLog("Zenki");
 if (isHidden) {return;}
 let objScore = ObjText_Create();
 ObjText_SetText(objScore, "SEeS");
 ObjText_SetFontSize(objScore, 20);
 ObjText_SetFontBold(objScore, true);
 ObjText_SetFontColorTop(objScore, 200, 200, 255);
 ObjText_SetFontColorBottom(objScore, 255, 255, 255);
 ObjText_SetFontBorderType(objScore, BORDER_FULL);
 ObjText_SetFontBorderColor(objScore, 0, 0, 0);
 ObjText_SetFontBorderWidth(objScore, 1);
 ObjText_SetFontType(objScore, typeface);
 Obj_SetRenderPriority(objScore, 0.01);
 ObjRender_SetX(objScore, 428);
 ObjRender_SetY(objScore, 254);
 let objNum = createNumberObject(496, 254);
 WriteLog("Goki");
 loop {
  ObjSpriteList2D_ClearVertexCount(objNum);
  updateNumber(objNum, getPIV, 8, 1);
  yield;
 }
}

And Zenki showed up. No Goki, though. I tried the same, just around the conditional return, and the same result. It must be with the isHidden function!

function isHidden {
 GetAreaCommonData("Replay", "Hidden", false);
}

Wait, no return? Let's change that:

function isHidden {
 return GetAreaCommonData("Replay", "Hidden", false);
}

And thus the script didn't crash.