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

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
What is this thread?

Basically, this is a place where I'll post requirements and restrictions for Danmakufu scripts! These are meant to provide ideas for scripts and to allow newer scripters to test their abilities (and get practice with Danmakufu). I'll avoid making a challenge too hard or too easy. I may attach possible solutions if I have time. I'll try to post a challenge every few days (or every week or so). This is not a competition, just a place to think about coding a bit. I hope that this thread gives Danmakufu scripters new insight and helps them improve their scripting.

Each challenge features a list of restrictions and requirements, as well as banned and required commands.

To new people: I suggest reading page by page and doing challenges in order rather than just doing the last one. There's actually a controlled progression between challenges, and each one has different restrictions and requirements.

Rules:
1) NO PH3. PERIOD.
2) I don't want spam in this thread AT ALL.
3) If you want me to look at your script(s) and review them, you must PM me and either attach the scripts without music or send a link where I can obtain your script. I will try to give you feedback if I can. Don't feel obliged to send me anything. If you're PMming me, please do NOT post music. It takes up space and can't always be run perfectly. If you're posting your script link in-thread, feel free to post music that doesn't take forever to download.
4) Make sure that your script package has only the bare minimum needed to run the script. No unused pictures, scripts, SFX, or music please.
5) If you want to have your script posted publicly, PM me with the download link (stating that you would like for it to be displayed) and under the list of challengers, I'll put your script below. I will only post it if it works, however. I'll test everything before I put a public download link to it. Also, if you post a download link on your thread, I will link to your page. If you violated a rule or forgot to do something, there will be a * next to your name.
6) Remember: This is your work. If it inspires you, that's excellent. If you have a script that you really like, there's no shame in hiding it (check with me beforehand though so that I can warn you if there is something terrifying about it that may not get good reviews).
7) Avoid reviewing submitted scripts here. If the scripters have their own RaNGE thread for their projects, you may want to consider posting there.
8) No flaming, and no troll scripts. The only exceptions are masterfully created troll scripts like THIS.
9) Constructive criticism is welcome from any and all posters. However, this is NOT a competition, and I am not its judge.

Remember that the restrictions are here to limit you and get you to think about what you plan to do in a different way. They're not meant for you to try to reprogram. Don't feel obliged to do ANYTHING here. I hope that the challenges I post will inspire scripters and help them learn new functions, techniques, and ways of thinking.

To all who need help with any of these, remember that there is a function list on the Danmakufu Wiki. (Very helpful, and very important!)

All questions and comments should be PMmed, although major questions may be posted here for all to see or may be posted in the Q&A thread.

FYI: I will not post new challenges until I have uploaded my own solution or at least one person has submitted a solution. You may submit solutions for ANY challenge, and I will review it. There is no end date to anything here, as long as I'm still part of this forum and still using Danmakufu 0.12m.

Challenge Archive

Challenge 01 [Start Feb 04, 2013] (2 submissions)
Challenge 02 [Start Feb 07, 2013] (4 submissions)
Challenge 03 [Start Feb 08, 2013] (2 submissions)
Challenge 04 [Start Feb 10, 2013] (0 submissions)
Challenge 05 [Start Feb 16, 2013] (2 submissions)
Challenge 06 [Start Feb 23, 2013] (2 submissions)
Challenge 07 [Start Mar 03, 2013] (1 submission(s))
Challenge 08 [Start Mar 13, 2013] (0 submissions)
Challenge 09 [Start Mar 18, 2013] (0 submissions)
Challenge 10 [Start Mar 27, 2013] (0 submissions) NEW!
« Last Edit: March 28, 2013, 03:17:01 AM by Sparen »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #1 on: February 04, 2013, 10:40:41 PM »
Challenge 1:

Create a script with three different attack patterns, all of which are executed individually, then repeated. It should be one .txt file controlling the entire thing. (For example, Yuyuko in TD's second spell, I think).
The first should involve rings of different speeds, in any shape or form. They can be normal rings, Ayarings, etc. Whatever strikes you as interesting to do.
The second should involve bullets that do not spawn at the boss's location (GetX, GetY), but do not spawn a certain distance from the sides either. (use trigonometric functions if in doubt)
The third part should involve non-curvy lasers.

Banned commands:
CreateLaserC/SetLaserDataC

This script should be one txt file, and should be around Normal-Hard in difficulty.

A possible solution has been attached. (Edit: It no longer has function cutin. Thanks to Lavalake for reporting the bug)

Completed by:
Phantom Song [Project Thread w/ Link] (Yuyuko)
Lavalake [Download]
« Last Edit: March 02, 2013, 08:54:33 PM by Sparen »

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #2 on: February 04, 2013, 11:18:11 PM »
So in a way it's a contest?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #3 on: February 04, 2013, 11:30:48 PM »
So in a way it's a contest?

Nope. Just challenges for people to rack their brains on. It's not meant to be a competition. It's for scripters to test their abilities and ingenuity to wrap their heads around things.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #4 on: February 05, 2013, 12:40:43 AM »
Wait, why no music? e.e
« Last Edit: February 05, 2013, 12:59:37 AM by PhantomSong »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #5 on: February 05, 2013, 01:00:54 AM »
No music because...
1) This is more about the coding than music.
2) Music takes a lot of space
3) I can't run .mp3 files with my Danmakufu

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #6 on: February 05, 2013, 01:07:02 AM »
@Phantom Song

Interesting script! I do have to say that the first attack was completely impossible (like, that was beyond overdrive mode. Seriously). In all honesty, it probably belongs on your project page. It was really nice once I reached the dodgeable part. XD

But yeah, I should be more specific. Basically, the aim was to have one attack that would alternate between sub attacks. For example, the Koishi Hells have one attack that has different parts.

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #7 on: February 05, 2013, 01:26:14 AM »
To disable smileys, go to and "Attachments and Other Options" and check "Don't use smileys."
« Last Edit: February 05, 2013, 09:32:34 PM by Qwertyzxcv »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #8 on: February 05, 2013, 01:32:11 AM »
To disable smileys, go to and Attachments and other options [/size]and check Don't use smileys.[/b]

Thanks! Now I can fix the weird 8 and ) (8)) error!

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #9 on: February 05, 2013, 01:46:09 AM »
@Phantom Song

Interesting script! I do have to say that the first attack was completely impossible (like, that was beyond overdrive mode. Seriously). In all honesty, it probably belongs on your project page. It was really nice once I reached the dodgeable part. XD

But yeah, I should be more specific. Basically, the aim was to have one attack that would alternate between sub attacks. For example, the Koishi Hells have one attack that has different parts.

Actually the first spell is very doable just hug the second ring. I still need to set durable spell card on it however... xD

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #10 on: February 05, 2013, 02:53:17 AM »
@Lavalake: I got your challenge. However... I had to do a bit of function and pathname tweaking. I've attached the version that works for me at the end of this post.

Just to let you know, the version you sent me doesn't load any bullets because of the way the filepaths were structured. I went ahead and fixed it. The attack is pretty good, just to let you know (though those player targeting bullets looked pretty interesting~)

Nice job, anyhow. If you want me to put your script under the Challenge participants' section though, you'll have to reupload the script to Mediafire. Keep in mind for the future: I know that you tend to do a lot of stuff using hard paths, but not everyone structures their Danmakufu the same way. Probably the reason why you had so many bullet issues with Mythic Lullaby.

Edit: Now that the attachment is useless, it has been removed.
« Last Edit: February 05, 2013, 09:00:58 PM by Sparen »

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #11 on: February 05, 2013, 09:11:17 PM »
@Lavalake:
It's a nice script, however I did have some things to note:
1. If I'm not mistaken, the first part was suppose to be all rings (Like Aya's MoF Nonspells)
2. There's a hitbox on an invisible sprite, which is not good.
3. I think you could of added a concentration before each attack came because you could be killed out of no where after the first laser wave. I finally got it after 5 or 6 times...

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #12 on: February 05, 2013, 09:32:50 PM »
@Lavalake:
It's a nice script, however I did have some things to note:
1. If I'm not mistaken, the first part was suppose to be all rings (Like Aya's MoF Nonspells)
2. There's a hitbox on an invisible sprite, which is not good.
3. I think you could of added a concentration before each attack came because you could be killed out of no where after the first laser wave. I finally got it after 5 or 6 times...

The first part: It did not have to be like that. It's up to the scripter how they want to approach rings. Stating that would be too limiting.
2) ??? Do you have the latest version?
3) ...the lasers were pretty slow...

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #13 on: February 05, 2013, 09:35:53 PM »
No PhantomSong script download?

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #14 on: February 05, 2013, 10:48:08 PM »
No PhantomSong script download?
It's on my Danmakufu thread

The first part: It did not have to be like that. It's up to the scripter how they want to approach rings. Stating that would be too limiting.
2) ??? Do you have the latest version?
3) ...the lasers were pretty slow...
1. Ok, I was confused. You. Gotta. Word. Things. Better.
2. I'm pretty sure I do.  (The attached one?)
3. I'm talking when the rings appears.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #15 on: February 07, 2013, 10:38:10 PM »
Challenge 2:

Create a script using only blue, green, and aqua bullets. (i.e, no white or warm colors). You may not use rand, rand_int, or GetAngleToPlayer in this script. That includes boss movement, but does not include @DrawLoop. Lasers are allowed in any shape or form (but are likewise limited by color).

The aim of this challenge is to force scripters to think about both the theme of their attack and to create patterns that are not BSsed.

@Qwertyzxcv: Using GetPlayerX, GetPlayerY are fine, though the point is to make a pattern that doesn't aim at the player.

Remember: There's more than one way to cover up blind spots.

Banned commands:
rand (allowed in DrawLoop)
rand_int (allowed in DrawLoop)
GetAngleToPlayer

This script should be one txt file, and should be around Normal-Hard in difficulty.

I have uploaded a solution with two files, the second of which is a variation of the first. (or well, it's what I intended the first to be). There's also a screenshot.

Completed by:
Lavalake [Download]
Phantom Song (Suwako)
Qwertyzxcv
Darkness1 [Project Tread w/ Link] (Nitori)
« Last Edit: March 11, 2013, 10:39:52 PM by Sparen »

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #16 on: February 07, 2013, 11:08:12 PM »
I have a question about the second challenge:
Can we use GetPlayerX or GetPlayerY - or + whatever? (You would be forced to move.)

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #17 on: February 07, 2013, 11:42:13 PM »
I have a question about the second challenge:
Can we use GetPlayerX or GetPlayerY - or + whatever? (You would be forced to move.)


Challenge 2:

You may not use rand, rand_int, or GetAngleToPlayer in this script. That includes boss movement, but does not include @DrawLoop.

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #18 on: February 07, 2013, 11:45:49 PM »

GetPlayer, not GetAngleToPlayer.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #19 on: February 07, 2013, 11:47:40 PM »
GetPlayer, not GetAngleToPlayer.

I'd assume you can't.

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #20 on: February 07, 2013, 11:56:07 PM »
Challenge 2:

Create a script using only blue, green, and aqua bullets. (i.e, no white or warm colors).

B-b-b-but my warm and cold color mixes are what I'm known for. D: Oh well...
« Last Edit: February 08, 2013, 12:04:03 AM by PhantomSong »

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #21 on: February 08, 2013, 12:08:12 AM »
Edit: GetPlayerX and GetPlayerY are allowed. Just don't use them as a cheap way to derive a formula.

Let me make this clear: This is NOT a competition and it is NOT a thread to please me. This is to get you to explore new possibilities and test what you already know and are capable of. Learn from other scripters and improve your Danmakufu skills. THAT is the purpose of this thread.

@PhantomSong: Sorry~ Next time there will be different restrictions.

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #22 on: February 08, 2013, 10:28:03 PM »
Challenge 3:

Create a script where the main boss is invincible, but not by using SetInvincibility. Load Enemy scripts, all of which must be defeated before the boss can be damaged (unless the player uses a piercing attack or a bomb). The boss is not allowed to fire any attacks; all attacks must be made by the summoned enemies. No shots may be declared in the main script.
More than one bullet graphic must be used. Lasers may be used in any shape or form.

Banned commands:
^rand
rand_int
*CreateShot01/CreateShot11/CreateShot02/CreateShot12/CreateShotA/SetShotDataA/FireShot
*CreateLaser01/CreateLaserA/CreateLaserB/CreateLaserC/SetLaserDataA/SetLaserDataB/SetLaserDataC/AddShot
*Obj_Create(OBJ_SHOT)
*Obj_Create(OBJ_LASER)
SetInvincibility

*Restriction only applies to the main script
^May only be used with SetMovePosition## or SetMovePositionHermite.

Required commands:
CreateEnemyFromFile

There is no suggested difficulty.

An attached script is available for those who are curious to what the challenge entails.

Completed by:
Lavalake [Download]
Darkness1 [Project Tread w/ Link] (Reimu)
« Last Edit: March 11, 2013, 10:40:04 PM by Sparen »

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #23 on: February 08, 2013, 11:02:53 PM »
Oi! Looks like I'm sticking this one out! But it seems rather interesting.

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #24 on: February 08, 2013, 11:20:55 PM »
Woah! A third challenge? I didn't even do the first one yet! xD

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #25 on: February 09, 2013, 03:40:38 AM »
Woah! A third challenge? I didn't even do the first one yet! xD
You don't have to make it perfect. Just quickly jot down your CreateShot/Laser01's and A's and some movement and VOILA!
(Despite my Yuyuko's Script just derping in the center of the screen xD)

Qwertyzxcv

  • yas
  • k!
Re: Danmakufu 0.12m: Coding Challenges
« Reply #26 on: February 09, 2013, 03:44:45 AM »
You don't have to make it perfect. Just quickly jot down your CreateShot/Laser01's and A's and some movement and VOILA!
(Despite my Yuyuko's Script just derping in the center of the screen xD)
Haha, I liked your Yuyuko script! :)

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #27 on: February 10, 2013, 07:52:45 PM »
Challenge 4:

Create a plural script that links to one nonspell and one spell. The loop/ascent/descent functions may not be used in the nonspell. You must use four angle measures in the spell. rand and rand_int may not be used in the spell. CreateShotA must be used in both the nonspell and spell.

Basically, if there are any rings of anything in the nonspell, you're either not following directions are cutting corners. Unless you have a really creative way to do this.

Banned commands:
SP*rand()
SP*rand_int()
NS*loop()
NS*ascent()
NS*descent()

Required commands:
CreateShotA()
SetShotDataA()
FireShot()

The difficulty should be around Normal to Hard.

Completed by:
« Last Edit: February 16, 2013, 02:20:19 AM by Sparen »

PhantomSong

  • The Ghost Living through Everyday Life.
  • Eh, it doesn't matter.
Re: Danmakufu 0.12m: Coding Challenges
« Reply #28 on: February 12, 2013, 02:19:39 AM »
Wait when you mean loop, you mean it can't loop, or be done over?

Sparen

  • Danmakufu Artist
  • Git ready, git set, PUUSH!
    • AFCDTech
Re: Danmakufu 0.12m: Coding Challenges
« Reply #29 on: February 12, 2013, 02:34:41 AM »
Wait when you mean loop, you mean it can't loop, or be done over?

You cannot use loop functions, like
Code: [Select]
loop(7){CreateShot01(GetX, GetY, 3, angle4, 37, 10);} or
Code: [Select]
ascent(i in 0..8){CreateShot01(GetX, GetY, 2+0.01*i, angle+6*i, i, 0);}
Danmakufu will automatically loop your main loop. Do not worry; your script will still run.

Basically, this loop restriction bans rings, bans waves of bullets, bans blasts of multispeed bullets, etc.  You will have to create one bullet at a time. No cutting corners either.