Author Topic: Danmakufu Q&A/Problem Thread II  (Read 166224 times)

Cabble

  • Ask me about my Cat.
  • Not unwilling to shank you.
Re: Danmakufu Q&A/Problem Thread II
« Reply #510 on: December 03, 2009, 12:30:06 AM »
Nope. I'm doing from the sides t the enemy.
I had a teacher who used to play radiohead during class once.

ONCE.

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #511 on: December 03, 2009, 01:03:53 AM »
atan2(GetX-[x-coordinate of point],GetY-[y-coordinate of point]) should work. If it doesn't, switch the GetX and coordinate in both arguments.

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem Thread II
« Reply #512 on: December 03, 2009, 01:06:38 AM »
Switch X and Y. atan2(destY-sourceY,destX-sourceX);

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #513 on: December 03, 2009, 01:12:52 AM »
Switch X and Y. atan2(destY-sourceY,destX-sourceX);
If it doesn't, switch the GetX and coordinate in both arguments.

CK Crash

  • boozer
Re: Danmakufu Q&A/Problem Thread II
« Reply #514 on: December 03, 2009, 02:18:55 AM »
Seriously people. Danmakufu is CASE SENSETIVE

People should read first instead of hitting the "reply" button rapidly.
You spelled sensitive wrong :V

AweStriker Nova

  • Star Sign "Thunder Constellation"
Re: Danmakufu Q&A/Problem Thread II
« Reply #515 on: December 03, 2009, 04:02:15 AM »
You spelled sensitive wrong :V

Do keep in mind that Helepolis is not a native English speaker.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #516 on: December 03, 2009, 04:12:33 AM »
Do keep in mind that Helepolis is not a native English speaker.
He knows.

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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #517 on: December 03, 2009, 01:51:43 PM »
Making spelling mistakes in posts does not makes one's PC crash. Only one's brain. Neverless, the idea is clear. It is just that too many people quickly jump to the forums saying:

" HELP THIS DOESN'T WORK "

I can fully understand the idea of being a newcomer or newbie scripter and that error backtracking is generally hard. I have seen various pms and posts where people do not even check if you type a  (   or a {  correctly. They also never count the ammount of ( 's and { ' s they are opening.

Same goes for standard function names such as CreateShot01 where if you type the 's' in lower case, Danmakufu will bitch on you instantly.

The best way of learning Danmakufu is to first try check your spelling, upper/lower cases, variable names, semicolons etc etc. If you REALLY REALLY cannot find the problem and almost about to tear your hair out, then logically you are FREE to post it on the forum.

Remember that it is not a shame to make errors. But it is a bigger shame if you quickly jump to the forums due to the following attitude:
- I am too lazy to detect the error, the experts will find it out.
- I don't care about error messages as long as my script works.
- I don't want to read tutorials, FAQs because they rob my time.

I got 0 tolerance for these kind of attitude and don't expect help from me if I sense it in your post.


Oh yea, last thing. On IRC: Do not ask if you may ask a question. Just ask the question. This is not some classroom where you need to raise your finger to request permission. Throw in your problem/question and patiently wait if someone replies or reacts. I hardly seen anyone being ignored because lately we got alot of activity in the #danmakufu channel. Ofcourse please remember that people might be idle there. So patience is requested.

Infy♫

  • Demonic★Moe
  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #518 on: December 04, 2009, 05:50:54 PM »
HALP IT DONT WORK
@MainLoop (
CreateShot01(GetAngleToPlayer;
if(2 = 1){
apple = 23


now for some serious questions;
fog is still a big problem.
could you tell me what causes problems with fog?
like too big textures or something? or maybe a certain distance of the camera?

Stuffman

  • *
  • We're having a ball!
Re: Danmakufu Q&A/Problem Thread II
« Reply #519 on: December 05, 2009, 02:31:58 AM »
Quote
@MainLoop (
CreateShot01(GetAngleToPlayer;
if(2 = 1){
apple = 23
You capitalized the L in mainloop, you're not supposed to do that :V

Seriously though, fog is a constant source of headaches. It just plain doesn't work well.

Known issues with SetFog:
- Extremely large polygons, larger than about 3000 pixels in either dimension, will break it. This is common with the polygons people use for floors and such that are supposed to stretch out forever. They need to be trimmed and the stage needs to loop rather quickly to get around this.
- ADD filter basically doesn't work with fog at all. You tend to get solid colored polygons whenever you use ADD in fog.
- Fog has issues with camera movement, in that it typically shifts a bit as you move the camera and thus it snaps back into place when you loop the stage. The only reliable workaround to this appears to be to move the entire stage, rather than the camera.

Re: Danmakufu Q&A/Problem Thread II
« Reply #520 on: December 05, 2009, 02:51:17 AM »
- Extremely large polygons, larger than about 3000 pixels in either dimension, will break it. This is common with the polygons people use for floors and such that are supposed to stretch out forever. They need to be trimmed and the stage needs to loop rather quickly to get around this.

If the image you're tiling takes up the whole .png (as in, from the very far edge of the image file to the other), then you can just keep scrolling the SetGraphicRect, since it will be infinitely tiled. Other than a really large open area (which I wouldn't recommend due to Danmakufu's lolsy processing of images), you shouldn't really need an image that takes up over 3000x3000 pixels on the screen at any given time, so... :/

Re: Danmakufu Q&A/Problem Thread II
« Reply #521 on: December 05, 2009, 03:20:34 AM »
asdafasf SetFog D:

Infy♫

  • Demonic★Moe
  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #522 on: December 05, 2009, 12:42:31 PM »
I also have another problem concerning 3D graphics. In stage 1 of the demo i made, you could see a sea, right? well. I wanted to make it look like water but that failed! when I lowered the alpha the texture simply became darker (even though things were drawn underneath it)
any solutions? the texture is a .png

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #523 on: December 05, 2009, 01:34:39 PM »
That's strange because I was able to alpha out the leaves of a tree as it approached the camera so that they wouldn't look awkward as they block the view and suddenly disappear. Perhaps you're coding it incorrectly?
<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 II
« Reply #524 on: December 05, 2009, 06:59:53 PM »
Some people say that altering alpha using ObjEffect_SetVertexColor will only darken the image. Because the image is produced using vertices and not as a solid object you can't use Obj_SetAlpha, so I'm not sure how to get around that. Does this happen solely because it uses alpha blending? I haven't had any problems with it before, so...

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

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem Thread II
« Reply #525 on: December 05, 2009, 07:04:09 PM »
Additive drawing cannot be made more opaque ( transparant ) use SetColour for this. This problem generally occurs with @BackGround and @DrawLoop. I have no idea how 3D textures behave with the alpha/add type. I need to investigate this more.

Effect Objects: I notified Drake about this case before as well. Object Effects seem to be functioning weird. 

Obj_SetVertexColor(obj,vertex,alpha,red,green,blue);    <--- even in this code it makes it sometimes darker instead of opaque. But in my spellcircle code, that doesn't occur.

But 3D stage drawing is not done by Effect Objects ( unless you spawn those ).

Cabble

  • Ask me about my Cat.
  • Not unwilling to shank you.
Re: Danmakufu Q&A/Problem Thread II
« Reply #526 on: December 05, 2009, 08:08:50 PM »
Okay, I'm using AppLocale with japanese support, however there are 2 things:

It won't create a shortcut
It can't have the line #Player[FREE] in the script or danmakufu will crash
I had a teacher who used to play radiohead during class once.

ONCE.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #527 on: December 05, 2009, 10:00:53 PM »
No-shortcutting is just a bug that happens on a few systems. I have it too. There's another, easier way.

http://alcahest.perso.sfr.fr/perso/apploc/applocale.html

This will tell you how to get rid of the popup in the beginning, and also how to make programs run in japanese locale just by right-clicking them.


The problem with #Player[FREE] is more than likely one of the players interfering with code. Find the names of all your player scripts, and try #Player[playername] and run with Applocale until one crashes. Then fix whatever could be the problem or post it here.

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

Cabble

  • Ask me about my Cat.
  • Not unwilling to shank you.
Re: Danmakufu Q&A/Problem Thread II
« Reply #528 on: December 06, 2009, 03:52:10 AM »
Thanks. It ended up being the CtC marisa, and the program works fine.
I had a teacher who used to play radiohead during class once.

ONCE.

Nonnie Grey

  • Contradictory Statement
  • The Anonymity formerly known as Kayorei
Re: Danmakufu Q&A/Problem Thread II
« Reply #529 on: December 06, 2009, 03:53:17 AM »
Got a somewhat silly novice question that's mostly out of curiosity.

What's the difference between a task and a function? I've seen them both used in the intermediate tutorial thread, but I can't really see any difference. Maybe I'm not looking hard enough?

Re: Danmakufu Q&A/Problem Thread II
« Reply #530 on: December 06, 2009, 04:37:43 AM »
The way i see it, functions are used for long streams of code, while tasks are a sort of "orginazation" way of coding. Such as you have to include a function for the Shot Replace, because how it replaces the default IDs with the regulars, such as RED12

Mounting Jaggis

  • It's a dinosaur rodeo!
  • Yeee haww!
Re: Danmakufu Q&A/Problem Thread II
« Reply #531 on: December 06, 2009, 05:08:50 AM »
Actually the difference between task and function is that function takes in an input. For example if you have a shooting task like this:
Code: [Select]
task shoot{
     let x = 0;
     let dir = 0;
     while(x < 15){
          CreateShot(Blah,blah,blah)
          x++;
          dir += 360/15;
     }
}

It will always shoot 15 evenly spread bullets in a circle. But changing "task shoot" to "function shoot(density)" let's you shoot any amount you want without having to rewrite the numbers you want to change. You have to change the code to this:
Code: [Select]
function shoot(density){
     let x = 0;
     let dir = 0;
     while(x < density){
          CreateShot(Blah,blah,blah)
          x++;
          dir += 360/density;
     }
}

Then call shoot with shoot(#) and insert any number you want to shoot any amount of bullet you want and they will still be evenly spread out. There are other things you can do with functions but this is the simplest thing next to wait(w). So if you call shoot(25) then shoot(50) it will first shoot 25 bullets in a circle then 50 by using the same code.


Re: Danmakufu Q&A/Problem Thread II
« Reply #532 on: December 06, 2009, 05:11:02 AM »
Actually the difference between task and function is that function takes in an input. For example if you have a shooting task like this:
Code: [Select]
task shoot{
     let x = 0;
     let dir = 0;
     while(x < 15){
          CreateShot(Blah,blah,blah)
          x++;
          dir += 360/15;
     }
}

It will always shoot 15 evenly spread bullets in a circle. But changing "task shoot" to "function shoot(density)" let's you shoot any amount you want without having to rewrite the numbers you want to change. You have to change the code to this:
Code: [Select]
function shoot(density){
     let x = 0;
     let dir = 0;
     while(x < density){
          CreateShot(Blah,blah,blah)
          x++;
          dir += 360/density;
     }
}

Then call shoot with shoot(#) and insert any number you want to shoot any amount of bullet you want and they will still be evenly spread out. There are other things you can do with functions but this is the simplest thing next to wait(w). So if you call shoot(25) then shoot(50) it will first shoot 25 bullets in a circle then 50 by using the same code.

you can also have a task like

task   RedBullet(x,y){
CreateShot01(x,y,3,RED03,0);
}


Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem Thread II
« Reply #533 on: December 06, 2009, 05:28:58 AM »
Wrong.

Subroutines take no inputs, while functions and tasks both do. Functions are always run in a single frame, while tasks can use yield; to stall for a frame, then continue running.

Re: Danmakufu Q&A/Problem Thread II
« Reply #534 on: December 06, 2009, 05:44:27 AM »
Wrong.

Subroutines take no inputs, while functions and tasks both do. Functions are always run in a single frame, while tasks can use yield; to stall for a frame, then continue running.

tasks are run in a single frame and they can use yield;, But functions can assist in the way things work, as i referenced to, the shot replace you need to call #include_function, which is different when you call a task. But also, functions can be called from a seperate file, while tasks cannot

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem Thread II
« Reply #535 on: December 06, 2009, 05:56:19 AM »
Uh... #include_function just loads a file, which can contain variable declarations, tasks, and subroutines in addition to functions.

Drake

  • *
Re: Danmakufu Q&A/Problem Thread II
« Reply #536 on: December 06, 2009, 06:36:39 AM »
Azure is right.

All three are just methods of packing code into bundles, and #include_function just loads any information from the called file into the class (script_enemy_main, etc) that it's called in. Subroutines are for simple things that are static; they do the same thing every time. The entire thing is run in one frame. Functions are also run in one frame, but they can take arguments that can be used in the span of that block/frame. Tasks take arguments as well, but they can be suspended by using yield, which stops the block and continues running other things as if the block had ended. Therefore, the arguments called in a task can be used in every frame that the block is run.

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

Lawence Codye

  • The Nine Tails of Subconscious...
  • Come & your desires shall all become reality...
Re: Danmakufu Q&A/Problem Thread II
« Reply #537 on: December 06, 2009, 07:02:53 AM »
umm...okay question, is there a way to have it so that when I press VK_USER(C) that the SetVertexUV's coordinates(for the options) change(the ones in task Option(position))?

Another question, should I just have it so that when I press C that it just changes it's VertexColor instead...?

Last question, ohhhh...& how does the task that look like this;

task Shot Type(x, y, graphic){}

work exactly(looking at player tutorial only help a tad bit)?
I am the Nine Tails of Subconscious...

Come & your greatest desires will be reality...

Blargel

  • RAWR!
  • I'M AN ANGRY LOLI!
Re: Danmakufu Q&A/Problem Thread II
« Reply #538 on: December 06, 2009, 09:50:28 AM »
About the subroutines, functions, and tasks question:
http://www.shrinemaiden.org/forum/index.php?topic=3218.msg162097#msg162097

For Lawence Codye: You'll need to store the id of the object effect that is displaying the options where it can be accessed in the @MainLoop. Then, somewhere in the player script's @MainLoop, you can do

if(GetKeyState(VK_USER)==KEY_PUSH){
    do stuff to change the effect object;
}


As for using SetVertexUV or SetVertexColor, that really depends on 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.

Nonnie Grey

  • Contradictory Statement
  • The Anonymity formerly known as Kayorei
Re: Danmakufu Q&A/Problem Thread II
« Reply #539 on: December 06, 2009, 10:26:50 AM »
About the subroutines, functions, and tasks question:
http://www.shrinemaiden.org/forum/index.php?topic=3218.msg162097#msg162097

Guess I really wasn't looking hard enough. ^_^* Thanks for the input, all.