forum

Anyone on Danmakufu?

posted
Total Posts
1
Topic Starter
Winek
Does anyone here like Danmakufu? For those who don't know what it is, its a program to create Touhou games, but is extremely complicated to understand due to the hand-scripting stuff.

Here's a typical handmade by myself exemple of danmakufu script:

// This is a comment. Any line containing "//" will not be readed by Danmakufu, only by humans.
#TouhouDanmakufu [Single] //This allow the program to actually read the script. If it's not here, The script won't be loaded on Danmakufu. It is required.
#Title [Insert Title] // You can insert a title for the spell/stage or whatever.
#Text [Insert shitstorm] //You can give some information about your spell or whatever.
#BGM [folder\mp3] //The BGM for your spell.
#Player [FREE] // A bit complicated, but as long as it's as FREE then every player you have can be played.
#ScriptVersion [2] //Required. Orelse the spell won't work.

script_enemy_main{ //Where everything starts.
let frame = 0;
let BossImg(folder\Image);
let BossCutIn(folder\Image; //You can notice that i'm placing ";" at each end. If there were none, all those line would be read as only one. They seperate.
// let is a command that allows a faster way to load many think. Instead of going all the way into my folder to search image, i just use "BossImg"


@Initialize{ //That's the location where the spell starts by giving us some infos.
SetLife(400); //Obviously gives life to the boss. Without it the boss won't enter and there will be a simple destruction animation.
SetTimer(5); //Again, Obviously set a timer. If there is none, it's infinite.
Load(BossImg); //Load the boss's picture.
BossCutIn; // Same as upper but load the CutIn instead.
//Add other stuff here.} //Also notice that @Initialize and all the other @ are part of script enemy main.

@MainLoop{ //Where the bullets are shooted n etc.
frame++; //Dunno but it loads the frame or whatever.
if(frame > 600 && frame % 10 == 0){
CreateShot(GetX,GetY,3, GetAngleToPlayer, RED01, 10);}
// Okay first for the "if" statement.
//Here, the frame needs to be superior to 600 to start the CreateShot01(see later). Note that there is 60 frame in 1 second. That should be 10 second.
// && means "and" so the frame must be superior to 600 AND % 10 == 0. frame % 10 == 0 means that each 10 frames, a bullet will be shooted.
// It could be modified many way, such as "frame % 80 == 30" then this means that in 80 frames, when the 30th one is reached, the bullet is shot.
//Now about out CreateShot01. Note that Danmakufu is case-sensitive. We have 6 parametres. X,Y,velocity,angle,graphic,delay.
//X and Y are where it should spawn. GetX and GetY means they will spawn directly on the boss.
//Velocity is simply the speed. 3 is an average speed for a bullet.
//Anlge is on which angle the bullet is shooted. GetAngleToPlayer means the bullet will shoot at the player. (not homing)
//Graphic is something else, for now stick with RED01, which create a red average size bullet (RED being the color and 01 being the graphic).
//Finally delay is how much time will there be before it is shot. Having 0 will be shot immediatly. You guess what it is for 50.

} //Closing the @MainLoop
} // And closing the script enemy main. Never forget this, orelse there will be problems ~

//There is supposed to be some more, @Drawloop and @Finalize.. Drawloop is just to draw stuff, and Finalize to delete SE, Img and stuff.

Hope you like Danmakufu o3o
Please sign in to reply.

New reply