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

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #720 on: January 10, 2011, 12:28:31 AM »
It would be great if you actually posted your script instead of us having to guess what your mistake is.

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

KuraiShoka

  • Now son, don't touch that cactus...
  • Son, I Am Dissapoint
Re: Danmakufu Q&A/Problem thread number 4
« Reply #721 on: January 10, 2011, 12:33:36 AM »
It would be great if you actually posted your script instead of us having to guess what your mistake is.

whoops, forgot to do that :V
http://pastebin.com/vCYQ69j4
« Last Edit: January 10, 2011, 12:54:12 AM by KuraiShoka »

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #722 on: January 10, 2011, 01:55:18 PM »
whoops, forgot to do that :V
http://pastebin.com/vCYQ69j4

I can't say how kosher and/or efficient this solution really is, but adding the following if-statement between the ceiling and wall detections did it for me.

Code: [Select]
else if(angle>0&&y>GetClipMaxY&&x>GetClipMinX&&x<GetClipMaxX)
{
if(count>0){TReflectionLaser(x, y, v, -angle, maxLen, width, graphic, 0, count-1);}
break;
}

Basically reversing the check on 'angle' and 'y' while using the ClipMax instead of ClipMin.
« Last Edit: January 10, 2011, 01:58:35 PM by MasterSpark »

Re: Danmakufu Q&A/Problem thread number 4
« Reply #723 on: January 10, 2011, 06:00:21 PM »
What's the secret to a pretty bullet?  Mine look like a kindergartner playing with construction paper, only without the charm.

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #724 on: January 10, 2011, 09:21:24 PM »
What's the secret to a pretty bullet?  Mine look like a kindergartner playing with construction paper, only without the charm.

You'll have to define "pretty bullet" a bit more for me. If you're talking about bullet patterns and arrangements I'll suggest that you practice by replicating your favourites of ZUN's patterns. If you're going for the real thing you'll have to pay attention to and find solutions for all of the minute detailing that the man puts into his work, things that are easily overlooked otherwise. That's what I'm doing at the moment, anyway. Hopefully it'll start to rub off on me enough that I'll be composing pretty things myself at one point or another.  :derp:

Re: Danmakufu Q&A/Problem thread number 4
« Reply #725 on: January 10, 2011, 09:33:21 PM »
I'm talking about the sprites.  Looking at the existing bullets I think my biggest problem might be using the alpha channel more creatively and somehow getting that glowy aura going.  How do you get a glowy aura on your bullet sprite?

TheMasterSpark

  • Lunatic lemurialist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #726 on: January 10, 2011, 09:38:41 PM »
Oh. That's currently out of my field, but you could try to use DMF's ADD blending instead of Alpha. I've heard and/or read that it's the one to use for transparent (ie glowy) bits and doo-dahs.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #727 on: January 10, 2011, 09:39:22 PM »
I'm talking about the sprites.  Looking at the existing bullets I think my biggest problem might be using the alpha channel more creatively and somehow getting that glowy aura going.  How do you get a glowy aura on your bullet sprite?
I don't know much, but what I do know is this:

If you want alpha-blended bullets, you need to modify the transparency values of the image and surround the bullets with 100% transparent pixels.
If you want glowy add-blended bullets, you need to cause the differences in brightness and transparency through color darkness and the bullets have to be surrounded by 0/0/0 color.
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."

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #728 on: January 10, 2011, 10:31:20 PM »
You're basically just asking "how do I draw well," which nobody can answer. Just keep practicing.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #729 on: January 10, 2011, 10:46:48 PM »
I suppose you're right.  But all the bullet sheets (the defaults and the replacements in the threads) have a sort of familial similarity that I can't put my finger on.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #730 on: January 11, 2011, 09:53:50 AM »
What kind of shot(s) make(s) Shou's non-spell lasers? They all seem to have two colors.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #731 on: January 11, 2011, 01:31:29 PM »
What kind of shot(s) make(s) Shou's non-spell lasers? They all seem to have two colors.

You mean, CURVING LASER ? omg get in the car

Quote
CreateLaserC
These lasers are usually seen only in Perfect Cherry Blossom, namely against Letty Whiterock or Merlin Prismriver. I'm talking about those annoying curving lasers... or at least they're annoying when Merlin uses them. These lasers are very heavy on the processor so use them sparingly (i.e. don't have fifty of them out at once). However, if you've mastered controlling ShotAs and LaserAs, this will be really easy for you to use. The parameters for CreateLaserC are exactly the same as those of CreateLaserA and the parameters for SetLaserDataC are exactly the same as those of SetShotDataA. In other words, LaserCs are pretty much ShotAs with a tail following them.

read more here

http://www.shrinemaiden.org/forum/index.php/topic,30.0.html

and there's something about Sinuate laser

http://dmf.shrinemaiden.org/wiki/index.php?title=Object_Control_Functions#Sinuate_Laser_Object_Functions
Hey There !

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #732 on: January 11, 2011, 05:09:28 PM »
One thing to know about curvy lasers in danmakufu, both LaserCs and Sinuate laser objects:

In their case, the "length" value you give them is not actual length in pixels.
The end of the laser moves by its speed value every frame, and the rest of the laser, its "tail", so to speak, consists of many singular points, all of which take the position that the piece in front of them had last frame every frame. Danmakufu then calculates the graphic and hitbox of the laser based on these singular points. This is also why they are so expensive on the processing power and should be used sparingly.

The "length" parameter of a curvy laser in danmakufu is actually the number of the singular points the laser is made of. This means that the actual length is dependant on the speed of the laser, since that is the distance between two points on the laser. It also means that if you increase the speed of the laser it will become longer, as well as the other way round.

Also, please only use bullet graphics for curvy lasers (actually, for lasers in general, but here it is even more important) which have a clearly visible outline when add-blended. The bubble bullets work quite well for this, but most bullet graphics don't.
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 #733 on: January 12, 2011, 12:20:45 AM »
Is the hate for curving lasers because they're hard to predict, because they're hard on the processor, both, or neither?  Any other patterns/components that should be avoided?  Besides the brofist script.

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem thread number 4
« Reply #734 on: January 12, 2011, 05:55:57 AM »
Is the hate for curving lasers because they're hard to predict, because they're hard on the processor, both, or neither?  Any other patterns/components that should be avoided?  Besides the brofist script.

The hate is for the unpredictability and unreadability of a lot of them -- especially Shou's.

As for bad ideas in attack design, a lot of it is opinion, but here's what I think you should avoid:
 - Too many add blended bullets. Additively blended images layered on top of each other get brighter and brighter so with a lot of bullets, it just becomes a blob of unreadable whiteness.
 - Puzzle/pathfinding gimmicks. Unless it's a game like StB or a Last Word or something. Attacks that you have to figure out by dying repeatedly in order to dodge correctly is just a cheap shot in a full multi-stage game.
 - Curvy bullet spam. Curvy bullets are just as bad as curvy lasers. Maybe even worse because you cant see the trail as easily to help identify the trajectory. I would straighten out the bullets before they reach the bottom 1/3 of the screen
 - Super fast bullets. Common sense, I'd think.

In general, I like to believe that attacks should be able to be beaten the first time they're played if the player is skilled enough. Attacks that cannot be beaten unless you've played them before aren't fun to me. Of course, what "skilled enough" means is entirely up to you.
<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.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #735 on: January 12, 2011, 06:59:56 AM »
- Too many add blended bullets.
Just to note, the main problem is that overlapping bullets make it more difficult to process in the brain since there are no edges between the bullets. You can do as GFW did, and have bullets that are both add-blend AND alpha. Another factor is that it is more difficult to track trajectories with low-contrast areas (talking bullet-to-background), so the bullets should be fairly visible on your BG.

- Puzzle/pathfinding gimmicks.
A few, especially in an Extra stage-ish setting, are okay. A very good exception I can name off is Green Eyed Monster, Parsee's midboss card.

- Curvy bullet spam.
Going to add that slow curvy bullets can be good, and curvy bullets that you don't have to actively dodge are also fine. It's when you have to constantly process the bullet's trajectories (especially at fast speeds, incl. curvy lasers) that it gets confusing. Worth mentioning in this case are pretty much all off Yuyuko's cards. PCB as a whole has many good cards with curving bullets.

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

Re: Danmakufu Q&A/Problem thread number 4
« Reply #736 on: January 12, 2011, 11:54:30 AM »
Okay thanks :)
« Last Edit: January 12, 2011, 12:10:26 PM by baka36 »

Re: Danmakufu Q&A/Problem thread number 4
« Reply #737 on: January 13, 2011, 07:20:48 PM »
For Obj_IsIntersected, what counts as an "Attackable target"?  That is, what makes it return true?

EDIT:  Actually, let me just state the problem:  How do I act on two objects intersecting each other, given that neither object is a player or an enemy?  Do I really need to write my own collision detection from scratch?
« Last Edit: January 13, 2011, 07:29:43 PM by Tubercular Ox »

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #738 on: January 13, 2011, 07:36:59 PM »
For Obj_IsIntersected, what counts as an "Attackable target"?  That is, what makes it return true?

EDIT:  Actually, let me just state the problem:  How do I act on two objects intersecting each other, given that neither object is a player or an enemy?  Do I really need to write my own collision detection from scratch?
Are they bullets/lasers? If so, you can call Obj_SetCollisionToObject(obj, true); after the creation of the object to enagle collision detection against other objects. You then can check for their collision using Collision_Obj_Obj(obj1, obj2). However, this will require that the IDs of the objects you want to collide be stored in a way that they can be accessed by the other bullets, usually meaning: You need to create an array at the beginning of script_enemy_main{ } in which you store the IDs of the objects, and you need to insert code in each object that removes its ID from the array. Then you can check for collision between any of those objects by refering to the places their ID have in the array.
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 #739 on: January 13, 2011, 08:21:51 PM »
I can do what I need to with that, thank you.  However, I have to ask... does it only work with bullets/lasers?  Is there a way to do it with an effect object?  And what does IsIntersected do then?

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #740 on: January 13, 2011, 08:40:11 PM »
However, I have to ask... does it only work with bullets/lasers?  Is there a way to do it with an effect object?  And what does IsIntersected do then?
I don't have a clue.


Oh, and I just noticed that one sentence in my post is missing important information: The code that removes the object ID from the array is supposed to be at the point where the object is destroyed, not before then.  :derp:
I usually do that by putting it in the object task behind the while(Obj_BeDeleted(obj)==false){ } brackets, so it runs automatically when the object ceases to exist before the task completely expires.
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."

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #741 on: January 13, 2011, 09:24:18 PM »
Don't be so intimidated by "writing your own collision function from scratch." It's really easy if you know the math. Assuming you want circle-to-circle collision, Pythagorean Theorem is your friend:
Code: [Select]
if( (x1-x2)^2 + (y1-y2)^2 < (radius1+radius2)^2 ){theobjectscollided;}(x1,y1) is the position of the first object and (x2,y2) is the position of the second. Radius is obvious.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #742 on: January 14, 2011, 01:19:02 AM »
Plan A failed.  Plan B requires a way to get the player's hitbox.  Is this possible?  I'm not seeing an easy way on the list of misc functions.  Otherwise I'm just going to take a callous attitude towards "thin" characters like Reimu.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #743 on: January 14, 2011, 01:27:04 AM »
The default Reimu and Marisa players have the same size hitbox, which is 0. Most custom player characters follow this example.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #744 on: January 14, 2011, 04:58:55 PM »
Is there a page for sprites like there is for shotreplace?  I want to steal a fairy sprite.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #745 on: January 14, 2011, 05:17:37 PM »
Lots of sources here. Keep in mind that making your own sprites is grossly prefered to stealing somebody elses, so if you publish your work or whatever try to make your own or commission somebody to make some for you.

Re: Danmakufu Q&A/Problem thread number 4
« Reply #746 on: January 14, 2011, 05:20:16 PM »
I'm commissioning, but he can only draw so fast (and only in his free time).  And I can only afford so much.

capt. h

  • Only sane townie
Re: Danmakufu Q&A/Problem thread number 4
« Reply #747 on: January 14, 2011, 08:07:25 PM »
I installed app local, I'm using the right language pack, and danmakufu is still crashing whenever I try to run it. I also can't find the shortcut I created to run danmakufu. Is there something I'm missing? I'm running Windows 7, and I followed the guide here: http://www.shrinemaiden.org/forum/index.php/topic,4138.0.html

EDIT: I think the problem is that I'm running the program straight, instead of in compatibility mode. I'm not sure how to run it differently though.

EDIT: Sorry. figured it out. Is there an english patch? I'm having some trouble navigating the program. I cannot get this thing running without crashing. I need to do compatibility mode while running it with apploc. I have no idea how to do that.
« Last Edit: January 14, 2011, 08:15:57 PM by capt. h »

RavenEngie

  • Now how'm I supposed to stop those mean ol' Mother Hubbards from tearin' me a structurally superfluous new behind? The answer, use a gun. If that don't work...
  • Gaming-Obsessed Illusionist
Re: Danmakufu Q&A/Problem thread number 4
« Reply #748 on: January 14, 2011, 08:19:17 PM »
It goes:
> All (All scripts)
> Single (Single Spellcards)
> Plural (Bosses)
> Stage
> Random
> Directory (Opens up your "script" folder in the program, so you can navigate to the file you want)
> Exit

... Also, does 'Directory' seem to load faster for anyone else than the other options?
WALUIGI BACK! NOW THIS SIG IS FUNNY AGAIN!
Mah arts! :3

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #749 on: January 14, 2011, 08:24:13 PM »
Of course Directory loads faster, it doesn't load every script at once.

Also.

http://alcahest.perso.sfr.fr/perso/apploc/applocpatched.zip

Download that, replace the applocale exe in C:\Windows\AppPatch.

http://alcahest.perso.sfr.fr/perso/apploc/localejaptoexecontext.zip

Download that, run the install reg file.

Right click th_dnh.exe, Properties. Compatibility Mode, change stuff.

Restart comp, right-click th_dnh.exe, Locale Japanese.

All problems solved.

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