Author Topic: Danmakufu 0.12m: Coding Challenges (Challenges 1~10 ready for scripting!)  (Read 24574 times)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #30 on: February 16, 2013, 02:18:32 AM »
A solution for Challange 4 has finally been posted.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #31 on: February 16, 2013, 10:17:47 PM »
Challenge 5:

Create a plural script that links to one nonspell and one spell. All bullets must have an angular velocity. The spell must have bullets with acceleration. The boss must move in both spells. CreateLaserC must be used in the spell. Bubble bullets must be used in the nonspell. Koishi's hearts must be used in one of the attacks. (in honor of Valentines Day.) You will require an external shotsheet for this challenge.

Banned commands:

Required commands:
SP*CreateLaserC
SP*SetLaserDataC
SP*FireShot
LoadUserShotData

The difficulty should be around Normal.

Completed by:
Qwertyzxcv
Darkness1 [Project Tread w/ Link] (Koishi)
« Last Edit: March 11, 2013, 10:40:18 PM by Sparen »

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #32 on: February 17, 2013, 02:01:58 AM »
Koishi's hearts must be used in one of the attacks. (in honor of Valentines Day.)
That means we have to download a shotsheet?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #33 on: February 17, 2013, 02:23:39 AM »
That means we have to download a shotsheet?

You should get a shotsheet for this one. Getting to know a good shotsheet will help you later on. If you have time, you should also try to make your own.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #34 on: February 17, 2013, 02:47:23 AM »
For some odd reason Laser C commands won't work...

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #35 on: February 17, 2013, 04:08:47 AM »
You should get a shotsheet for this one. Getting to know a good shotsheet will help you later on. If you have time, you should also try to make your own.
And because there arent hearts with the defaults bullets  :V

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #36 on: February 17, 2013, 04:16:58 AM »
And because there arent hearts with the defaults bullets  :V
If you need any help with using your Shotsheet, PM me I'll be able to help you.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #37 on: February 17, 2013, 03:38:30 PM »
For some odd reason Laser C commands won't work...

Code: [Select]
    if(count % 500 == 0 && angle % 2 == 0 && count > 0){
      loop(3){
CreateLaserC(1, GetX, GetY, 10, 240, angle-1, 0);
SetLaserDataC(1, 0, 8, angle*45+angle2, 8, 0, 3);
SetLaserDataC(1, 60, 4, NULL, 0, 0, 3);
FireShot(1);
angle2+=120;
      }
      PlaySE(GetCurrentScriptDirectory~"laser.wav");
    }
The following code, when executed,creates three curved lasers that start with a width of 10 and a length of 240 with a graphic of angle-1 (GetArgument).
At 0 frames, it sets speed to 8, sets angle to GetArgument*45+angle2, with an angular velocity of 8, no acceleration, and a min speed of 3.
At 60 frames, it sets speed to 4, keeps its current angle, and goes straight with no acceleration.
The shot is fired, and after looping three times, a SFX is played.

Angle has been predefined as GetArgument, and refers to the color of the laser,

Does this help?

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #38 on: February 17, 2013, 05:45:06 PM »
Code: [Select]
    if(count % 500 == 0 && angle % 2 == 0 && count > 0){
      loop(3){
CreateLaserC(1, GetX, GetY, 10, 240, angle-1, 0);
SetLaserDataC(1, 0, 8, angle*45+angle2, 8, 0, 3);
SetLaserDataC(1, 60, 4, NULL, 0, 0, 3);
FireShot(1);
angle2+=120;
      }
      PlaySE(GetCurrentScriptDirectory~"laser.wav");
    }
The following code, when executed,creates three curved lasers that start with a width of 10 and a length of 240 with a graphic of angle-1 (GetArgument).
At 0 frames, it sets speed to 8, sets angle to GetArgument*45+angle2, with an angular velocity of 8, no acceleration, and a min speed of 3.
At 60 frames, it sets speed to 4, keeps its current angle, and goes straight with no acceleration.
The shot is fired, and after looping three times, a SFX is played.

Angle has been predefined as GetArgument, and refers to the color of the laser,

Does this help?

Not one bit, it still won't run... ( I substituted the variables too)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #39 on: February 17, 2013, 05:45:31 PM »
Please submit code.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #40 on: February 17, 2013, 07:51:10 PM »
Code: [Select]
task fire{
 let count = 0;
 let angle = 0;
 let angle2 = 50;
if(count % 500 == 0 && angle % 2 == 0 && count > 0){
      loop(3){
CreateLaserC(1, GetX, GetY, 10, RED05, angle-1, 0);
SetLaserDataC(1, 0, 8, angle*45+angle2, 8, 0, 3);
SetLaserDataC(1, 60, 4, NULL, 0, 0, 3);
FireShot(1);
angle2+=120;
      }
     
    }

         
        }

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #41 on: February 17, 2013, 08:31:03 PM »
Code: [Select]
CreateLaserC(1, GetX, GetY, 10, RED05, angle-1, 0);
SetLaserDataC(1, 0, 8, angle*45+angle2, 8, 0, 3);
SetLaserDataC(1, 60, 4, NULL, 0, 0, 3);

Time to introduce you to something very helpful!
http://dmf.shrinemaiden.org/wiki/Bullet_Control_Functions_(0.12m)#CreateLaserC
You have wonderfully messed up your arguments.
CreateLaserC(ID, X, Y, width, length, graphic, delay);

angle-1 is my graphic. 240 was my length. I clarified that angle wasn't actually an angle measure (I was just too lazy to make a new variable), but it seems that it messed up. Below is what was at the top of my code.
Code: [Select]
let angle = GetArgument;
You should be using this:
Code: [Select]
CreateLaserC(1, GetX, GetY, 10, width, graphic, 0);
« Last Edit: February 17, 2013, 08:33:10 PM by Sparen »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #42 on: February 23, 2013, 04:37:23 PM »
A solution to Challenge 5 has been posted.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #43 on: February 24, 2013, 01:57:27 AM »
Challenge 6:

Create a spell with only lasers. The spell's name must be longer than three words. You must use CreateLaserA. Lasers must be a shade of blue and/or a shade of yellow. You are not allowed to use the built in shots that come with Danmakufu.

The error regarding the banned commands has been resolved, and the challenge is now possible.

Banned commands:
CreateShot01
CreateShot02
CreateShot11
CreateShot12
CreateShotA
SetShotDataA
Obj_Create(OBJ_SHOT)

Required commands:
CreateLaserA
SetLaserDataA
FireShot
LoadUserShotData
CutIn || cutin

There is no recommended difficulty.

Completed by:
Darkness1 [Project Thread w/ Link] (Kotohime)
Qwertyzxcv
« Last Edit: March 09, 2013, 10:36:33 PM by Sparen »

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #44 on: February 24, 2013, 03:38:52 AM »
Questions:
Challenge 5: Does there have to be an image because its a moving boss?
Challenge 6: No built in shots means a shotsheet? And can I do different scripts for different difficulties

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #45 on: February 24, 2013, 02:30:00 PM »
Questions:
Challenge 5: Does there have to be an image because its a moving boss?
Challenge 6: No built in shots means a shotsheet? And can I do different scripts for different difficulties

@5: Use a shot sheet. You will not need to use enemy graphics for challenges 1-6. Heck, you don't need to use any backgrounds/cutins/etc. It's completely unrelated to the boss graphic.
@6 Yes, an external shotsheet. Danmakufu's built in shots are too limited. Feel free to use different difficulties.

Ozzy

  • Veteran Danmakufu Scripter
  • Currently working on a full Touhou fangame!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #46 on: February 24, 2013, 05:50:50 PM »
@5: Use a shot sheet. You will not need to use enemy graphics for challenges 1-6. Heck, you don't need to use any backgrounds/cutins/etc. It's completely unrelated to the boss graphic.
@6 Yes, an external shotsheet. Danmakufu's built in shots are too limited. Feel free to use different difficulties.
Um, just letting you know that LoadUserShotData is sort of required to use external shotsheets. So this challenge is currently impossible.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #47 on: February 24, 2013, 06:43:48 PM »
Um, just letting you know that LoadUserShotData is sort of required to use external shotsheets. So this challenge is currently impossible.

Thanks for telling me.

...It was a typo. I put it in the wrong section. The challenge should be possible now.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #48 on: March 02, 2013, 02:04:31 AM »
Wow. This thread is dead now.

Anyway, I'll be posting a solution to the current challenge soon.

Edit: Solution posted.
« Last Edit: March 02, 2013, 02:20:28 AM by Sparen »

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #49 on: March 02, 2013, 02:37:52 AM »
Wow. This thread is dead now.

Anyway, I'll be posting a solution to the current challenge soon.

Edit: Solution posted.
:ohdear: OH NOEZ! Ill do challenge 6


Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #50 on: March 02, 2013, 10:37:39 PM »
Questions:
1. Does challenge 6 require a title? Or do you mean if there is a title, it should be more than 3 words?
2. Can I make it a time-out card?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #51 on: March 02, 2013, 10:39:38 PM »
Questions:
1. Does challenge 6 require a title? Or do you mean if there is a title, it should be more than 3 words?
2. Can I make it a time-out card?

1) You are required to use either cutin or CutIn, so answer the question for yourself.
2) Sure.

If it says you can't do it, you can't do it. If it says you have to do it, you have to do it. If it doesn't say anything about it, go ahead and do it if you want. I have a name requirement because being able to come up with a good spellcard name is always a nice skill to have.

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #52 on: March 02, 2013, 11:11:43 PM »
1) You are required to use either cutin or CutIn, so answer the question for yourself.
2) Sure.

If it says you can't do it, you can't do it. If it says you have to do it, you have to do it. If it doesn't say anything about it, go ahead and do it if you want. I have a name requirement because being able to come up with a good spellcard name is always a nice skill to have.
1) Whoops, didn't see that  :derp:
2) yay :3
mmkay

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #53 on: March 03, 2013, 03:56:05 PM »
Challenge 7:

Create a spell using the KOUMA cutin. All bullets must be a shade of green, and rand must be used. You are not allowed to use GetAngleToPlayer, and all uses of rand must be used in conjunction with either loop, ascent, or descent. Lasers are allowed but not required. Enemy scripts are not allowed, and object lasers are not allowed.

Banned commands:
Obj_Create(OBJ_LASER)
Obj_Create(OBJ_SINUATELASER)
GetAngleToPlayer
CreateEnemyFromFile

Required commands:
rand && (loop || ascent || descent)
CutIn

Difficulty should be around Normal to Hard.

Completed by:
Darkness1 [Project Tread w/ Link] (Sanae) *
« Last Edit: March 11, 2013, 11:00:16 PM by Sparen »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #54 on: March 07, 2013, 11:49:50 PM »
@Qwertyzxcv.

"... -- Lunatic -- ..."

Does not qualify as three words or more. XD

Also, that script almost overheated my processor, and it was way too easy on Lunatic. ~Curvy Lasers~~Destroy processors~

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #55 on: March 08, 2013, 01:02:55 AM »
@Qwertyzxcv.

"... -- Lunatic -- ..."

Does not qualify as three words or more. XD

Also, that script almost overheated my processor, and it was way too easy on Lunatic. ~Curvy Lasers~~Destroy processors~
um...i ithought the cutin had titles, OH, the one without music has titles. :D
lol mine was running at 40fps xD I dunno how to fix it  ??? :derp:

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #56 on: March 11, 2013, 11:00:53 PM »
A solution for challenge 7 has been posted.

Darkness1's three new scripts for Challenges 2, 5, and 7 are under their respective posts.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #57 on: March 14, 2013, 12:34:29 AM »
Challenge 8:

Create a spell with a cutin image. You are required to use SFX. You are not allowed to use any object attacks for this challenge. You may not use tasks for anything unless it is from an animation library or is purely graphical. You are required to use one bullet shape & size (As in, one set of bulletIDs. You are allowed to manipulate the bullet however you want in the script.) but can use whatever colors you wish. You are not allowed to use GetAngleToPlayer. Lasers are allowed, but you'll have to stretch graphics from the same size and shape.

Banned commands:
Obj_Create(OBJ_SHOT)
Obj_Create(OBJ_LASER)
Obj_Create(OBJ_SINUATE_LASER)
GetAngleToPlayer

Required commands:
CutIn || cutin
PlaySE

Difficulty should be around Normal to Hard.

Completed by:
« Last Edit: March 17, 2013, 04:49:31 PM by Sparen »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges (Challenges 1~9)
« Reply #58 on: March 17, 2013, 04:23:14 PM »
Challenge 9:

Create a non spell where you only use ADD bullets. You are required to use more than three colors of bullets. It cannot use rand or rand_int unless those are for a purely graphical purpose. You are required to in/decrement variables using +=, -=, ++, or --. Lasers are not allowed.

Banned commands:
Obj_Create(OBJ_LASER)
Obj_Create(OBJ_SINUATE_LASER)
rand
rand_int
CreateLaser01
CreateLaserA
CreateLaserB
CreateLaserC
SetLaserDataA
SetLaserDataB
SetLaserDataC

Required commands:
none

Difficulty should be around Normal.

Instead of posting my own solution, I'm just going to point people in the direction of Miko's Guze Flash.

Completed by:

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
A solution for Challenge 8 has been posted.

Edit: So has a screenshot.