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

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #390 on: June 19, 2012, 07:01:54 PM »
Is Danmakufu running at a proper 60fps? Is it consistent? Does it happen with all moving objects? Does it not happen with some objects?
Disregard some of the last post. Just tested Dnh a few times more and I realised the problem only happens with bullets, sorry. I don't think it has something to do with the framerate because if it did all other objects would have the same problem. It could be just that Danmakufu is still in beta and it's compatibility with shotsheets is slightly shitty.
Aha!  Works!  So, to avoid the blurryness... (Correct me if I'm wrong)

Source images should be a power of two.
SourceRect should have odd dimensions.

Hopefully, I'll be able to go through all my 2X images soon and resize them back to normal.
Are you saying that with all our images we should resize them by double (or make images with double the initial size), then when we upload the images/textures onto Dnh we scale them to half, or something?

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #391 on: June 19, 2012, 09:22:04 PM »
Are you saying that with all our images we should resize them by double (or make images with double the initial size), then when we upload the images/textures onto Dnh we scale them to half, or something?

He's saying that the length and width of the images should be a power of two (2, 4, 8, 16, 32, 64, 128, 256, 512, etc). The "2X images" in his last sentence means "twenty-something images".
<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 #392 on: June 20, 2012, 04:07:44 PM »
He's saying that the length and width of the images should be a power of two (2, 4, 8, 16, 32, 64, 128, 256, 512, etc). The "2X images" in his last sentence means "twenty-something images".

Actually... In order to get around the blurryness before, I re-sized all of my images to twice their size, so the 2x was meant as "2 times normal size".  But, there are twenty something images that need the re-size so I guess it works too.

For an "unrelated to blurry" question, I'm working on making a Subterranean Animism Reimu A player script, and the very last thing that the script doesn't have faithful to the original is invincible grazing.  Is there a way outside of "ObjPlayer_AddIntersectionCircleA1" that I can use to check for grazing?
« Last Edit: June 20, 2012, 04:15:01 PM by Frenticpony »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #393 on: June 20, 2012, 09:55:18 PM »
Does ObjPlayer_ClearIntersection and Add not work?

This might work:
-Use GetShotIdInCircleA2(x, y, r, TARGET_ENEMY) to return an array of object IDs
-Check these IDs against the last frame's stored array and eliminate the ones "you've already grazed", then store this array as the main one
-Use length() on it to find how many bullets are within the circle

And then you'll probably have to do some combing to make sure dead bullets are removed from the array and stuff like that but this should be appropriate.

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 #394 on: June 21, 2012, 04:47:36 PM »
Oh yes, forgot to ask. In addition to the question about retrieving a shot's ID, is there a function to retrieve how long a shot's delay is?

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #395 on: June 21, 2012, 08:57:41 PM »
Not that I can tell. I'm going to ask the more expansive question of "why would you need it".

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 #396 on: June 21, 2012, 09:39:02 PM »
'why would you need it'
As stated before, I was going to be working on making a function or something that changes a shot's delay type.   Instead of the normal blur Dnh gives you when a bullet's delay is active, the default delay is invisible and during the time of how long the delay is active, the bullet's graphic is larger than the original bullet and at a lower alpha too. The graphic will gradually get smaller until the original size is acheived, and the graphic's alpha will get higher too. Until the bullet is at full alpha and normal size, the bullet will fire.
Sorry if I confuse you I'm not that good at explaining. :blush:

CK Crash

  • boozer
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #397 on: June 21, 2012, 09:53:37 PM »
The easier way to do that is to make a function that takes the CreateShot parameters, does the custom delay effect, and when it finishes, creates the bullet with a delay of 0.

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #398 on: June 21, 2012, 10:17:16 PM »
I asked why you needed it because chances are you wouldn't need it. Explaining what you want to do rather than "is there a function for this" makes it much more probable that you'll get a proper answer, especially since we may come up with a solution completely different than what you were expecting.

In this case, you just implement CreateShotwhatever into a new function, precisely how Lucas described. It'll just look like
Code: [Select]
function CreateShot01N(x, y, s, a, g, d){
let shot = CreateShot01(x, y, 0, a, g, 0);
//shot doesn't kill player, is invincible, etc
delayeffect;
return shot;

task delayeffect{
//do the effect
//shot "fires"
}
}
or something along those lines.

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 #399 on: June 22, 2012, 12:11:17 PM »
Does ObjPlayer_ClearIntersection and Add not work?

This might work:
-Use GetShotIdInCircleA2(x, y, r, TARGET_ENEMY) to return an array of object IDs
-Check these IDs against the last frame's stored array and eliminate the ones "you've already grazed", then store this array as the main one
-Use length() on it to find how many bullets are within the circle

And then you'll probably have to do some combing to make sure dead bullets are removed from the array and stuff like that but this should be appropriate.

They work, but when using SetInvincibilityFrame, is seems to get rid of both hit and graze collision checking.

I'll mess around, but I've played with arrays very minimally so I expect catastrophic failure.

Arcorann

  • hey catgirl
  • Surprisingly unkempt
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #400 on: June 23, 2012, 12:12:04 PM »
Could someone translate the changelogs for the most recent version of ph3?

For that matter, has anyone here actually tried any of the beta 6 previews yet? I've just started getting my head around the archiver and this new "package script" business.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #401 on: June 24, 2012, 12:44:43 AM »
It's my first time tasking and I want to be competent, but I just have no clue what's going on here.

EDIT: Nevermind, figured it out. I'm just dumb.

It says my task "dumb" is undefined or something... Absolutely no idea how to fix that without taking that task out altogether.
« Last Edit: June 25, 2012, 06:57:36 PM by saturnascends »

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #402 on: July 01, 2012, 04:11:13 PM »
Is it possible as a temporary replacement for "angular_velocity", we could have some thing like this?:
Code: [Select]
task spinimage{
let imagespin=0;
let shot1=CreateShotA1(ex,ey,speed,angle,graphic,delay);
//Other Stuff
while(shot1==!Obj_IsDeleted(shot1)){
ObjRender_SetAngleY(shot1,imagespin);
imagespin+=number;
//Other Stuff
yield;
}
}
Or something?

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #403 on: July 01, 2012, 07:05:12 PM »
The latest ph3 version should have that implemented. Either that, or I read something wrong.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #404 on: July 01, 2012, 07:13:26 PM »
The latest ph3 version should have that implemented. Either that, or I read something wrong.
I don't think you did read something wrong; just checked here http://www.geocities.co.jp/SiliconValley-Oakland/9951/pre/th_dnh_ph3.html

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #405 on: July 01, 2012, 10:31:08 PM »
Well it's sometimes hard to make out what it says when you only have google translate.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #406 on: July 02, 2012, 11:29:18 AM »
Does anyone know how to construct these waveforms?:  http://upload.wikimedia.org/wikipedia/commons/7/77/Waveforms.svg
I don't really know how to explain it...but the Sine wave is definitely a yes-yes
Basically, I want to create a spiral of Kunais but I want the initial angle variable to slowly speed up, slowly speed down, reverse, slowly speed up every frame etc. That's one of the things I want to create.

Thaws

  • _m廿廿m_
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #407 on: July 02, 2012, 11:41:37 AM »
Does anyone know how to construct these waveforms?:  http://upload.wikimedia.org/wikipedia/commons/7/77/Waveforms.svg
I don't really know how to explain it...but the Sine wave is definitely a yes-yes
Basically, I want to create a spiral of Kunais but I want the initial angle variable to slowly speed up, slowly speed down, reverse, slowly speed up every frame etc. That's one of the things I want to create.
Sine wave:
Simply use the sine function.
set the speed = sin(angle)*displacement
angle should be increased by a certain number every frame. Somewhere around 3 would probably give a nice result.
displacement is your maximum speed. e.g. displacement = 1 would give a speed of -1 to 1.
If you want it to be positive all the time use somehing like speed = sin(angle)*displacement+3, then the speed will vary from 1 to 4 and back to 1.

Square wave:
Change the variable from positive to negative every set number of frames.
e.g.
if(frame%30 == 0){ speed = -speed;}
frame++;

Triangle wave:
speed += acceleration;
where acceleration is a square wave. (So speed will increase for some time, then decrease and repeat.)

Sawtooth wave:
Simply keep increasing speed until you reach a certain point then reset it
speed += acceleration;
if(speed > max_speed){ speed = original_speed;}
something like this.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #408 on: July 16, 2012, 06:57:19 AM »
Interest in danmakufu seems to be dwindling~ ._.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #409 on: July 16, 2012, 03:09:41 PM »
Interest in danmakufu seems to be dwindling~ ._.
Perhaps or perhaps not, either way please keep in mind that this isn't the thread to discuss that.

Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #410 on: July 24, 2012, 01:22:37 PM »
I can't seem to have my lasers rendered with alpha; instead, it seems to be automatically changed to add lasers.

Is it just me ? Am I doing something wrong ?

The bullet I use for the laser is defined is the shotsheet with a "render=ALPHA", plus after creating the laser, I do a "ObjRender_SetBlendType(obj,BLEND_ALPHA);", but it looks like it's just ignored.

Is there a simple way to work around that, or will I have to manually make the hitbox and graphics ?  It seems kinda odd, though.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #411 on: July 24, 2012, 02:12:47 PM »
Well well a certain program is being as ass  :getdown:

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #412 on: July 24, 2012, 02:30:09 PM »
For what it's worth, 0.12m does the same thing from what I remember.
<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.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #413 on: August 04, 2012, 07:43:34 PM »
How to custom player script?
'why would you need it'
Because I can make graphics and I haven't Danmakufu'd for a while and I wanted to try something different.



>Looks inside default player script


Nope, fuck that.
« Last Edit: August 04, 2012, 07:52:08 PM by fonduemaster »

Drake

  • *
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #414 on: August 05, 2012, 04:37:31 AM »
Creating a player script is essentially the same as in 0.12. You now can just also take advantage of events and ph3's new functionalities in general. The most important thing is knowing how to construct the logic and structure of a player, not really learning how to use any specific functions. Most stuff in the 0.12 tutorial besides effect objects (which you can now replace with sprites which are easier) still applies.

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 #415 on: August 22, 2012, 08:06:25 PM »
Lonely Thread is lonely ;_;
How to I make a spell cutin? Like with the proper "spellname" text and the boss image, and when it finishes it gives you a point bonus?

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #416 on: August 29, 2012, 08:54:24 PM »
What's the default font for Danmakufu? On some computers, the text is extremely small, and for others, it's normal-sized.
I am considering using a different font, but knowing the default would be nice.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #417 on: August 29, 2012, 10:42:33 PM »
Okay I'm working on a boss project (for once!) and I'm trying to load a part of a graphic sheet but there is no graphic rendered on the stage. What's going on here I'm 100% sure I scripted everything right...
[attach=1]




fake e: Thanks Drake for Touhou graphics :V

PJ

  • jesus christ it's all over the walls
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #418 on: August 29, 2012, 11:18:53 PM »
Okay I'm working on a boss project (for once!) and I'm trying to load a part of a graphic sheet but there is no graphic rendered on the stage. What's going on here I'm 100% sure I scripted everything right...
[attach=1]

fake e: Thanks Drake for Touhou graphics :V

Code: [Select]
LoadTexture(GCSD~"img/stage05e01.png");
let objEnemy = ObjPrim_Create(OBJ_SPRITE_2D);
ObjPrim_SetTexture(objEnemy,GCSD~"img/stage05e01.png");
ObjRender_SetPosition(objEnemy,100,100,0);
ObjSprite2D_SetSourceRect(objEnemy,0,0,256,512);
ObjSprite2D_SetDestRect(objEnemy,-120,-253,-73,-154);
Mkay, let's break down what you did wrong here.

Code: [Select]
ObjRender_SetPosition(objEnemy,100,100,0);This sets the sprite exactly 100 pixels away from the top left corner. Nothing really wrong with that.

Code: [Select]
ObjSprite2D_SetSourceRect(objEnemy,0,0,256,512);Here's a problem. You set the primitive to use the whole image at once. So, it will show all of Shou's sprites.

Code: [Select]
ObjSprite2D_SetDestRect(objEnemy,-120,-253,-73,-154);Another problem. I don't know if you're sure what you were doing here.
This makes the sprite go offscreen. Any coordinates less than 0 will always end off of the screen. It's actually located at the coordinates 27, -54. It is displayed way too high up to show up on the player's screen. In addition, this resizes it really, really weirdly.

fondue

  • excuse me
Re: ※ Dnh Q&A/Problem ※ ONLY for NEWEST engine (ph3 beta)
« Reply #419 on: August 29, 2012, 11:27:33 PM »
Mega derp
Okay but is it okai if I omit ObjSprite2D_SetDestRect? Originally I thought that used used to draw a certain section of the whole graphics sheet...