Author Topic: New DMF character: Sakuya A  (Read 16798 times)

Stuffman

  • *
  • We're having a ball!
New DMF character: Sakuya A
« on: April 25, 2009, 11:55:18 PM »


Here you go, one playable Sakuya A for Danmakufu, mostly faithful to her PCB version. This is gonna be the subject of my make-a-player tutorial, as she covers many advanced concepts, but I figured I'd let you guys try it out while I'm still typing it up.

http://www.box.net/shared/dvfyvu8byq

EDIT: Updated 8/9/09
« Last Edit: August 09, 2009, 04:34:04 PM by Stuffman »

Hat

  • Just an unassuming chapeau.
  • I will never be ready.
Re: New DMF character: Sakuya A
« Reply #1 on: April 26, 2009, 12:10:30 AM »
Oh, you're already making a tutorial for that? Okay... XD I'd like to know how to make lock-ons for player characters, so get that tutorial done! D=<

Re: New DMF character: Sakuya A
« Reply #2 on: April 26, 2009, 12:20:26 AM »
Plays very well. Looking forward to this tutoria script.

Re: New DMF character: Sakuya A
« Reply #3 on: April 26, 2009, 12:31:32 AM »
Wow. It takes quite a bit of code to make a character.

Good work.

Hat

  • Just an unassuming chapeau.
  • I will never be ready.
Re: New DMF character: Sakuya A
« Reply #4 on: April 26, 2009, 03:24:37 PM »
Ooh, this is awesome! I just tried her out, this is so great!

Garlyle

  • I can't brain today
  • I have the dumb
    • Tormod Plays Games
Re: New DMF character: Sakuya A
« Reply #5 on: April 27, 2009, 09:49:19 AM »
New characters what!?

Sweet :3

I should create a character myself.  Seriously.  I've got odd little characters sitting around that do stuff as is... and if I want to follow through on any of my inspiration I should probably put one together.  Or... a few :3

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #6 on: May 03, 2009, 01:05:57 AM »
Updated download in original post. Sakuya now has four bombs per PCB but they've been nerfed greatly. Purple knife damage was also reduced.

Since I already have most of the media I may go ahead and make Sakuya B at some point.

Re: New DMF character: Sakuya A
« Reply #7 on: May 03, 2009, 01:17:56 AM »
What's the main difference between the two versions of each bomb?

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #8 on: May 03, 2009, 01:57:24 AM »
Just damage. They were overpowered before and I nerfed them even harder since I upped it to 4 bombs, they should do less damage than Reimu's now. Also the knives on Killing Doll do only marginally more damage if they spawn on top of the boss while spinning now, I found out that it made the damage insane if you did it before.

Of course having four bombs is great, but you'll need more than one if you want to clear a spell outright, probably. I suppose it makes her better for stage portions.

Re: New DMF character: Sakuya A
« Reply #9 on: May 03, 2009, 02:15:26 AM »
I see what you mean. Right now "Indescriminate" does so little damage to anything you're not directly on top of. I would suggest increasing the damage by a fairr bit, but setting half the knives' intersection point after about 10 frames have passed (for example, only the blue knives have an intersection circle immediately, while the purple knives have one after ten frames or something). This way you still do more damage if you're on top of an enemy, but the rest of the screen is still taking a decent amount of damage as well.

I've been really concerned about your focused Sakuya's homing attack. I've been trying a few things to get it to select another target if the current one is out of it's test_angle, but I really don't understand how enemy enumeration works, or how to diddle with it properly. I was thinking something like, if(test_angle>-60 && test_angle<-120){ Re-enumerate, but select a different enemy, then run through the angle portion again}, but I'm not sure how this would work out. As you've said, if the enemy it's currently selected moves out of it's homing angle, it just shoots upwards instead of enumerating another another enemy. I just don't know how to select a different enemy out of an enumerated list.

I hope that thought bubble aids you in finding a way to fix this, at this point I think this enemy enurmeration thing a bit over my head for me to really be of assistance.

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #10 on: May 03, 2009, 02:28:57 AM »
Hmm, maybe I'll do with it what I did with Josette G's big shot and make Indiscriminate knives do more damage the farther they travel to offset the lower shot density.

And yeah apparently the little targetting bit I made isn't working to make Sakuya pick valid targets, I haven't really screwed around with it much since I usually wind up using unfocused during stages anyway. I'll mess with it some more tomorrow.

Also Sakuya keeps homing in on Yuka's invincible familiars in Phantasm Romance. Fffff.
« Last Edit: May 03, 2009, 02:31:06 AM by Stuffman »

Re: New DMF character: Sakuya A
« Reply #11 on: May 03, 2009, 02:37:49 AM »
If you do end up figuring it out, could you try to explain what you did in it? I'm really having a hard time with enemy enumeration and would like to better know how it works. Just pouring over scripts isn't doing much, unfortunately.

And yeah, I've tested Sakuya on many spell cards and stages with different types of enemies. REIMU_A's shots will only home in on things with hitboxes (SetCollisionA must be called inside of the enemy script) that aren't invincible, and as soon as the enemy is destroyed they will move onto another target and wont be deleted until they hit something or hit the Auto-Delete boundry (they don't die after a set period of time, or the time is large enough that I just haven't noticed it yet). For your Sakuya's shots, they just aim at the first thing they can and will until it dies, which unfortunately always ends up being familars spawned by bosses... Anyways, I leave it to you until I learn more about this enumeration crap.

EDIT: Does your Josette Y properly enumerate enemies? I know that it ignores anything with a million life, but does it have the same issue with familiars and stuff? Wait, it still homes in even if the enemy is behind you... But does it still home onto unimportant things instead of the main boss?
« Last Edit: May 03, 2009, 02:44:55 AM by Naut »

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #12 on: May 03, 2009, 03:25:44 AM »
Well I at least fixed the far-targetting issue, I got her to at least pick the enemy closest to her in x-coordinate as her target, so that fixes that. But she'll still target those familiars.

And yes, a quick check determines Josette Y has the same problem.

I think I have an idea of how to maybe fix it, at least for bosses. There's some function that checks if there's an active boss, and I can force the homing to go after the boss in that case. I don't think I'll be able to do it with enumeration alone, unless my theory that the enemy at EnumEnemyBegin is always the boss is correct.

To be fair I think it's a mistake on the designer's part to use enemy scripts for familiars that can't be destroyed, they could've used objects instead. Incidentally, I really really wish we could see the default Reimu and Marisa scripts.

Also Sakuya's knives aren't able to turn after firing by design, they can't actively home in like Reimu's can. They get shot at the target and if they miss, they miss.

I might have another update tomorrow if my idea works.

Re: New DMF character: Sakuya A
« Reply #13 on: May 03, 2009, 04:58:03 AM »
I dunno why I included the part about Reimu's shots continuing to home if their target is destroyed, I knew that Sakuya's where just arctan'd normal shots....

Anyways, I'm pretty sure your theory about the first enemy enumerated being the boss isn't correct. Or shouldn't be, at least. It is almost always right, however, and I can almost guarentee that just from a logical standpoint. Here's the thought process:

At first I thought you were correct, it made sense, the boss is always the first thing spawned in a script. So in spell-cards, you're right, it is usually the first enemy it will enumerate. However, enemies will not get deleted until a spellcard ends, so any enemies left over from the stage portion or attack before a spellcard are still enumerated, and will be earlier on the list because they existed before the boss. That's my thinking anyway. It would be best if the function was coded to force bosses to the front (or back, but we know it isn't) of the list, which would be ideal, but who knows really.

I do agree with your wish, there are many things I would like to see in both Reimu and Marisa's scripts. Reimu_A's Godly-coded homing shots, Marisa_B's lasers.... Even the spellcards would be interesting so see.

Also, I'm not so good with drawing verticies and whatnot, so I still use enemy scripts for familiars instead of object scripts. I would prefer to use objects, since using the same global variables would be awesome and object scripts run faster than seperate enemy scripts, but I'm not confident enough in my ability to draw images using verticies. This wouldn't be an issue if we could just see how Reimu targets things... Ergh.

EDIT: Spelling...
« Last Edit: May 03, 2009, 05:07:34 AM by Naut »

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #14 on: May 03, 2009, 05:05:56 AM »
Okay so yeah, I just do a quick check on IsBossExisting, and then I can use GetEnemyX and GetEnemyY for it to automatically give me the boss coordinates.

That should be fine, in theory. I'll try it after D&D tomorrow.

It still wouldn't cover regular enemies with familiars but I don't think there's any way to deal with those, and they're uncommon anyway.

Re: New DMF character: Sakuya A
« Reply #15 on: May 03, 2009, 05:10:19 AM »
Sounds good, let us know how you make out with it.

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #16 on: May 04, 2009, 04:41:12 PM »
Okay, updated again.

Indiscriminate should now do somewhere around 800~1200 damage to everything onscreen, a bit more if you're really close.

Also the homing code will now target bosses first, or the the closest enemy in terms of x value. Here's how the code came out looking:

Code: [Select]
  task JackTheRipper(x,y,graphic){
    let enemy_target=-1;
    let target_angle=270;
    let best_center=1000;
    let best_target=-1;
    if(IsBossExisting){
      target_angle=atan2(GetEnemyY-GetPlayerY, GetEnemyX-GetPlayerX);
      if(target_angle<-60 && target_angle>-120){
        target_angle=atan2(GetEnemyY-y, GetEnemyX-x);
        CreatePlayerShot01(x,y,15,target_angle,6,1,graphic);
      }else{
        target_angle=270;
      }
    }
    if(target_angle==270){
        ascent(i in EnumEnemyBegin..EnumEnemyEnd) {
        enemy_target=EnumEnemyGetID(i);
        if((|GetEnemyInfo(enemy_target,ENEMY_X)-GetPlayerX|)<best_center){
          best_center=(|GetEnemyInfo(enemy_target,ENEMY_X)-GetPlayerX|);
          best_target=enemy_target;
        }
      }
      if(best_target!=-1){
        target_angle=atan2(GetEnemyInfo(best_target,ENEMY_Y)-GetPlayerY, GetEnemyInfo(best_target,ENEMY_X)-GetPlayerX);
        if(target_angle>-60 || target_angle<-120){
          best_target=-1;
        }
      }
      if(best_target!=-1){
        target_angle=atan2(GetEnemyInfo(best_target,ENEMY_Y)-y, GetEnemyInfo(best_target,ENEMY_X)-x);
        CreatePlayerShot01(x,y,15,target_angle,6,1,graphic);
      }else{
        CreatePlayerShot01(x,y,15,270,6,1,graphic);
      }
    }
  }

Re: New DMF character: Sakuya A
« Reply #17 on: May 04, 2009, 09:01:08 PM »
I would suggest including a y-coordinate code as well, since not every enemy should be expected to only be influencing the game on the x-axis... However, this code looks like it's sufficient for all intents and purposes now and is certainly better than I could hope to do, good stuff.
« Last Edit: May 04, 2009, 09:03:30 PM by Naut »

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #18 on: August 09, 2009, 04:43:25 PM »
Ker-bump for update.

- Hitbox size reduced to 0 radius because you're all a bunch of whiners for consistency with existing players.
- Focus shot damage reduced by ~40%, it was much too high for a shot that always does peak damage. It should still do more than Reimu A's most of the time, though.
- Down to 3 bombs again, but had their damage increased. Unfocused bomb does 1000~1500 screenwide, Focused does ~1800. Four bombs makes for broken maid.

Henry

  • The observer
  • Exploring to the new world of Danmaku
Re: New DMF character: Sakuya A
« Reply #19 on: August 10, 2009, 01:11:05 PM »
This player works well!!! Thank you! :)
(However, is the speed for slow mode too fast? :P)
Old/Forgotten member.

Old Patchouli Project was outdated but new one is in progress.

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #20 on: August 10, 2009, 04:29:29 PM »
It's normal for Sakuya to have a fast focused move speed.

Re: New DMF character: Sakuya A
« Reply #21 on: August 10, 2009, 04:44:53 PM »
Thanks for the new update!
I used your Sakuya since you released it, and I appreciate how you keep improving her.
Btw, do you have plans on coding other characters too?

Stuffman

  • *
  • We're having a ball!
Re: New DMF character: Sakuya A
« Reply #22 on: August 10, 2009, 05:46:43 PM »
I'll probably make some more at some point. I'll get around to making Sakuya B sometime, at least.