Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 207061 times)

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #570 on: November 27, 2010, 09:57:38 PM »
1) Have everything on one stage script, blocking out the view of the character with the menu, and having one task per stage.
2) Your choice. Using Danmakufu menus is ten times easier, but custom menus are more visually appealing and give you more room to work with (unlockable stages and such).
3) If you're wondering how to make a menu with stages work in the first place, don't worry about the small details like that. It's more of a pain than it's worth.

ふねん1

  • Scientific editor
  • If you're alive, you can always keep moving.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #571 on: November 29, 2010, 01:38:28 AM »
I apologize if no one wants to see a "can't start Danmakufu" post here, but I am at a complete loss here. I'm running Windows 7, and I'm starting up the program through AppLocale, but the computer keeps giving me the "th_dnh.exe has stopped working" message. I followed Helepolis' instructions for installing both Danmakafu and AppLocale to the letter. I tried changing my computer settings to Japanese. I tried deleting the Rumia scripts. I double-checked that I had the most up-to-date graphics card. Nothing seems to work, and Danmakufu doesn't get past that first gray window that pops up before crashing. Even the people I talked to on the chat have no idea what's messing this up. So to the others in here, is there anything else I might be missing somewhere that's preventing the game from starting up?
"Science is more than a body of knowledge. It's a way of thinking." - Carl Sagan

NEW AND IMPROVED YOUTUBE, now with 60 fps Touhou videos! Latest video update: WBaWC Lunatic/Extra no-miss no-bomb no-Roars no-Spirit-Strikes compilation.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #572 on: November 29, 2010, 02:38:16 AM »
-Try opening the game through config.exe. The left-most button starts it. Applocale, etc.
-Try a different th_dnh.exe.
-Restart computer.
-Post screenshot of folder and error details if possible.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

ふねん1

  • Scientific editor
  • If you're alive, you can always keep moving.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #573 on: November 29, 2010, 02:49:32 AM »
Tried your config.exe suggestion, and it got to the main menu! Never knew I could open the program like that, especially since the button was written with all question marks and I couldn't read it. Thanks for the help.
"Science is more than a body of knowledge. It's a way of thinking." - Carl Sagan

NEW AND IMPROVED YOUTUBE, now with 60 fps Touhou videos! Latest video update: WBaWC Lunatic/Extra no-miss no-bomb no-Roars no-Spirit-Strikes compilation.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #574 on: December 01, 2010, 07:33:12 PM »
Has anyone noticed some strange stuff with bullet deletion for CreateShotAs ?

Normally danmakufu handles the fieldboundaries + some pixels as the auto-delete area for any bullet travelling beyond it right? (excluding obj bullets which cannot be destroyed)

When I test my spell card solo, the bullets that leave the screen disappear. How ever if I test the same card during my stage the bullets return back into my screen, stacking up each time. I don't remember putting any code altering the bullet deletion in my stage script. I simply made a curving CreateShotA pattern where bullets being spawned, travel forward while curving and surely leave the screen enough to be actually deleted. Guess what, they return after like 4-5 seconds of travelling.

Don't ask me to post code because it has no use to post 2000 lines of code. So what is going on?
« Last Edit: December 01, 2010, 07:39:14 PM by Helgapolis »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #575 on: December 01, 2010, 08:23:37 PM »
Has anyone noticed some strange stuff with bullet deletion for CreateShotAs ?

Normally danmakufu handles the fieldboundaries + some pixels as the auto-delete area for any bullet travelling beyond it right? (excluding obj bullets which cannot be destroyed)

When I test my spell card solo, the bullets that leave the screen disappear. How ever if I test the same card during my stage the bullets return back into my screen, stacking up each time. I don't remember putting any code altering the bullet deletion in my stage script. I simply made a curving CreateShotA pattern where bullets being spawned, travel forward while curving and surely leave the screen enough to be actually deleted. Guess what, they return after like 4-5 seconds of travelling.

Don't ask me to post code because it has no use to post 2000 lines of code. So what is going on?

It's just Danmakufu being Danmakufu, I guess. For a simple fix, you can try manually setting the auto delete clip with SetShotAutoDeleteClip in the spellcard itself, or in the stage. It seems to default to 64 for all 4 sides according to the wiki, but perhaps that's only in some cases. Maybe mkm screwed up and didn't make the defaults the same in all cases.

(Also, shot objects DO get auto-deleted unless specifically told not to with Obj_SetAutoDelete(obj, false).)
« Last Edit: December 01, 2010, 08:25:31 PM by Blargel »
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #576 on: December 01, 2010, 09:30:31 PM »
I see you got Jazz Flandre as avatar.

Also that indeed fixed the problem. I didn't knew SetShot(ry was saved in Danmakufu memory. If you call it only once in a previous boss/spellcard it will affect the entire game. My afro boss increased the boundaries of SetShot(ry by 300 pixels. orz


Re: Danmakufu Q&A/Problem thread number 4
« Reply #577 on: December 03, 2010, 07:43:30 PM »
So I've been looking through the basics and the first  little bit of the intermediate tutorials, and I'm used to the general CreateShot commands and all that stuff.
And I'm wondering why this isn't working:
Code: [Select]
#TouhouDanmakufu
#Title[Attack Name]
#Text[Attack Description]
#BGM[.\bgm.mp3]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main {
    let frame = 0;
    @Initialize {
        SetLife(1000);
        SetEnemyMarker(true);
SetTimer(60);
MagicCircle(true);
SetMovePosition02(GetCenterX, GetCenterY - 100, 120);
    }

    @MainLoop {
        SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 24);
        if(frame==5){
            CreateShot12(46, 40, 10, 2, -0.5, 1, -20, 10, RED01, 10);
    CreateShot12(400, 40, -10, 2, 0.5, 1, 20, 10, RED01, 10);
    frame = 0;
frame++;
}
if(frame==20){
    CreateShot01(GetX, GetY, 3, GetAngleToPlayer, GREEN01, 10);
            frame = 0;
frame++;
        }
    }

    @DrawLoop {       
    }

    @Finalize {
    }
}

I'm trying to get the RED01's to fire on different frames than the GREEN01's, but niether of them spawn when the script runs, no errors though...
I thought I might have to use alternative/case, but the same nothing happens (though I don't know if I've done this one right...).

Code: [Select]
@MainLoop {
        SetCollisionA(GetX, GetY, 32);
   SetCollisionB(GetX, GetY, 24);
        alternative(frame)
   case(5){
            CreateShot12(46, 40, 10, 2, -0.5, 1, -20, 10, RED22, 10);
       CreateShot12(400, 40, -10, 2, 0.5, 1, 20, 10, RED22, 10);
       frame = 0;
   frame++;
   }
   case(20){
       CreateShot01(GetX, GetY, 3, GetAngleToPlayer, GREEN22, 10);
            frame = 0;
   frame++;
        }
    }

The two separate shots work fine on their own, but I don't know how I'm supposed to get them to work together.

ChiyuriKitashirakawa

  • timesurfingSailor
  • Time is my sea, space my board.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #578 on: December 03, 2010, 08:07:23 PM »
This is sorta silly.
Is there a way to make familiars have more complex movement than shooting them like bullets? I mean, I have some movement scripts on the familiar enemy script,  but they do nothing.

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #579 on: December 03, 2010, 08:24:00 PM »
So I've been looking through the basics and the first  little bit of the intermediate tutorials, and I'm used to the general CreateShot commands and all that stuff.
And I'm wondering why this isn't working:
Code: [Select]
snip

Of course it doesn't work.
The variable "frame" doesn't increment until it has a value of either 5 or 20. Which you never actually make happen.
Fix: put one of the frame++; just after @MainLoop { and delete the other one.

Like so: (i also fixed some teensy "errors")
Code: [Select]
    @MainLoop {
frame++;
        SetCollisionA(GetX, GetY, 32);
SetCollisionB(GetX, GetY, 24);
        if(frame%5==0){
            CreateShot12(46, 40, 10, 2, -0.5, 1, -20, 10, RED01, 10);
    CreateShot12(400, 40, -10, 2, 0.5, 1, 20, 10, RED01, 10);
}
if(frame==20){
    CreateShot01(GetX, GetY, 3, GetAngleToPlayer, GREEN01, 10);
            frame = 0;
        }
    }
« Last Edit: December 03, 2010, 08:26:16 PM by Mewkyuu »

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #580 on: December 03, 2010, 08:34:28 PM »
This is sorta silly.
Is there a way to make familiars have more complex movement than shooting them like bullets? I mean, I have some movement scripts on the familiar enemy script,  but they do nothing.
SetX/SetY? Obj_SetX/Obj_SetY?

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

ChiyuriKitashirakawa

  • timesurfingSailor
  • Time is my sea, space my board.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #581 on: December 03, 2010, 08:35:25 PM »
SetX/SetY? Obj_SetX/Obj_SetY?
I thought of those, but I'm not sure if they can create smooth movement.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #582 on: December 03, 2010, 08:46:36 PM »
task moveshit(angle,speed){
    loop{
        SetX(GetX+cos(angle)*speed);
        SetY(GetX+sin(angle)*speed);
        //change angle maybe
        //change speed maybe
        yield;
    }
}

Something like that.

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Re: Danmakufu Q&A/Problem thread number 4
« Reply #583 on: December 03, 2010, 09:29:16 PM »
Of course it doesn't work.
The variable "frame" doesn't increment until it has a value of either 5 or 20. Which you never actually make happen.
Fix: put one of the frame++; just after @MainLoop { and delete the other one.

Like so: (i also fixed some teensy "errors")
Code: [Select]
fixed code stuff

Thanks for fixing that. Just one question about the fixed one though, what does the "%5==0" in "if(frame%5==0){}" mean? I noticed it doesn't work at (frame==5), which I originally thought would work...

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #584 on: December 03, 2010, 10:19:06 PM »
x%n is the denotation of "x modulus n", where the value is the remainder of x/n (or rather r in the equation x=y*n+r). For example.

3%10 = 3
6%10 = 6
9%10 = 9
10%10 = 0
11%10 = 1
12%10 = 2
40%10 = 0
129641%10 = 1
5%3 = 2
72%3 = 0
6001%3 = 1
80%7 = 3

So when you say if(frame%5==0), you mean you want to execute that code every time frame is a multiple of 5. Since MainLoop runs every frame and you increment frame by 1, every 5 frames that code will execute.
If you just say if(frame==5), the code will execute after 5 frames and then never again unless you reset frame to 0 or somewhere below 5.
« Last Edit: December 03, 2010, 10:20:56 PM by Drake »

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #585 on: December 03, 2010, 10:58:48 PM »
About the familiars as well: You can use Drake's code for smoother movement or just use SetMoveSpeed03. Many flavours available ze.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #586 on: December 03, 2010, 11:25:21 PM »
x%n is the denotation of "x modulus n", where the value is the remainder of x/n (or rather r in the equation x=y*n+r). For example.

3%10 = 3
6%10 = 6
9%10 = 9
10%10 = 0
11%10 = 1
12%10 = 2
40%10 = 0
129641%10 = 1
5%3 = 2
72%3 = 0
6001%3 = 1
80%7 = 3

So when you say if(frame%5==0), you mean you want to execute that code every time frame is a multiple of 5. Since MainLoop runs every frame and you increment frame by 1, every 5 frames that code will execute.
If you just say if(frame==5), the code will execute after 5 frames and then never again unless you reset frame to 0 or somewhere below 5.

Ok, that makes more sense.
Thanks  :V

Re: Danmakufu Q&A/Problem thread number 4
« Reply #587 on: December 05, 2010, 02:50:25 AM »
Hi,I wondered how to shake the camera in the script version 2,because i can't seem to get it to work well... Also, a friend of mine gave me this:http://www.mediafire.com/?ve8r1y22kpykdny  It has pretty nice things though where could I find the necessary resources?Because they look awesome,thanks already~
« Last Edit: December 05, 2010, 02:54:47 AM by PurpleMagus »

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #588 on: December 06, 2010, 04:55:18 AM »
Hi,I wondered how to shake the camera in the script version 2,because i can't seem to get it to work well... Also, a friend of mine gave me this:http://www.mediafire.com/?ve8r1y22kpykdny  It has pretty nice things though where could I find the necessary resources?Because they look awesome,thanks already~

Shaking the camera is technically impossible with script version 2. The best thing you can do is shake the enemy graphics, the background, the player, and all the bullets (which will have to be shot objects) at the same time with some special set up. I actually wrote something like this before but I lost it. If you are new to Danmakufu, I highly advise to just forget about shaking the camera. It's just an aesthetic thing anyway.

For your second question, I"m not entirely sure what you're asking. If you're asking where to find graphics for your own projects, you'll just have to ask someone to create them for you. However, very rarely will anyone actually help out unless you show them a nearly finished product that just needs graphics. You can always use placeholder images or even steal ZUN's images to use. Of course, the Japanese community doesn't really approve of using ZUN's graphics, but over here we don't really give a damn.
<WorkingKeine> when i get home i just go to the ps3 and beat people up in blazblue with a loli
<Azure> Keine: Danmakufu helper by day, violent loli by night.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #589 on: December 07, 2010, 11:14:53 PM »
So, like, it opens, it runs, then when I press "Single," "All," do to Direction and try to load a script... try to change the script type... it always crashes no matter what I do.  Does anyone know what might cause this and how/if it can be fixed?  Thank You.

Mr. Sacchi

  • All shall be well and all manner of thing shall be well.
  • Not postponed. Not in the end. Not for long.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #590 on: December 07, 2010, 11:30:13 PM »
Applocale, pretty much.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #591 on: December 07, 2010, 11:47:08 PM »
That's all? I tried to get that and it failed to install... 5 times... and I ran it, and it ran (sort of), so I assumed it was fine without.... Guess not, eh?

Mr. Sacchi

  • All shall be well and all manner of thing shall be well.
  • Not postponed. Not in the end. Not for long.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #592 on: December 07, 2010, 11:51:31 PM »
When trying to do anything with japanese things, touhou fangames and danmakufu included, run with applocale, it's pretty much the "ultimate fixer", and I say that from experience *Glares at Genius Of Sappheiros*

Re: Danmakufu Q&A/Problem thread number 4
« Reply #593 on: December 08, 2010, 12:07:57 AM »
There we go. Thanks for the help, took a minute figurin' out why the stupid thing wouldn't install right, but it's workin now. Thanks for the help.

MarielSaen

  • The Youthed Follower of Touhou
Re: Danmakufu Q&A/Problem thread number 4
« Reply #594 on: December 08, 2010, 07:00:15 PM »
Can somebody help me on Danmakufu? I don't know where to get picture files for the characters compatible with Danmakufu, and I don't know what every bit of the code to make the game represents.
When in doubt, know and deathbomb out

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #595 on: December 08, 2010, 08:07:55 PM »
Oy.

Quote
I don't know where to get picture files for the characters compatible with Danmakufu
DMF uses regular GIFs and PNGs (and possibly BMPs but there's no reason to use those).

Quote
I don't know what every bit of the code to make the game represents.
Read the tutorials.

If you don't even tell us what you're trying to do then how are we supposed to help? At least TRY to write some code so we can tell you why it's not working. This is the laziest help post ever.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #596 on: December 08, 2010, 08:09:54 PM »
Not to mention there is an actual Q&A thread...
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Re: Danmakufu Q&A/Problem thread number 4
« Reply #597 on: December 09, 2010, 02:55:20 PM »
Does danmakufu have some standard for spritesheets ? Note that I don't know shit about danmakufu, but I'm thinking about making some "free" spritesheets for practice. (I haven't sprited in a while...)

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #598 on: December 09, 2010, 04:53:56 PM »
png
transparent background is transparent for alpha blend, pure black (0,0,0) is as well, do not use black background for alpha blend if the image is not perfectly opaque
black bg is transparent for add blend as should be obvious, transparency draws as white so don't do that

A Colorful Calculating Creative and Cuddly Crafty Callipygous Clever Commander
- original art by Aiけん | ウサホリ -

Serina

  • Evening Star
  • I like Danmakufu
Re: Danmakufu Q&A/Problem thread number 4
« Reply #599 on: December 09, 2010, 07:28:31 PM »


Well, i don't get it. I checked and all the { and }'s are okay. I tried just to add a { in the DrawLoop and it asks me to add a }. I tried also adding some random {{{ and the script ran, but there was only a hitbox, i was invincible (that's okay because my Missed loop is empty there's only the yield;) and i couldn't shot.
What can I do?