Author Topic: Danmakufu Q&A/Problem thread number 4  (Read 206054 times)

Bitz

  • So Moe!
  • *heart attack*
Re: Danmakufu Q&A/Problem thread number 4
« Reply #30 on: June 23, 2010, 09:10:29 PM »
You could always prevent prettiness from causing possible bias by outright not letting people use any backgrounds, sprites, shotsheets, etc. except for approved ones, such as the TH-like Supershot shotsheet or some approved spritesheets or whatnot (for enemies and bosses).

Re: Danmakufu Q&A/Problem thread number 4
« Reply #31 on: June 23, 2010, 09:11:56 PM »
Actually, getting people to make a script with pre-determined graphics would be kinda neat.

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #32 on: June 23, 2010, 09:15:42 PM »
Predetermined advanced shotsheet and default background only. Final Destination!

I like the idea~
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Re: Danmakufu Q&A/Problem thread number 4
« Reply #33 on: June 24, 2010, 03:53:56 AM »
Alright, lemme throw some stuff together for thursday or friday. I'll host. If anybody is interested in co-judging, gimme a shout. And just like that, I have a co-judge.
« Last Edit: June 24, 2010, 04:05:03 AM by Naut »

空SoraのNo鏡Kagami

  • Wolven Wind Warrior of the West (That's catchy)
  • Occupation: Hopeless Amazing Young Scriptor
Re: Danmakufu Q&A/Problem thread number 4
« Reply #34 on: June 24, 2010, 04:03:40 PM »
I guess it's a good I already do all that...  :derp:
Me: Rapture is comin'
Person: OMG WHEN!
Me: Naow, APOCALYPSE SIGN "RAPTURE"!

空SoraのNo鏡Kagami

  • Wolven Wind Warrior of the West (That's catchy)
  • Occupation: Hopeless Amazing Young Scriptor
Re: Danmakufu Q&A/Problem thread number 4
« Reply #35 on: June 24, 2010, 04:05:25 PM »
Anyways... For some reason, when i draw the BossImage, it tiles the image across the whole screen. And... I've really no idea...
Me: Rapture is comin'
Person: OMG WHEN!
Me: Naow, APOCALYPSE SIGN "RAPTURE"!

Fetch()tirade

  • serial time-waster
Re: Danmakufu Q&A/Problem thread number 4
« Reply #36 on: June 24, 2010, 04:12:56 PM »
When you draw anything, you have to specify the image's size, giving the distances of the sides of a rectangle which contains that image.

For example, if I had a 900 x 900 image (including white space), then the SetGraphicRect function would have (0, 0, 900, 900) because Danmakufu calculates images, along with some other things, by (left side, top side, right side, bottom side). SetMovePositionRandom01 is another example.
If your image is tiled, then most likely the sides you specified are wrong. Hmmm.... did you copy the same code for @BackGround and put it in @DrawLoop, except change the names of the images?

空SoraのNo鏡Kagami

  • Wolven Wind Warrior of the West (That's catchy)
  • Occupation: Hopeless Amazing Young Scriptor
Re: Danmakufu Q&A/Problem thread number 4
« Reply #37 on: June 24, 2010, 05:16:22 PM »
Yeah, it was SetGraphicRect. I hadn't started drawing stuff until now so I didn't know  :derp:
Me: Rapture is comin'
Person: OMG WHEN!
Me: Naow, APOCALYPSE SIGN "RAPTURE"!

Re: Danmakufu Q&A/Problem thread number 4
« Reply #38 on: June 24, 2010, 05:47:10 PM »
I have another question  :( [Unrelated to the contest thingy] If I want to make 3 stages run into one script, how do I do it ?
Hey There !

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #39 on: June 24, 2010, 05:53:45 PM »
You take the main code that determins the stage (which should consist of a couple of variable, object and function definitions, as well as the tasks that regulate the actual flow of the script), and then either put it all in the same script or make a script that contains all these information by the means of #include_function. Then make it so that the ending of one stage calls an event script that covers the screen with a "Stage Clear!" picture or something, then segues into the other stage.

Yeah, it is not easy...
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #40 on: June 25, 2010, 11:15:28 AM »
Is there any trick to getting music to loop right? It has something to do with the file length, but I'm lost on the specifics. Worst case scenario I can just loop everything twice then fade out, but I'd like to not have double the filesize if I can prevent it...

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #41 on: June 25, 2010, 11:18:51 AM »
Is there any trick to getting music to loop right? It has something to do with the file length, but I'm lost on the specifics. Worst case scenario I can just loop everything twice then fade out, but I'd like to not have double the filesize if I can prevent it...

To have a precise music loop, I believe you need to have a music file that has a length in seconds of an integer, or slightly below that. Something like 137.9990 seconds.

If your music can't be cut that way, well, sorry.
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #42 on: June 25, 2010, 11:37:11 AM »
Is there any trick to getting music to loop right? It has something to do with the file length, but I'm lost on the specifics.
That is only on the sound effects, not on music. (assuming you are not trying to load music with playSE.) (( Unless I am missing the point then you can ignore this ))

This I would like to know exactly as well, as it is very important for like anybody's game. Listening to Mitori's theme makes me notice the music lit. cut off suddenly, but loops perfect in danmakufu.

I haven't tried Iryan's thing out yet. Anybody who knows the exact details please make a tutorial out of it. I think it would be valuable information.

Also I'll try to dig out the thing about the sound effect limitations, not that it probably matters. Cannot remember if it was in the old Q&A thread or in the FAQ.
« Last Edit: June 25, 2010, 11:40:41 AM by Helepolis »

Azure Lazuline

  • Looooove!!
  • PM me for free huggles and love!
    • Entanma Project - indie game development
Re: Danmakufu Q&A/Problem thread number 4
« Reply #43 on: June 25, 2010, 11:53:46 AM »
I make the length an integer, but looping still messes up. It doesn't just loop at the wrong point either, it stutters and mixes the end with the beginning. I've been trying this for about two hours now with no luck, so I give up. I'll just take the lazy way out (looping in the file a few times) then have an optional download with all WAV files (which loop perfectly) for better looping and quality. Thanks for trying to help, anyway.
If you find a music file that loops perfectly in DMF, link it here so I can examine it a bit...

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #44 on: June 25, 2010, 11:59:22 AM »
If you find a music file that loops perfectly in DMF, link it here so I can examine it a bit...

Listen and analyze Mitori's theme download it here.

Drake

  • *
Re: Danmakufu Q&A/Problem thread number 4
« Reply #45 on: June 25, 2010, 04:42:20 PM »
Mitori's theme doesn't work either; it just repeats for ten minutes. After so many fluid manual repeats it isn't that big a deal.

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

Formless God

Re: Danmakufu Q&A/Problem thread number 4
« Reply #46 on: June 26, 2010, 08:33:09 PM »
Code: [Select]
script_enemy_main {
#include_function ".\function_cutin.txt";
LoadUserShotData("stuff\supershot_v4.1\supershot.txt");
let frame=0;
let cut="script\tutorial\Nazrin.png";
@Initialize {
LoadGraphic(cut);
cutin("NAZRIN","sc",cut,0,0,291,472);

The script simply skips to the stuff in @MainLoop without any cutin animations. I'm sure I put function_cutin.txt and the portrait into my script's folder :/
« Last Edit: June 26, 2010, 08:35:22 PM by Saigyouji Formless Nirvana »

Mr. Sacchi

  • All shall be well and all manner of thing shall be well.
  • Not postponed. Not in the end. Not for long.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #47 on: June 26, 2010, 09:10:26 PM »
This is my question:

So, I'm going with the video tutorials, and, well.
I want to know exactly where to put the "MainTask", like, how to make danmakufu actually know it exists, according to the video I'm doing everything right, the task is down there just like in the video, though when I put it into the script the game crashes, and when I don't the boss does nothing.

When It Crashes:
Quote
@Initialize {
        SetLife(1000);
        SetTimer(320);
   SetScore(10000000);
   SetMovePosition01(GetCenterX,GetCenterY,5);
   LoadGraphic(imgBoss);
   LoadGraphic(cut);
   LoadGraphic(bg);
   
   CutIn(YOUMU,"Red icicle - Fail -",cut,0,0,300,384);

   mainTask;
    }

When it does nothing:
Quote
  @Initialize {
        SetLife(1000);
        SetTimer(320);
   SetScore(10000000);
   SetMovePosition01(GetCenterX,GetCenterY,5);
   LoadGraphic(imgBoss);
   LoadGraphic(cut);
   LoadGraphic(bg);
   
   
CutIn(YOUMU,"Red icicle - Fail -",cut,0,0,300,384);
    }

"mainTask" in both occasions:
Quote
// main task, activates stuff
   task mainTask; {
      yield;
      fire;
      movement;
   }

Some one knows what's happening?

Re: Danmakufu Q&A/Problem thread number 4
« Reply #48 on: June 26, 2010, 09:32:42 PM »
Saigyouji - Read the readme for the Cut-In


Sacchi - Danmakufu crashes because of most likely an infinate loop. try putting : loop(1){yield;} in each task, fire and movement.

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #49 on: June 26, 2010, 09:39:07 PM »
Sacchi - Danmakufu crashes because of most likely an infinate loop. try putting : loop(1){yield;} in each task, fire and movement.
No. That is not how it's done...

@Sacchi, post your entire code in http://www.pastebin.org and show the link here.

Formless God

Re: Danmakufu Q&A/Problem thread number 4
« Reply #50 on: June 26, 2010, 09:41:22 PM »
1) Extract the content of this zip in your scripting directory - check
2) Include 'function_cutin.txt' with '#include_function' in your spellcard - check. Actually I'm not sure what he meant by "in your spellcard".
3) load the cutin portrait - check
4) call the new function in @Initialize with the command 'cutin' - check



And the result would be the piece of code above. I'm not sure if I misplaced anything (especially that #include_function).

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #51 on: June 26, 2010, 09:45:37 PM »
Same goes to you Saigyouji Formless Nirvana, post entire code in pastebin. It's hard to check like this.

Formless God

Re: Danmakufu Q&A/Problem thread number 4
« Reply #52 on: June 26, 2010, 09:54:24 PM »

Helepolis

  • Charisma!
  • *
  • O-ojousama!?
Re: Danmakufu Q&A/Problem thread number 4
« Reply #53 on: June 26, 2010, 10:00:19 PM »
Here it is: http://www.pastebin.org/360788
Ok, just as I expected. The Cutin function (regular or my custom) can only be seen if the card is a spell card. A spell card is triggered in Danmakufu by setting a score: SetScore(value); 

If you don't do this, Danmakufu will ignore @BackGround and Cutin functions. Also you might want to yield you mainloop at the end as well, because the custom cutin is a tasked based script and thus requires the mainloop to yield at the end. You can still use functions in there as long as you yield it at the end.

Here is how it should look like: http://www.pastebin.org/360797

Edit PS:

You may want to swap SetScore , SetLife to the beginning so they are the first things run during @initialize (just incase)
« Last Edit: June 26, 2010, 10:01:57 PM by Helepolis »

Mr. Sacchi

  • All shall be well and all manner of thing shall be well.
  • Not postponed. Not in the end. Not for long.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #54 on: June 26, 2010, 10:42:41 PM »
Alrighty Then,here it is:
http://www.pastebin.org/360831

Re: Danmakufu Q&A/Problem thread number 4
« Reply #55 on: June 26, 2010, 10:47:27 PM »
Alrighty Then,here it is:
http://www.pastebin.org/360831


Just as I thought! First of all you need a yield; in MainLoop to make danmakufu check if their is a task going on. and 2) you have an infinate loop in your fire task, put a wait(what ever number you feel like); in there to make it not crash. Oh, and your missing your movement task.
« Last Edit: June 26, 2010, 10:55:09 PM by Demonbman »

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #56 on: June 26, 2010, 10:49:31 PM »
Ah...

1. You don't have a "movement;" task or function defined, it seems, so if danmakufu crashed with an error, that would be perfectly normal.

2. If that is the code where you have the MainTask "in the code", then you are making a classic mistake:
You need to put your tasks somewhere inside the {} brackets of script_enemy_main for them to be recognized. To avoid confusion, they are usually put at the end of your script. That means behind the @Finalize{} part, but still within the script_enemy_main{} brackets. you need to move the closing } bracket behind @Finalize way down below the closing bracket of your last task.
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Re: Danmakufu Q&A/Problem thread number 4
« Reply #57 on: June 26, 2010, 11:28:08 PM »
I wonder...what happens to the graphics that you don't delete? Are they deleted anyway? Lets say that perhaps you forgot to put DeleteGraphic(what ev); in Finalize, would that cause the image to remain there forever?

Iryan

  • Ph?nglui mglw?nafh
  • Cat R?lyeh wgah?nagl fhtagn.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #58 on: June 26, 2010, 11:29:55 PM »
I wonder...what happens to the graphics that you don't delete? Are they deleted anyway? Lets say that perhaps you forgot to put DeleteGraphic(what ev); in Finalize, would that cause the image to remain there forever?
I believe it stays loaded into memory until you close danmakufu or at least until you reach the main menu again, wasting processing power.
Old Danmakufu stuff can be found here!

"As the size of an explosion increases, the numbers of social situations it is incapable of solving approaches zero."

Mr. Sacchi

  • All shall be well and all manner of thing shall be well.
  • Not postponed. Not in the end. Not for long.
Re: Danmakufu Q&A/Problem thread number 4
« Reply #59 on: June 27, 2010, 01:33:53 AM »
The Whole Code: http://www.pastebin.org/361009

Image to the error http://img37.imageshack.us/f/oshitj.png/

Explanation:
Alright so danmakufu just decided to randomly cause a error on the wait function, a function I haven't touched in ages since I began going through the video tutorials.
Anybody know what caused this?