Author Topic: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m [Closed, read last post!]  (Read 185528 times)

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #360 on: September 21, 2013, 10:13:38 PM »
I think the graphical glitch he mentions is the pixelation of sprites. I've noticed it happens in a few of my boss spell cards as well, couldn't explain it yet. Though I swear I've read someone posting the cause though on which page was it again? Or was it in the ph3 thread while doing comparisons.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #361 on: September 21, 2013, 11:28:55 PM »
Your plus symbols didn't show up by the way.
1. What graphical glitch
2. Why do you need to know how DNH calculates spell score if you were going to make a new one anyways

The graphical glitch is like Helepolis explained, the some of the visuals become pixelated whenever DrawText or SetScore is used. The reason I need to know how danmakufu figures out what to subtract is because the new one isn't going to use SetScore at all, therefor I need to know the formula for decreasing the score overtime.

Drake

  • *
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #362 on: September 22, 2013, 12:00:40 AM »
The reason I need to know how danmakufu figures out what to subtract is because the new one isn't going to use SetScore at all, therefor I need to know the formula for decreasing the score overtime.
Yes, that's exactly what I mean. If you don't want to use the system the default uses, then just make it up yourself. It isn't as if the internal spell card system uses some amazing magical perfect numbers.

If your lower bound on the score was 0, then you could just reduce it by the maximum spell bonus divided by the number of frames the spell lasts (i.e. timer in seconds * 60). Or more generally, it would be like (maxbonus - minbonus) / (numspellframes - numstartframes) if you wanted a lower bound on the bonus (not zero) and you only wanted the bonus to start descending after a certain number of frames.

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

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #363 on: September 22, 2013, 12:58:21 AM »
ok, I'll try that.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #364 on: September 22, 2013, 02:24:49 AM »
Is there a tutorial on how to write full game scripts?

And how do you fix the glitching in backgrounds (2d)?
I get random lines when I try to use ZBuffer layers of 2x on tiling of 20+

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #365 on: September 22, 2013, 10:40:08 AM »
Hi all...it's me again ._. how can i animate bosses?i mean movement,fire and other?

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #366 on: September 22, 2013, 11:36:01 AM »
I reccomend either one of:
- Using the animation library.
- Script it all yourself, by having a task or a phase in which it checks if the boss is moving, standing still or attacking while increasing a frame value. If you have a sprite sheet with evenly placed graphics it also becomes easier to define the graphic rects, which I would do something like this:
Code: [Select]
//somewhere at the start:
let animframe=-1;

let leftrect = 0;
let rightrect = 0;

//In the animation task or whatever.
animframe++;

ascent(anim in 0.."amount of sprites in the animation"){

if(animframe==(anim*5)){
leftrect = anim*"width of sprites";
rightrect = "width of sprites" + anim*"width of sprites";
}

}

if(animframe==("amount of sprites in the animation"*5+5)){animframe=-1;}

SetGraphicRect(leftrect, "top rect", rightrect, "bottom rect");
I'm not sure if this works correctly, but this is mainly how I did boss animations in Ph3. (So I tried to adapt it to 0.12m type scripting.)
The text using quotation marks are just placeholders.
« Last Edit: September 22, 2013, 11:39:41 AM by Darkness1 »

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #367 on: September 22, 2013, 11:46:47 AM »
i don't really understand how yo use animation library .-.

Darkness1

  • Nothing to see here.
  • Enigmatic, isn't it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #368 on: September 22, 2013, 12:05:54 PM »
Isn't there instructions that comes with the download?
It's something like this:
Code: [Select]
//In Initialize:
CreateAnimation("name of the boss", "name of the action", amount of sprites in the animation);
SetAnimationFrame("name of the boss", "name of the action", numerical order of the animation (starts at 0), path to the graphic image, amount of frames, left rect, top rect, right rect, bottom rect);

//In Drawloop or your drawtask:
Animate("name of the boss","name of the action",looping (true==loop, false=no loop, animates until the last graphic) );

That's it really. How to utilize the Animate function and how it works is something you will find out when you try it.

Spoiler:
(Obviously you have to include the script first.)
#include_function ".\AnimationLib.dnh"
« Last Edit: September 22, 2013, 12:08:04 PM by Darkness1 »

BobTheTanuki

  • Ph3?
  • What is it?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #369 on: September 22, 2013, 12:08:05 PM »
Oh,sorry!thanks ^^"

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #370 on: September 22, 2013, 01:37:12 PM »
Is there a tutorial on how to write full game scripts?

Not that I know of. Full games are done through stage scripts, stages are done by tasking and manipulation of tasks and variables to control the background and give the illusion of multiple stages.

Chaining stage tasks is easy as well as changing the background(somewhat easy).

At the end of each stage task, control variables to fade out the background and delete the textures, load new textures and control the background to draw them on to the screen, load the next stage.

You could also make menus. But if you have a hard time understanding how the menus work then stay away from them for now.

I hope I explained it in a way you could understand

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #371 on: September 22, 2013, 03:33:35 PM »
That makes sense, thank you!  ^^

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #372 on: September 26, 2013, 11:10:43 PM »
Is there a font script, or does anyone know how I would use ZUN's font in danmakufu?(something that can be used like effect objects so I can place it in the frame layer)

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #373 on: September 26, 2013, 11:21:00 PM »
Is there a font script, or does anyone know how I would use ZUN's font in danmakufu?(something that can be used like effect objects so I can place it in the frame layer)
You mean for dialogue, or spell names and name tags? 
This covers difficulty marker for custom frames, name tags and spell names.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #374 on: September 26, 2013, 11:53:02 PM »
You mean for dialogue, or spell names and name tags? 
This covers difficulty marker for custom frames, name tags and spell names.

That's not quite was I meant. But rather a script/function that can imitate DrawText but using the ascii font that Touhou games have the font used in the musicroom, replays, ect....

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #375 on: September 27, 2013, 12:19:34 AM »
How do you use SetFog?
Every time I use it, I get a white out of my BG's

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #376 on: September 27, 2013, 02:30:21 AM »
That's not quite was I meant. But rather a script/function that can imitate DrawText but using the ascii font that Touhou games have the font used in the musicroom, replays, ect....
Maybe this is what you are looking for. is not the same font as touhou games though

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #377 on: September 27, 2013, 05:47:11 AM »
How do you use SetFog?
Every time I use it, I get a white out of my BG's
Could you perhaps show us some code? We cannot judge what you're trying to do without showing your code.

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #378 on: September 27, 2013, 09:47:38 PM »
Maybe this is what you are looking for. is not the same font as touhou games though

Yes, thank you. I'll edit the file to include the Touhou font.

EDIT: Luckly me, Blargel's STB Engine has the same script but it's using the real Touhou font. I guess I can use that then.
« Last Edit: September 27, 2013, 11:54:56 PM by Infinite Ultima Wave »

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #379 on: September 27, 2013, 11:11:39 PM »
Could you perhaps show us some code? We cannot judge what you're trying to do without showing your code.
The way I've used it is:
SetFog (90, 180, 255, 255, 255);
And I always get a white out

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #380 on: September 28, 2013, 02:33:18 PM »
The way I've used it is:
SetFog (90, 180, 255, 255, 255);
And I always get a white out
90 and 180 is a pretty close value you know, it means the fog is up really close. How deep is your stage? For example if it is 2048 deep, have you tried setting to 1700-2048 for example etc

[attach=1]
Here is visual aid how you should be approaching fog setting in stages. Of course the numbers are examples. Try what ever works for you.
« Last Edit: September 28, 2013, 03:13:43 PM by Helepolis »

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #381 on: September 28, 2013, 11:53:13 PM »
The Stages I use are normally 50*256 long, but thank you for telling me it should be much further away!   :)  (They should write that in Nuclear Cheese's Drawing Tutorial)

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #382 on: September 29, 2013, 10:41:13 AM »
The Stages I use are normally 50*256 long, but thank you for telling me it should be much further away!   :)  (They should write that in Nuclear Cheese's Drawing Tutorial)
You don't understand. If your stage is 256 deep it means that you're putting the fog at very close range, most likely right in front of "the camera". Setting fog is delicate and annoying concept. You shouldn't just think that you need a deeper stage, you need to set your fog at 256,256 -> check results and see what happens. Then you can adjust the minimum parameter until you receive desired effect.


Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #383 on: September 29, 2013, 04:31:59 PM »
Don't use fog with scrolling backgrounds. I tried it and eventually the entire screen is filled with the fog color. It happens faster depending on the speed of the scroll.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #384 on: September 29, 2013, 05:42:04 PM »
Don't use fog with scrolling backgrounds. I tried it and eventually the entire screen is filled with the fog color. It happens faster depending on the speed of the scroll.

If you really can't use SetFog, the other option is to spawn object effects. That way you have a lot of control over what happens.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #385 on: September 29, 2013, 09:02:19 PM »
Ok, I'm learning effect objects now, so I'll use those instead.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #386 on: September 29, 2013, 09:19:21 PM »
Don't use fog with scrolling backgrounds. I tried it and eventually the entire screen is filled with the fog color. It happens faster depending on the speed of the scroll.
This is wrong information. Who told you that?

If you really can't use SetFog, the other option is to spawn object effects. That way you have a lot of control over what happens.
This is wrong as well. And major nonsense.

Ok, I'm learning effect objects now, so I'll use those instead.
You're not reading posts. The ones that contain elaborated information.

I guess going through the trouble of explaining things to people is not being appreciated. Post some code first. And I mean your entire code, not just your SetFog.

Edit:

3x SetFog with values. First one showing K's value. 2nd 3rd showing my "tweaked". It is Ph3 you might say, but ph3 and 0.12m has same fog usage, just different function name.
[attach=1]

It seriously cannot be that hard to just follow tutorials and given advise you know.  And yes, this is a scrolling stage.
« Last Edit: September 29, 2013, 09:32:04 PM by Helepolis »

Sage Ω (Ultima)

  • CEO at Team Eternal Desire
  • ??? X
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #387 on: September 29, 2013, 09:44:36 PM »
This is wrong information. Who told you that?

No one, this is from my own experiences.

SetFog(500,1700,255,100,200);

scroll code
SetGraphicRect(0, 0-f, 640, (400*10));
SetGraphicRect(0-f, 0, 640, (400*10));

This is the result after a few seconds.

K+ ~ Bake-Danuki

Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #388 on: September 30, 2013, 12:19:25 AM »
The Code I was using is:
http://pastebin.com/Bpy3kTUk
« Last Edit: September 30, 2013, 05:46:47 AM by Helepolis »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: ※ Q&A/Problem Thread 7 ※ for Danmakufu version 0.12m
« Reply #389 on: September 30, 2013, 12:51:38 AM »
The Code I was using is:
Code: [Select]

Please pastebin. This giant thing is difficult to scroll through.

Also:
What are these and what function do they hold?
let Y = 0;
let Y2 = -60;
let X = 0;
let X3 = 0;
let Y3 = 0;
« Last Edit: September 30, 2013, 12:56:32 AM by Sparen »