Author Topic: ※ Danmakufu Q&A/Problem thread 3 ※  (Read 476460 times)

R. P. Genocraft

  • Craftsman of absolute unpredictability
  • Boundary of productive and lazy
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1410 on: July 01, 2018, 12:23:01 PM »
I'm trying to make a spell with seven patterns that come in random order, but the initial order keeps repeating for the duration of the spell. It's not working though, and I can't figure out why:
Code: [Select]
let number = [0,0,0,0,0,0,0];
loop{
while(number[0]==number[1]||number[0]==number[2]||number[0]==number[3]||number[0]==number[4]||number[0]==number[5]||number[0]==number[6]){
number[0] = floor(rand(1,8));
}
fire(number[0]);
number[6] = number[5];
number[5] = number[4];
number[4] = number[3];
number[2] = number[1];
number[1] = number[0];
yield;
}
"fire()" is the function that calls the patterns from 1 to 7.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1411 on: July 01, 2018, 01:02:17 PM »
So you want every pattern definitely to appear but only once and the order is random each time you boot up the spell card?

R. P. Genocraft

  • Craftsman of absolute unpredictability
  • Boundary of productive and lazy
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1412 on: July 01, 2018, 02:29:30 PM »
So you want every pattern definitely to appear but only once and the order is random each time you boot up the spell card?
Yes, basically. Sorry if I explained it badly  :V

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1413 on: July 01, 2018, 03:42:10 PM »
If I understood the problem correctly, it's that there's no number[3] = number[2]; in your script, so it just stops recording values further than the 3rd slot.

R. P. Genocraft

  • Craftsman of absolute unpredictability
  • Boundary of productive and lazy
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1414 on: July 01, 2018, 05:10:01 PM »
If I understood the problem correctly, it's that there's no number[3] = number[2]; in your script, so it just stops recording values further than the 3rd slot.
...Thanks, it worked. Wow, I feel so dumb now.

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1415 on: July 01, 2018, 08:52:32 PM »
fisher-yates

Code: [Select]
let number = shuffle([0,1,2,3,4,5,6]);

function shuffle(a){
  let j; let tmp;
  descent(i in 1..length(a)){
    j = floor(rand(0, i+1));
    tmp = a[i]; // swap i and j
    a[i] = a[j];
    a[j] = tmp;
  }
  return a;
}

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

Gregory

  • I draw stuffs
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1416 on: July 02, 2018, 05:21:26 AM »
How can I change the icon and an executable th_dnh.exe of my own that's not relevant to the original exe ?

7636kei

  • The Stardust Jannisary
  • You hear about that thing down in Samothrace?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1417 on: July 03, 2018, 09:21:44 PM »
So, is there any clue to why would the history not advance from 00/xx even after I managed to have the spell captured?
Exhibit 1, captured immediately after capturing the spellcard shown in Exhibit 2.
Exhibit 2, snapped after the capture, in both sense, that is Exhibit 1.
The entire budding work, I guess.

(BTW, if it gets released, Warusame is meant to stay in the final work. The gist of the plot is that Tsurubami [as in LE's Tsuru], the local admiral, hires the Gensokyan PC as a mercenary for 'questionable operations' to keep their shipgirl's hand clean from said questionable operations. Considering abyssals and danmaku don't [canonically] mix~)
« Last Edit: July 03, 2018, 09:33:24 PM by 7636kei »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1418 on: July 03, 2018, 11:24:10 PM »
So, is there any clue to why would the history not advance from 00/xx even after I managed to have the spell captured?
Exhibit 1, captured immediately after capturing the spellcard shown in Exhibit 2.
Exhibit 2, snapped after the capture, in both sense, that is Exhibit 1.
The entire budding work, I guess.

(BTW, if it gets released, Warusame is meant to stay in the final work. The gist of the plot is that Tsurubami [as in LE's Tsuru], the local admiral, hires the Gensokyan PC as a mercenary for 'questionable operations' to keep their shipgirl's hand clean from said questionable operations. Considering abyssals and danmaku don't [canonically] mix~)

Please provide a MINIMAL, complete, and verifiable example. What you're asking is not clear at all - what do the two screenshots have to do with spell history? What library are you using?

Additionally, while it's nice that you're enthusiastic about your project, it has nothing to do with your question, so please focus on providing the details of the question rather than whatever your project's plot is.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1419 on: July 07, 2018, 08:24:06 AM »
If I'm corect, there is some programmes to make 3D backgrounds for danmakufu (like in the sample), but I don't remember the names. What are they? And is there any english tuturials for them?

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1420 on: July 07, 2018, 01:55:20 PM »
Code: [Select]
//Anything Before?

case(EV_REQUEST_IS_LAST_SPELL){
//What I need to do here, to make a LastSpell?
}

//Anything After?

Please explain how to make a Last Spell, like IN (Hit => end)
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

R. P. Genocraft

  • Craftsman of absolute unpredictability
  • Boundary of productive and lazy
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1421 on: July 07, 2018, 02:07:37 PM »
How exactly does ObjMove_SetDestAtWeight calculate the slowing down? Is the weight how long it takes to slow down? Or maybe the distance to the destination when it starts to slow down?

Asking this because apparently Danmakufu crashes if you delete bullets while this funtion is active, so I'm going to create my own.

Jimmy

  • Shameless spender
  • gaining big pounds
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1422 on: July 07, 2018, 05:33:26 PM »
Code: [Select]
//Anything Before?

case(EV_REQUEST_IS_LAST_SPELL){
//What I need to do here, to make a LastSpell?
}

//Anything After?

Please explain how to make a Last Spell, like IN (Hit => end)

Just put this code in @Event and insert SetScriptResult(true) and it should work.
Basically, these event types (including survival spells) only need a boolean to be activated.
Normal 1cc: EoSD, PCB, IN, PoFV, MoF, UFO, TD, DDC, LoLK Legacy, HSiFS, WBaWC
Hard 1cc: IN, DDC, HSiFS
Extra clears: MoF, DDC, HSiFS, WBaWC

Goals: Going Extra Hard!

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1423 on: July 07, 2018, 05:51:45 PM »
How exactly does ObjMove_SetDestAtWeight calculate the slowing down? Is the weight how long it takes to slow down? Or maybe the distance to the destination when it starts to slow down?

Asking this because apparently Danmakufu crashes if you delete bullets while this funtion is active, so I'm going to create my own.
The algorithm for ObjMove_SetDestAtWeight is
Code: [Select]
if dist < maxspeed * weight :
  speed = dist / weight
else :
  speed = maxspeed

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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1424 on: July 07, 2018, 09:04:15 PM »
If I'm corect, there is some programmes to make 3D backgrounds for danmakufu (like in the sample), but I don't remember the names. What are they? And is there any english tuturials for them?

If you're talking about the meshes, then it's Metasequoia (mqo) and Elfreina (.elem) for making them - both are Japanese, but some programs (Blender?) may be able to export to mqo.

Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1425 on: July 08, 2018, 06:40:52 AM »
Ok, thanks

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1426 on: July 08, 2018, 04:13:56 PM »
Hi,

What's the best way to get the ID's of shot objects within a rectangular area?
This is assuming that the rectangle is of any orientation, but the coordinates of the corners of the rectangle are known.

7636kei

  • The Stardust Jannisary
  • You hear about that thing down in Samothrace?
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1427 on: July 09, 2018, 11:07:58 PM »
Please provide a MINIMAL, complete, and verifiable example. What you're asking is not clear at all - what do the two screenshots have to do with spell history? What library are you using?

Alright, here goes: minimum known working, trimmed off gtbot's sample script, and minimum known borking, trimmed off my card. (I used gtbot's cutin script on both fullscale and minimum knowns, btw. Also, it appears to me that the cutin script have trouble tracking survivals.)

(Having said that, most of the delay was from recovering out of borked HDD :(
I was bloody lucky I uploaded my entire script to mega, even if it ends up criticised because it's certainly not a minimal example. Mostly because the zip contains pretty much my personal custom (mostly mathematical and movement-task) lib.)

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1428 on: July 10, 2018, 01:48:59 AM »
What's the best way to get the ID's of shot objects within a rectangular area?
This is assuming that the rectangle is of any orientation, but the coordinates of the corners of the rectangle are known.
What is the context? There is a general-purpose answer but it might be simpler based on what you're actually trying to do.

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

Chronojet ⚙ Dragon

  • The Oddity
  • 今コソ輝ケ、我ガ未来、ソノ可能性!!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1429 on: July 10, 2018, 02:54:20 AM »
Hi,

What's the best way to get the ID's of shot objects within a rectangular area?
This is assuming that the rectangle is of any orientation, but the coordinates of the corners of the rectangle are known.

What is the context? There is a general-purpose answer but it might be simpler based on what you're actually trying to do.

I'm supposing creating a StB-like engine. I don't have the exact math on me as I post this, but:
Assuming you don't need to take the radii of bullets into consideration (i.e that you simply wish to detect whether the center of a certain bullet is inside a rectangular area), since that requires the logic easiest to figure out, you'd need the following procedure:


Suppose ma and mb are the midpoints of a1 and a2, and of b1 and b2, respectively. Then M is the midpoint of ma and mb, thus being the center of the rectangle in question.
So then, you'd have an infinite line marked in red (it's not shown on the diagram, but let's call it L) intersecting ma and mb, and point P2 is the point on L that is closest to P, which is your bullet.

To check whether the bullet is in the rectangular area, check for two things:
  • that the distance between P and P2 is no more than the distance between ma and a1 (or a2 -- they're the same, as well as mb and b1 or b2)
  • that the distance between P2 and M is no more than the distance between M and ma (or mb.)

There's probably an error somewhere in there, but hopefully someone will have detected it before I get home.

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1430 on: July 10, 2018, 07:09:30 AM »
What is the context? There is a general-purpose answer but it might be simpler based on what you're actually trying to do.

The context is in fact a replication of StB-like behaviour, specifically looking at spell cards in the Sp Stage of Double Spoiler. In other words, I'd like to immediately delete the enemy bullets that happen to be within the rectangle at a given moment.

That said, I'm also interested in extending this concept to changing a bullet's property (eg: aim) when it is caught within this rectangle at a specified frame. The lasers used by the Prismriver Sisters come to mind as a hypothetical example.

I'm supposing creating a StB-like engine. I don't have the exact math on me as I post this, but:
Assuming you don't need to take the radii of bullets into consideration (i.e that you simply wish to detect whether the center of a certain bullet is inside a rectangular area), since that requires the logic easiest to figure out, you'd need the following procedure:


Suppose ma and mb are the midpoints of a1 and a2, and of b1 and b2, respectively. Then M is the midpoint of ma and mb, thus being the center of the rectangle in question.
So then, you'd have an infinite line marked in red (it's not shown on the diagram, but let's call it L) intersecting ma and mb, and point P2 is the point on L that is closest to P, which is your bullet.

To check whether the bullet is in the rectangular area, check for two things:
  • that the distance between P and P2 is no more than the distance between ma and a1 (or a2 -- they're the same, as well as mb and b1 or b2)
  • that the distance between P2 and M is no more than the distance between M and ma (or mb.)

There's probably an error somewhere in there, but hopefully someone will have detected it before I get home.

Thank you.

From my understanding of this method, it seems that this is simulating a rotational transformation of the rectangle so that x and y displacement can be measured independently. Given that the rotational offset of the rectangle is known, is there a way to get the distances |P-P2| and |P2-M| as trigonometric expressions of the coordinates of P, relative to M, without calculating the coordinates of P2?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1431 on: July 14, 2018, 01:44:03 AM »
I'm going to just drop a bunch of stuff because I wanted to explain it all and implement it myself.

The general point in polygon problem has a bunch of different solutions. Here is one based on the winding number; the number of times a curve wraps around a point. Basically, if you look at any polygon in terms of a bunch of edges going in a sequence and wrapping back to the first point, you can say a point is inside the polygon by counting the winding number. If it's 0, the point is outside. This used to be computed by taking angles from the point to each of the polygon's vertices, adding them up, and if it's 360 then it's inside (winding number of 1). But this is expensive because of trig functions and stuff. Instead you can do the following:



Here you look at an imaginary ray coming from the point, and check where it hits the edges of the polygon. If the edge (moving clockwise around the polygon) is going upwards when the ray crosses it (i.e. the point is on the left-hand side of the edge) the winding number decreases, and if it's going downwards when the ray crosses it (the point is on the right-hand side of the edge) the number increases. Note by left-hand and right-hand I mean relative to the edge in the direction it's "moving". You can see in the picture what's happening, and it's pretty simple here because it's just a rectangle. The same thing applies; if the winding number isn't 0 the point is inside.

Code: [Select]
// `poly` is an array of points like [[x1,y1], [x2,y2], [x3,y3], [x4,y4]] where edges connect between two adjacent points
function is_collided_polygon(x, y, poly){
  let wn = 0;
  poly = poly ~ [poly[0]]; // connect edge from last to first vertex
  ascent(i in 0..length(poly)-1){
    if(poly[i][1] > y){
      if(poly[i+1][1] <= y){ // ascending edge crossing point
        if(point_edge_side(x, y, poly[i][0], poly[i][1], poly[i+1][0], poly[i+1][1]) < 0){ // point left-hand of edge
          wn--;
        }
      }
    }else{
      if(poly[i+1][1] > y){ // descending edge crossing point
        if(point_edge_side(x, y, poly[i][0], poly[i][1], poly[i+1][0], poly[i+1][1]) > 0){ // point right-hand of edge
          wn++;
        }
      }
    }
  }
  // winding number of 0 iff point outside polygon
  return (wn != 0);

  function point_edge_side(px, py, ax, ay, bx, by){
    // AB.x * AP.y - AB.y * AP.x
    return ( (bx - ax) * (py - ay) - (by - ay) * (px - ax) );
  }
}

Calculating which side the point is relative to an edge is done with the perpendicular dot product which is just some multiplication. Look into it yourself if you want to know how that works.



So this works for checking collision just fine, but this was a general solution for polygons with however many sides and doesn't take advantage of the fact that you're using a rectangle. So you can do better.

The next solution is a modified version of a sort-of-common collision algorithm for checking polygon-polygon collision that is based on SAT, the Separating Axis Theorem. You can read more about this algorithm here or here. Essentially the gist is that if you can fit a line anywhere between the two polygons they aren't collided. This is then equivalent to finding that if you have imaginary axes parallel to all the polygons' edges, and if any of the projections (like shadows) of the polygons on each of those axes aren't overlapping, they aren't collided, and if they are overlapping on each projection they are collided. Check the above links for some extra visual examples.

The main benefit to this here is that 1) you can simplify one of the polygons to a point which has no axes to check, and 2) the other polygon is a rectangle where the opposing sides would have the same axes, and so you only have to check two.



See that here the red lines are the projections the rectangle makes on its own axes. The green point's projection is within the rectangle's projection on both axes (so it's collided), but the blue point fails on one of them (so it isn't collided).

Code: [Select]
function is_collided_rect(x, y, poly){
  return is_point_projected_line(x, y, poly[0][0], poly[0][1], poly[1][0], poly[1][1])
      && is_point_projected_line(x, y, poly[1][0], poly[1][1], poly[2][0], poly[2][1]);

  function is_point_projected_line(px, py, ax, ay, bx, by){
    let abx = bx-ax;
    let aby = by-ay;
    let proj = (px-ax)*abx + (py-ay)*aby;
    let magn = abx*abx + aby*aby;
    return (proj > 0 && proj < magn);
  }
}

How exactly this is done is by checking if the length of those projected lines is between 0 and the rectangle's own projection. Doing the vector projection can be read about here and here, again requiring some dot products. One other optimization is that while you want to be checking for 0 < (AP . AB) / |AB| < |AB|, getting the magnitude of AB needs a square root so it's better to compute 0 < (AP . AB) < |AB|^2 instead, or 0 < (AP . AB) < (AB . AB) as done in the code.



One last thing is that for both of these methods you can try to cut down the number of times this specific collision checking occurs by only checking points that are within the smallest bounding box that surrounds the rectangle. You only have to compute what the bounding box is once and then use it for all the other checks so it speeds things up by a lot.

You can get all the complete code for these two methods here.
« Last Edit: July 14, 2018, 01:48:55 AM by Drake »

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

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1432 on: July 14, 2018, 08:21:54 PM »

I'm going to just drop a bunch of stuff because I wanted to explain it all and implement it myself...


Thank you very much for taking the time to share this. It shows some very interesting methods and is a real eye-opener.

So to follow up with a question which I suspect has a relatively straightforward answer:
I notice that you use an array to store the vertices of your polygon, whereas I am currently defining variables within a function to store the vertices, angle and size of the rectangle. Is it preferable to use an array?

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1433 on: July 15, 2018, 06:42:29 AM »
I use an array here partially because the first method generalizes to polygons with however many vertices, and partially because I didn't want the function call to have a ton of extra coordinate parameters. Some more things to consider:

After looking at it again, you can optimize the SAT method further because a bunch of the values can be precomputed (the AB components and AB ∙ AB). This looks really ugly but cuts computation down enough to be useful. You can then pass these precomputed values in as more parameters, but this method is basically efficient enough that the copying of the function's arguments done when calling the function ("passing by value") bogs down the gains. So it's best to leave them out of the function definition and let the scope take care of things.

Relatedly, this probably meshes just a bit better with the existing stuff you have since you're already computing all the other stuff about the rectangle.

Then, last thing is that I dunno what you're doing to get the list of bullets to check against. In testing I just used raw points; this would be as though I already have a list of all bullets to run through. Because DNH doesn't have something to do that, and I assume you don't have your own bullet management system, you might be tempted to use GetShotIdInCircle over the whole screen or something. What you can do instead, or what you might have already thought of, is to find the half-length of the rectangle's diagonal (sqrt(width^2 + height^2)/2) and then only retrieve the bullets in that radius around the rectangle (the circle circumscribing the rectangle). This pass is basically the same step as the bounding box thing, and if you were already going to use GetShotIdInCircle over the screen anyways and then try to cut that down further, the choice is obvious. In the code below I instead define the rectangle around that size, but that isn't really important.

Here's a complete setup that does basically everything; you can adjust to your setup if you want:

https://gist.github.com/drakeirving/98b64b6023f9e7bec02e60e308ead131
« Last Edit: July 15, 2018, 06:47:10 AM by Drake »

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

Kinedyme

  • Dream Magic - Duplex Spark!
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1434 on: July 16, 2018, 08:55:35 PM »
I use an array here partially because the first method generalizes to polygons with however many vertices, and partially because I didn't want the function call to have a ton of extra coordinate parameters. Some more things to consider...


Thanks for the explanation and advice.
If there is no benefit for this particular case, I'll probably stick to the way I'm doing it for this script, just to keep all my functions consistent for now. For my case, the measurement only happens once, and the rectangle has fixed size and dimensions. Hence you could say that I'm using 'magic values' that are defined within the function rather than inputting them as parameters. This practice is not frowned upon within the danmakufu community is it? (^_^; )

As for getting the list of bullets, I do in fact use GetShotIdInCircle() at the centre of the shape where the diameter is equivalent to the long diagonal on the rectangle, which seemed easiest for my case, wherein the size is constant but the angle is variable. I can think of other ways to do it, but since they all have to make use of GetShotIdInCircle() at some stage, they always must be more complex. The only other method I can think of is adding bullets to a global list at the time they are fired, which feels like something of overkill for my needs. Is there another method that is useful to know?

JDude :3

  • tururu
  • boy with code
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1435 on: July 16, 2018, 09:59:11 PM »
Is there a way to scale the image of a bullet, in a custom shotsheet, without having to change the original picture?
"dnh is hard" - said no one
"dnh is bullshit" - everyone making a creative pattern

Drake

  • *
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1436 on: July 16, 2018, 10:12:14 PM »
All that's fine; whether you use this stuff yourself or not isn't really important. I defined the rectangle in terms of that length mostly because it's already the radius of the bounding circle, and I assume for purposes like StB-style photos the size of the rectangle might be whatever.

Yes, for the broad-phase detection there is that tradeoff between using a circle and a bounding box, as the circle detection is more expensive but the bounding box can sometimes have more to check if the angle is right. But like we both realize if you have to use GetShotIdInCircle anyways there's no reason not to piggyback off of that.

Unfortunately yeah the other main option is to manage the shot IDs yourself. This isn't super difficult at its most basic, but managing a list of objects that might be deleted at any time, and doing so efficiently, can be troublesome, and usually not really worth the effort unless you want to really really do it.

Is there a way to scale the image of a bullet, in a custom shotsheet, without having to change the original picture?
No. Is there any reason you want to do this, when you can just resize the image in a graphics editing program?

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

HumanReploidJP

  • The Scripter with Something of Common Sense
  • "Start the life of an idol! Let's get STAR~ted!"
    • HumanReploidJP's Youtube Channel
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1437 on: July 17, 2018, 03:40:03 AM »
So I've seen either of these videos: https://youtu.be/geTVIgDEO-Y?t=369 -/- https://youtu.be/oDJpkTZQOiA?t=916 , and I want to know what implements the slashing effect that cuts off the screen/stage frame and even the bullets (kinda like Yaorochi's sword cutting off the screen during the true final spell scard from Len'en 2).

Can you give me a detail and how is it implemented in coding? I want to know so that I can learn it.

Anyone out there, please respond, thank you.  :wat:
« Last Edit: July 17, 2018, 03:43:06 AM by HumanReploidJP »
MiraikeiBudoukan (Futuristic Vineyard) Game Concepts (WIP)
(Non-Touhou, yet bullet-hell-Inspirable (Like JynX). Don't get serious.)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1438 on: July 17, 2018, 04:05:24 AM »
So I've seen either of these videos: https://youtu.be/geTVIgDEO-Y?t=369 -/- https://youtu.be/oDJpkTZQOiA?t=916 , and I want to know what implements the slashing effect that cuts off the screen/stage frame and even the bullets (kinda like Yaorochi's sword cutting off the screen during the true final spell scard from Len'en 2).

Can you give me a detail and how is it implemented in coding? I want to know so that I can learn it.

Anyone out there, please respond, thank you.  :wat:

You snap a render target of the background layers and turn it into two primitive objects that you move in opposing directions. You will want to put a layer of black underneath the sliding primitive objects to cover the original background, which will need to transition to the original background afterwards.

Note: For reference, I think gtbot did this sometime a few years back along with a replica of Yabusame's bomb effect.

HumanReploidJP

  • The Scripter with Something of Common Sense
  • "Start the life of an idol! Let's get STAR~ted!"
    • HumanReploidJP's Youtube Channel
Re: ※ Danmakufu Q&A/Problem thread 3 ※
« Reply #1439 on: July 17, 2018, 01:27:45 PM »
You snap a render target of the background layers and turn it into two primitive objects that you move in opposing directions. You will want to put a layer of black underneath the sliding primitive objects to cover the original background, which will need to transition to the original background afterwards.

Note: For reference, I think gtbot did this sometime a few years back along with a replica of Yabusame's bomb effect.

(Update) Oh... I get it now. Thanks.
« Last Edit: July 18, 2018, 12:59:10 AM by HumanReploidJP »
MiraikeiBudoukan (Futuristic Vineyard) Game Concepts (WIP)
(Non-Touhou, yet bullet-hell-Inspirable (Like JynX). Don't get serious.)