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

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #390 on: September 28, 2010, 01:13:43 AM »
you can't seperate parameters with a '-' , Danmakufu reads it as parameter minus another parameter. At least I think thats it, when I do that it works until the next thing-like-this comes up.

And what Bluely Blue said as well
reread parameters for atan2 again plz

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

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem thread number 4
« Reply #391 on: September 28, 2010, 01:24:22 AM »
It turns out the actual problem was the names of all the variables.
The name "zero-angle" reads as "zero" - "angle."

Re: Danmakufu Q&A/Problem thread number 4
« Reply #392 on: September 28, 2010, 04:03:06 AM »
reread parameters for atan2 again plz

atan2(y2-y1,x2-x1);

Okay, so I worded it wrong, he was dealing with Variables which were not set, my bad.
And besides, I was talking about it not being able to separate the variable, not subtracting numbers

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #393 on: September 28, 2010, 04:05:07 AM »
K, we both screwed that up then :V

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

draganuv15

Re: Danmakufu Q&A/Problem thread number 4
« Reply #394 on: September 29, 2010, 03:26:43 PM »
how do you open danmakufu's config?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #395 on: September 29, 2010, 04:08:01 PM »
doubleclick it

Some people apparently need to open it with applocale, so try that. It also apparently takes a while to boot up.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #396 on: September 29, 2010, 04:35:31 PM »
And/or Right-click->Properties->Fiddle with Compatibility.

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

draganuv15

Re: Danmakufu Q&A/Problem thread number 4
« Reply #397 on: September 29, 2010, 09:12:14 PM »
thanks for suggestions, i got it working  :3

gabrielwoj

  • Is that someone did a 2D Touhou?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #398 on: September 30, 2010, 03:27:18 PM »
Well, I want to try some "mods" and test it...
But, opens normally, if I open ANY option on the game, it crashes...
Win 7 64bits...
Already tried compatibility...
Image on the Avatar by: xephonia-d35lvsi

Re: Danmakufu Q&A/Problem thread number 4
« Reply #399 on: September 30, 2010, 09:37:20 PM »
Applocale. Also, read stickies.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #400 on: October 01, 2010, 08:57:16 AM »
Have anyone here tried to replicate Utsuho's great balls of sun-fire? I want to create something like it but with other aesthetics, but I am unsure how I should proceed with it. Here are the components, obtained from Drake's projects thread:

Purple Sun
Sun Darkness
Sun Aura
Sun Frame

I imagine that the blob of actual colour can be treated like an Object Bullet, and then have the other bits drawn above and under it. Can Object Effects/drawing be applied on top of an Object Bullet's graphic?  :o

Edit: Also, if anyone happens to know in which order the above parts should be applied, that would be great too.
« Last Edit: October 01, 2010, 09:36:00 AM by MasterSpark »

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #401 on: October 01, 2010, 09:44:58 AM »
Have anyone here tried to replicate Utsuho's great balls of sun-fire? I want to create something like it but with other aesthetics, but I am unsure how I should proceed with it. Here are the components, obtained from Drake's projects thread:

Purple Sun
Sun Darkness
Sun Aura
Sun Frame

I imagine that the blob of actual colour can be treated like an Object Bullet, and then have the other bits drawn above and under it. Can Object Effects/drawing be applied on top of an Object Bullet's graphic?  :o

Edit: Also, if anyone happens to know in which order the above parts should be applied, that would be great too.
http://i902.photobucket.com/albums/ac221/MasterSpark89/PurpleSun.png
http://i902.photobucket.com/albums/ac221/MasterSpark89/PurpleSun-1.png
You edited your url :V
your "Purple sun" and "Sun Aura" is from the extra bosses shields when you bomb :V

Anyway, you could assemble your sun graphic into a single image file like this image (stolen from blagrel)

and fire the entire thing as an Obj_Effect.
Finally, call SetCollisionB(Obj_GetX(sunobject),Obj_GetY(sunobj),sunhitboxradius); every frame.
Unless I'm missing the entire point here  :ohdear:

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #402 on: October 01, 2010, 09:54:29 AM »
Oh, so only the "Sun Darkness" and "Sun Frame" bits are needed? But where does the red colour come from in the original work?

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #403 on: October 01, 2010, 10:19:15 AM »
Oh, so only the "Sun Darkness" and "Sun Frame" bits are needed? But where does the red colour come from in the original work?
you need to alter the color.
In danmakufu if you use ObjEffect_SetColor(obj,vertex,a,r,g,b);
you can tint your sun in a certain color.
But you're better off coloring your sun before shoving it into danmakufu since danmakufu's coloring sucks
here's my attempt at coloring suns in danmakufu
http://www.youtube.com/watch?v=TQidMmMmWeQ&t=5m20s
Of course they're blue because (9)

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #404 on: October 01, 2010, 10:56:09 AM »
you need to alter the color.
In danmakufu if you use ObjEffect_SetColor(obj,vertex,a,r,g,b);
you can tint your sun in a certain color.

...I knew that.

 :V

Anyway, the point here is that I want to recreate Utsuho's suns, but have them purple and with them getting gradually darker closer to the center.

Thanks for your help, you've really given me something to go by here. :)

GenericTouhouFailure

  • WHAT DO YOU MEAN IT'S NOT CALLED UNL? *boom*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #405 on: October 01, 2010, 11:18:46 AM »
...I knew that.

 :V

Anyway, the point here is that I want to recreate Utsuho's suns, but have them purple and with them getting gradually darker closer to the center.

Thanks for your help, you've really given me something to go by here. :)
Ugh. Its not easy to judge a person's skills by their posts :3

You should assemble them layer by layer in photoshop or something, black background.
shove in danmakufu. Effect object, add blend, etc etc.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #406 on: October 01, 2010, 03:08:45 PM »
Well that took all of thirty seconds.



EDIT: Just so you know, you won't be able to actually make the bullet "darker" towards the center. Since it's add-blend, the center will just become increasingly transparent. If you need any further adjustments just ask.

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

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #407 on: October 01, 2010, 03:21:10 PM »
The input is appreciated, though I've already made a Purple Sun to use. I think I'll expand the dark middle area somewhat though, it kind of looks like a Purple Donut more than anything else at the moment.

Purple Sun

Anyway, is there no way to escape a transparent appearance, such as by using a black colour that isn't really quite pitch black? I'd like for the Sun's sphere to remain solidly coloured.

Edit: Perhaps a solid image could be drawn underneath the Sun's graphic to preserve the integrity of its core?
« Last Edit: October 01, 2010, 03:25:35 PM by MasterSpark »

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #408 on: October 01, 2010, 03:25:22 PM »
You'd need both an alpha image and an add image. While that's perfectly doable, you'll need a copy of the image with a transparent background and one with a black background. If you can't do the transparency thing, I can.

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

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #409 on: October 01, 2010, 03:27:57 PM »
Oh I can fix that.  :]

I should remove the glowing aura from the Alpha image though, shouldn't I? since that's the one thing that I actually want to appear transparent in the final product.

Edit: Oh and... which one of them should have the transparent background?  :blush:
« Last Edit: October 01, 2010, 03:37:57 PM by MasterSpark »

draganuv15

Re: Danmakufu Q&A/Problem thread number 4
« Reply #410 on: October 01, 2010, 04:00:28 PM »
i have another question, how do you change the skin of danmakufu ( the part of the screen holding the lives and that )

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #411 on: October 01, 2010, 04:05:13 PM »
i have another question, how do you change the skin of danmakufu ( the part of the screen holding the lives and that )

Ooh, I know that one. Add a PNG image to the 'img' folder in your Danmakufu root directory - the place where you find the custom.exe and all that. Have the image at the dimensions 640x480 and name it STG_Frame, and it should work. :)

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #412 on: October 01, 2010, 04:21:17 PM »
Oh and... which one of them should have the transparent background?
Alpha-blended images contain an R,G, B and A value for each pixel. The A value determines transparency, and for danmakufu (0,0,0) denotes a transparent pixel as well as pixels that already have an alpha channel of 0. Because of this, an image whose pixels all have an alpha channel of 255 are perfectly fine with a black background, because all the black disappears and the rest stays without change. However, if an image had a black background and some pixels do not have an alpha of 255, the black combines with the semi-transparent pixels and produces a pixel that is not black, and as such is drawn at whatever that rgb color is, at 255 alpha, instead of having a predetermined alpha channel. Therefore, if you're going to draw an image with any semi-transparent pixels, use a transparent background.

Add-blend images are drawn with the same RGBA values, except differently. instead of drawing the image overtop of other images, it takes each R, G and B value in each pixel and adds it to the R, G and B values of the pixels below it. If an Add pixel was black, it would add 0,0,0 to the pixel below, which is nothing. If the pixel were white, it would add 255,255,255 to the pixel below, which is always 255,255,255. Due to the way DNH handles Add-blend images, it disregards the actual alpha channel of an image, and flats (see formula below) the whole thing to only RGB. Because of this, any transparent pixels are denoted as white, and semi-transparent pixels' RGB values are (value * (alpha / 255)) + (bg value * ((255-alpha) / 255)) instead. Thus, DNH adds those pixels to whatever below, making the whole thing a bright crappy white mess. This is why a black background is needed for Add-images, since when the background is black, (bg value * ((255-alpha) / 255)) = (0 * ((255-alpha) / 255)) = 0, so the RGB values are all added with proper transparency.

:D

Ooh, I know that one. Add a PNG image to the 'img' folder in your Danmakufu root directory - the place where you find the custom.exe and all that. Have the image at the dimensions 640x480 and name it STG_Frame, and it should work. :)
Actually, also due to the way DNH handles images, an image will appear blurred unless the dimensions are both powers of two. Therefore you should increase the canvas size to 1024x512 (to the right and bottom); DNH won't draw the extra.

:D

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

draganuv15

Re: Danmakufu Q&A/Problem thread number 4
« Reply #413 on: October 01, 2010, 04:24:50 PM »
cool, now does anyone know any good stg frames?

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #414 on: October 01, 2010, 04:27:15 PM »
no

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

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #415 on: October 01, 2010, 04:50:05 PM »
Just as a reference, Utsuho's suns use two layers, both add-blended. One is the white center, then there's a pulsing outer red layer. You don't have to do that exactly, but multiple layers really helps add depth to it, especially if they're spinning or pulsing at different rates. Play around with it until you get something you like, and don't be afraid to use more than two effects for a single object.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #416 on: October 01, 2010, 06:07:27 PM »
It's funny that you mention that, Azure, since that's just what I discovered myself as well. I followed Helepolis' tutorial on Object Effects and ended up with this.

The Purple Sun of Xereus

Edit: You'll want to watch this in HD and turn it up to fullscreen. Youtube's really massacred the sharpness.

So far it consists of two Add-blended images spinning in opposite directions, and a lower-layered Alpha image to keep the centre free from transparency. I'm sure I could touch it up by adding some irregularity into the motions, but it's looking pretty spiffy already if I may say so myself.

Thanks for your help guys. :)
« Last Edit: October 01, 2010, 06:09:10 PM by MasterSpark »

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #417 on: October 01, 2010, 06:25:40 PM »
Looks pretty awesome. The only thing I can complain about is the appearing effect. Utsuho always used giant explosions whenever a sun was spawned, so maybe you could do the same thing. You could try making one of the layers pulse slightly, since it's always a neat effect. Something like ObjEffect_SetScale(obj,1+sin(frame)*0.2,1+sin(frame)*0.2); while increaing frame. Though if you continue it, take it to the screenshot/video thread instead of here. Glad you got your problems solved!

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #418 on: October 01, 2010, 06:32:32 PM »
Ah yes, its entry was not on my priority list - I just wanted to get it up and running! Thanks for tipping me about how to make it pulse, I'll be sure to give that a shot.

Thanks again.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #419 on: October 01, 2010, 10:18:49 PM »
Alright, so I've run into another little noodlescratcher regarding my Purple Sun. I'd like for it to start chasing the player around the screen by periodically checking the player's position and then moving itself over there. What would be the best way for achieving this effect? Something like the motion function SetMovePosition03 would be great, as it has a sense of fluidity built into it. Is it possible to "anchor" the Object Effects on top of a script enemy and have them move along with it?

I've tinkered around with the object movement functions but it just won't quite work out for some reason.

Edit: Might spawning the Sun on top of a familiar and then have it keep a track on the enemy's movement every frame and follow it work?
« Last Edit: October 01, 2010, 10:35:47 PM by MasterSpark »