Author Topic: ※ Dnh Q&A/Problem ※ for Danmakufu ph3 (locked)  (Read 316080 times)

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #270 on: February 18, 2012, 04:30:17 PM »
When the sound effect has played, and then the time comes when you want to play it again, before that try stopping the previous sound effect.

That would be very annoying. It did work before i reinstalled windows...

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #271 on: February 18, 2012, 07:27:04 PM »
That would be very annoying. It did work before i reinstalled windows...
Well, imma out of ideas :/.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #272 on: February 24, 2012, 03:39:06 PM »
Still having the same problem as six days ago:
I'm having a slight problem with danmakufu (both of them actually). It runs fine, but whenever the same sound effect is supposed to play when the same sound is already playing, instead of ending the old one and playing the new one like it should, the first one keeps playing and the second one isn't played at all.

I haven't experienced this problem with any other program.

The sound effects worked perfectly fine before reinstalling windows XP on my computer. I have tried both with and without applocale, tried looking for newer drivers and redownloading danmakufu, but nothing works.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #273 on: February 24, 2012, 05:07:51 PM »
It sounds like a problem with Danmakufu itself, Try downloading the ph3 b4++ version...

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #274 on: February 24, 2012, 05:28:27 PM »
I don't think that's a problem with Danmakufu if it happens with both versions of Danmakufu. I know for sure that 0.12m should be working and JmLyan says it was working before. Maybe there are some driver issues after the reinstall? I'm honestly not too sure myself, but I'm at least sure that newer versions of ph3 are not likely to solve the problem.
<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: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #275 on: February 25, 2012, 10:11:38 AM »
I have looked for driver updates but it still doesn't work. If the reason is driver issues, how do you solve those issues?

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #276 on: February 26, 2012, 06:50:20 PM »
Can someone give me the X/Y coordinates for the stage frame? What I mean: For example I need the X locations for the top of the stage frame from the furthest left side of the upper stage frame as well as the right side, and also the Y location of it. I also need the positions of the other stage frames (the right one, the bottom one and the left one).

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #277 on: February 29, 2012, 04:00:20 PM »
I've some problems with my ichirin script: http://www.mediafire.com/?dyds8y8p6x4dwpt

Run the plural and you will see what is the hell  :P

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #278 on: March 01, 2012, 11:22:31 PM »
I've some problems with my ichirin script: http://www.mediafire.com/?dyds8y8p6x4dwpt

Run the plural and you will see what is the hell  :P
The designated script could not be found.
Your #include uses absolute pathing, and you most likely moved or renamed the folder that you're trying to get the file from. You could simply update the location to the new location of the file, but I advise against that. To get the current script directory in header paths, use "./"

So to fix this problem, replace all your #includes with this one (assuming you will keep the scripts in their current locations):

#include"./kumoi_lib.txt"

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #279 on: March 04, 2012, 11:00:31 AM »
Thank you very much Gtbot >u<
Hu....Can you explain to me how to make a 3D scroll background please ? >+<

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #280 on: March 04, 2012, 11:24:15 AM »
Thank you very much Gtbot >u<
Hu....Can you explain to me how to make a 3D scroll background please ? >+<
I'm not really sure if you can. PH3 Is still B4++ though. Try something else, like a wavy background?
Okay, im really no help here  :V

gtbot

  • Master of ScreenSplit
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #281 on: March 04, 2012, 04:30:29 PM »
Thank you very much Gtbot >u<
Hu....Can you explain to me how to make a 3D scroll background please ? >+<

There's different ways  of doing this, although I believe the easiest would be to put a 3D texture where you desire and update the source rect each frame to give the illusion that it's moving; for instance:
Code: [Select]
let ypos = 0;
while(true){
    ObjSprite3D_SetSourceRect(3DObjectID, 0, ypos, 256, ypos+256);
    ypos+=4;
    if(ypos > 255){ypos = 0}
    yield;
}

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #282 on: March 10, 2012, 04:07:19 AM »
I know there's some dumb mistake I'm making here, but I don't know what.
Quote
#TouhouDanmakufu[Single]
#ScriptVersion[3]
#Title["SampleA01"]
#Text["SampleA01 - Firing Bullets"]


#include"script/default_system/Default_ShotConst.txt"

let objEnemy;
let frame = 0;
let waitFrames = 0;
let bouncy;
let speed = 3;
let fallSpeed = 1;

@Event
{
   alternative(GetEventType())
   case(EV_REQUEST_LIFE)
   {
      SetScriptResult(500);
   }
}

@Initialize
{
   objEnemy = ObjEnemy_Create(OBJ_ENEMY_BOSS);
   ObjEnemy_Regist(objEnemy);

   let imgExRumia = GetCurrentScriptDirectory ~ "ExRumia.png";
   ObjPrim_SetTexture(objEnemy, imgExRumia);
   ObjSprite2D_SetSourceRect(objEnemy, 64, 1, 127, 64);
   ObjSprite2D_SetDestCenter(objEnemy);

   let cx = GetStgFrameWidth() / 2;
   ObjMove_SetDestAtFrame(objEnemy, cx, 60, 60);
}

@MainLoop
{
   let ex = ObjMove_GetX(objEnemy);
   let ey = ObjMove_GetY(objEnemy);

   if(frame == 60)
   {
      bouncy = CreateShotA1(ex, ey, speed, rand(0,360), DS_BALL_S_RED, 30);
      while(waitFrames<=180){
         let sinSpeed = sin(ObjMove_GetAngle(bouncy))*fallSpeed;
         let cosSpeed = cos(ObjMove_GetAngle(bouncy))*speed;
         let nextAngle = atan2(ObjMove_GetY(bouncy)+sinSpeed,ObjMove_GetX(bouncy)+cosSpeed);
         fallSpeed++;
         waitFrames+=5;
         ObjMove_AddPatternA1(bouncy, waitFrames, speed, nextAngle);
      }
      frame = 0;
      waitFrames = 0;
      fallSpeed = 1;
   }

   ObjEnemy_SetIntersectionCircleToShot(objEnemy, ex, ey, 32);
   ObjEnemy_SetIntersectionCircleToPlayer(objEnemy, ex, ey, 24);

   frame++;

   if(ObjEnemy_GetInfo(objEnemy, INFO_LIFE) <= 0)
   {
      Obj_Delete(objEnemy);
      CloseScript(GetOwnScriptID());
      return;
   }
}
This is my dumb attempt at trying to make a bullet that acts like it's under the effects of gravity.
With the code as-is, every projectile just flies in a random direction for a split second, as intended, then, out of nowhere, flies to about 30 degrees.
Am I just trying to reinvent the wheel, here? I'm just about certain somebody's already done it, at least better than I would.
Also, would there be any easy way to be able to do this with multiple instances of this bullet?

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #283 on: March 11, 2012, 07:36:30 AM »
I see what you're trying to do, but even if it worked, changing the angle every 5 frames seems a bit choppy. You also don't need to pile on 36 patterns every 60 frames (actually it's 37 because of the <= condition), especially since you'll have tons and tons of overlap between every 60-frame segment from 25 of those patterns running at the same times as the new patterns. The angle code doesn't seem like it'll create a gravity effect either, but I can't be sure.

As for multiple instances though, you would make a task that runs in a similar way, then just call the task repeatedly; it wouldn't be hard once you got the one bullet going.

So, you have a static x-speed that relies on the angle the bullet is shot at. Rather, every frame you have ObjMove_SetX(obj, ObjMove_GetX(obj) + cos(angle)*xspeed);. Then you have an initial y-speed that again relies on the angle shot at. But, you also have have a negative y-acceleration that increases by some amount every frame. Or, ObjMove_SetY(obj, ObjMove_GetY(obj) + sin(angle)*(yspeed-yaccel)); and yaccel += 0.1;. This should be the basic outline of "gravity" arcing bullets.

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #284 on: March 12, 2012, 04:25:05 PM »
On 19:55 of http://www.youtube.com/watch?v=85bE4NlzrLE does anyone know how to do a copy of Eirin's spellcard? The part when the bullets get smaller then get bigger.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #285 on: March 13, 2012, 12:04:12 AM »
By manually manipulating a graphic (ObjRender_SetScaleXYZ) and hitbox size (SetShotIntersectionCircle) and the movement every frame rather than actually firing a bullet. That game wasn't made using Danmakufu either, if that needs to be said.

In any case though, I don't suggest doing that because shrinking and growing bullets like that in most cases is just bad pattern design :I

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #286 on: March 13, 2012, 08:00:35 PM »
In any case though, I don't suggest doing that because shrinking and growing bullets like that in most cases is just bad pattern design :I
Yea, i agree. I was just thinking of when the bullet is fired I could make it shrink when it's moving.
With your knowledge, you must've been studying danamkufu for at least 2 years.  :V Either that or i'm a mega newbie.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #287 on: March 14, 2012, 01:33:11 AM »
actually i've been on/off for probably four years lol

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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #288 on: March 14, 2012, 06:49:48 PM »
Oh dear god. The confusing question is coming. AAAAAAAAAAAAA-

I't trying to make a function that will make the desired object pulsate at a speed per frame. But i'm getting spammed with errors. Can someone help me correct this? The function also needs the 'wait' function or else it  will fail even more than me at homework.
Code: [Select]
function pulsate(obj,xsize,ysize,minx,maxx,miny,maxy,xspeed,yspeed){
let signalx=1;
let signaly=1;
ObjRender_SetScaleXYZ(obj,xsize,ysize,0);
loop{ while(signalx==1){
xsize-xspeed;
if(xsize<=minx&&signalx==1){
signalx=0;
break;
}
wait(1);
}
}
loop{ while(signalx==0){
xsize+xspeed;
if(xsize>=maxx&&signalx==0){
signalx=1;
break;
}
wait(1);
}
}
loop{ while(signaly==1){
xsize-yspeed;
if(xsize<=minx&&signaly==1){
signaly=0;
break;
}
wait(1);
}
}
loop{ while(signaly==0){
ysize+yspeed;
if(xsize>=maxx&&signaly==0){
signaly=1;
break;
}
wait(1);
}
}
}

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #289 on: March 14, 2012, 11:42:08 PM »
So, I know there's probably a tutorial for it somewhere, but I'm not sure where, but I'm wanting to know how to make a scrolling background.

Also, in some Danmakufu videos, there were people mentioning sine and cosine functions. How do you apply those?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #290 on: March 15, 2012, 12:03:03 AM »
Oh dear god. The confusing question is coming. AAAAAAAAAAAAA-

I't trying to make a function that will make the desired object pulsate at a speed per frame. But i'm getting spammed with errors. Can someone help me correct this? The function also needs the 'wait' function or else it  will fail even more than me at homework.
http://pastebin.com/NK5gme3w

Fixed the tabbing to something people are more used to seeing. Off the top of my head, just from what I saw while retabbing it, xsize-xspeed; will not actually change the value of xsize. You probably mean xsize -= xspeed;. Also you are using a wait function, which I assume is the one that yields a given amount of times. However you're using a function instead of a task. That may or may not be correct depending on how you're using the function, but chances are you mean for it to be a task.

You shouldn't get any errors from the snippet after those changes, but I'm pretty sure it won't be working as you expected still.
<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: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #291 on: March 15, 2012, 12:07:05 AM »
(Blargel: I thought it was meant to be a task as well, but he's likely applying it inside the passed object's microthread in which case this could be correct)

Ok. First of all you need to realize the wait function is just this:

function wait(n){
   loop(n){
      yield;
   }
}


If you call wait(1); you are doing loop(1){ yield; } which as should be incredibly obvious, is just yield;. Unless you're yielding more than once, please just stick to yield;. It doesn't actually matter (well there is memory allocated for the parameter and herp so i guess it does but w/e), but it just looks uh less incompetent.


Second of all, this is what you are doing:

loop{
   while(signalx==1){
      xsize-xspeed;
      if(xsize<=minx&&signalx==1){
         signalx=0;
         break;
      }
      wait(1);
   }
}


1. You are encasing a while loop inside of an infinitely running loop. Even though you have a break call in there, it should only break out of the while loop, so you're stuck.
2. xsize-xspeed; is invalid syntax, you mean xsize = xsize - xspeed; or xsize -= xspeed;
3. The if condition having signalx==1 in it is redundant since that's the while condition.
4. You don't even need the signals:
while(xsize>minx){
   xsize -= xspeed;
   yield;
}

5. Even if your stuff all worked, it wouldn't visibly change anything because there are no SetScales in there besides the beginning.
6. You probably mean to use ysize instead of xsize in the last two loops.
7. Even if you changed the above, they would not scale at the same time; all it would do is scale the x-dimension down to the minimum then to the maximum, and then scaling the y-dimension down to the min and then to the max.
8. In relation to the above, you'd end up with a max-scaled object since you aren't going back to the original size.
9. Even if everything worked completely as you intended to code it, I doubt it would look as you would want it to since you're just linearly scaling which will look choppy.

IN ANY CASE, there is a much much easier less contrived way to do a pulse scaling (I'm assuming a bunch of things about your objects but this will probably apply):
task pulse(obj, minscale, maxscale, speed){
   let mid = (maxscale-minscale)/2;
   let t=asin(((1-minscale)/mid) - 1);
   loop{
      ObjRender_SetScaleXYZ(obj, minscale + (sin(t)+1)*mid, minscale + (sin(t)+1)*mid, 0);
      t = (t+speed)%360;
      yield;
   }
}


(okay that took too long to figure out and calculate for a general case, whoops)
« Last Edit: March 15, 2012, 05:07:49 AM by Drake »

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #292 on: March 15, 2012, 01:26:37 AM »
http://pastebin.com/ZEJBtABV
http://pastebin.com/gbkCQgey
http://pastebin.com/kb0DncPL

Okay, I fixed that error, but now it crashes lags (0.6 fps! O_O) every time I run it.



Just realized the problem: TOO MUCH DAKKA.

But in all seriousness, I would like to learn how to make more intricate patterns.
« Last Edit: March 15, 2012, 02:31:51 AM by ParallelNebulae »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #293 on: March 15, 2012, 02:36:59 AM »
just to make it clear, you're firing (12)+(12*12)+(12*12*12)+(12*12*12*12)+(12*12*12*12*12) = 271452 bullets

maybe that has something to do with it


Also, you keep reassigning objx to a new bullet so your AddShots (if they worked) will end up adding one bullet to one bullet to one bullet to one bullet to one bullet, rather than all of them like you had probably intended. But even then, AddShot doesn't work with the CreateShot series; you have to build the shots using the object functions.
« Last Edit: March 15, 2012, 02:38:50 AM by Drake »

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #294 on: March 15, 2012, 03:10:12 AM »
What. In any case, I managed to get that spellcard to do something I liked, so I started making another one. And things are going swimmingly.

However, how would you do something like in Philosophy of a Hated Person where the bullets seem to come from offscreen and change what type they are?
Or in Genetics of the Subconscious... Just, the whole orbiting trailing thing...
« Last Edit: March 15, 2012, 03:29:34 AM by ParallelNebulae »

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #295 on: March 25, 2012, 11:44:00 AM »
Stupidest, Questions. EVAR!!!111!!!1
Okay, sorry, but here it is.
1. How can you do a smooth motion (slowly increasing, the decreasing, then increasing etc), a bit like a spiral pattern of bullets (firing per 3 frames, of course), with the angle slowly decreasing, then the angle is going the other way, but at an increasing rate.
2. How to upload textures onto Dnh.
3. Bullets with gravity.
4. ALSO (cruise control), can someone give me the functions for GetClipMinX, GetClipMaxX, GetClipMinY and GetClipMaxY. (I know what those functions are and know what they do).

EDIT: I fixed question 4.

EDIT 2: I've posted the PH3 functions I made for the stage edges. Hope it helps other people asking for the locations of the stage frames. Blah blah. Here:
Code: [Select]
function GetClipMinX{
return 0;
}

function GetClipMaxX{
return 385;
}

function GetClipMinY{
return 0;
}

function GetClipMaxY{
return 444;
}
« Last Edit: March 25, 2012, 08:07:25 PM by fonduemaster »

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #296 on: April 12, 2012, 09:35:26 PM »
I'm noticing that ph3 seems to "stutter" a couple of times a second.  I want to say it has something to do with the game running at 63 FPS, since .12m ran at a consistent 60 and I never noticed any of what I'm seeing now.  I tried forcing Vsync on and off (monitor refresh is 63Hz) to no avail.  It's quite annoying having everything appear like it's skipping around, and I was wondering if anyone else has worked around this.

Thanks.

EDIT: Since I have FRAPS set to record at 60FPS, I started it up and recorded a video.  As expected, the game was forced to 60FPS and I noticed none of the "stuttering" while recording.
« Last Edit: April 12, 2012, 09:51:07 PM by Frenticpony »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #297 on: April 12, 2012, 10:30:57 PM »
Dumb question, but can you set your monitor to a 60Hz refresh rate? That's likely the entire problem, since with the extra 3Hz you will have some skipping when the game is trying to play at the same rate unless you force it down somehow. (hurr durr obvious)

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

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #298 on: April 12, 2012, 11:56:44 PM »
Dumb question, but can you set your monitor to a 60Hz refresh rate? That's likely the entire problem, since with the extra 3Hz you will have some skipping when the game is trying to play at the same rate unless you force it down somehow. (hurr durr obvious)

I tried doing that through Windows 7, but it didn't have any effect, and I can't find a way to change it within the monitor itself.  Even setting it to other Hz values didn't change Danmakufu's framerate.  I've found a temporary workaround for the time being (trial version of Dxtory forcing FPS to 60,) but it's not a long-term solution.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #299 on: April 14, 2012, 10:00:31 AM »
Anyone know how to make something happen to a task while the declared stuff is outside the task? A bit like you have some 'IF' and 'WHILE' statements outside the said task, and those statements will edit the entire task?

If no-one can help me ill just create a function the returns 'OBJ'.