Maidens of the Kaleidoscope

~Hakurei Shrine~ => Rika and Nitori's Garage Experiments => Topic started by: Blargel on October 26, 2009, 11:41:44 AM

Title: Blargel's Danmakufu Corner (Ikareimu Revival? and Contest)
Post by: Blargel on October 26, 2009, 11:41:44 AM


I lost the first three projects I've ever made. Sorry about that.

Extra Object Functions Library (http://www.shrinemaiden.org/forum/index.php?topic=3366.msg142107#msg142107)
Adds Obj_SetAcceleration, Obj_SetMaxMinSpeed, Obj_SetAngularVelocity, Obj_GetAcceleration, Obj_GetMaxMinSpeed, and Obj_GetAngularVelocity functions to your script for easier handling of objects.

ObjectShotA Library (http://www.shrinemaiden.org/forum/index.php?topic=3366.msg142925#msg142925)
Slow as hell and hard to understand at first glance. Only up here for the luls. Use seriously at your own risk.

Common Functions Library (http://www.shrinemaiden.org/forum/index.php?topic=3366.msg171097#msg171097)
A small (but hopefully growing) library of useful functions like distance, angle, etc.

Mr. McBullet (http://www.bulletforge.org/u/blargel/p/contest-2-entry-mr-mcbullet)
My entry to the Dead Simple contest (http://www.shrinemaiden.org/forum/index.php?topic=3665.0).

Goliath Doll (http://www.shrinemaiden.org/forum/index.php?topic=3366.msg180245#msg180245)
I was bored.

Meiling's Punishment (http://dl.dropbox.com/u/4234581/Meiling%27s%20Punishment.rar)
My entry to the Survival Card contest (http://www.shrinemaiden.org/forum/index.php?topic=4630.0)

Bad Apple (http://www.shrinemaiden.org/forum/index.php?topic=3366.msg249037#msg249037)
Not made of bullets. Just images.

Ikareimu (http://www.bulletforge.org/u/blargel/p/ikareimu)
A proof of concept stage for a mix of Ikaruga and Touhou.

Shoot the Bullet Engine (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/)
Barely functional and pretty hard on the processor. However, I'm pretty proud of how everything is working.

Youmu vs Utsuho (http://www.bulletforge.org/u/blargel/p/youmu-vs-utsuho)
A proof of concept stage for a game where the player is always centered on the screen and everything wraps around.
Title: Re: Blargel's Danmakufu Corner
Post by: Thaws on October 26, 2009, 11:47:56 AM
Welcome back!
I don't think I even started lurking around here when you were around, but this board is surely much more crowded than before!
You guide to the basics of danmakufu was what helped me get started on scripting danmakufu. Thanks for the guide.  :)
Title: Re: Blargel's Danmakufu Corner
Post by: Stuffman on October 26, 2009, 05:20:09 PM
Oh hey welcome back dude, I was wondering where you went off to.

Looking forward to seeing more Ikareimu progress.
Title: Re: Blargel's Danmakufu Corner
Post by: Blargel on October 26, 2009, 05:41:08 PM
Thanks guys. I forgot to mention, but I actually lost the file(s?) for Ikareimu with Mannosuke so I'm actually gonna have to kill my brain trying to rewrite whatever huge mathematical stuff I vaguely remember needing to write for laser absorption.

This is gonna be fun.
Title: Re: Blargel's Danmakufu Corner
Post by: Nimble on October 26, 2009, 06:45:24 PM
Thank you for your tutorial. Your guide and ExPatchouli stage teach me a lot for Danmakufu script (well, with Rumia and Patcy shoot teach more about how script work in game)

ExRumia's Brilliant Knife alway drain my bomb until now... wrong move for dead end.
Title: Re: Blargel's Danmakufu Corner
Post by: Blargel on October 26, 2009, 07:21:32 PM
And here's a bit of work already! Cause I got bored.
Ever get tired of how Danmakufu's objects don't have Set and Get functions for acceleration, max/min speed, and angular velocity? You have to write some sort of damn custom functions to handle that crap and maybe you're too lazy to write them (Or you're relatively new to Danmakufu and are just starting with objects).

Well fear no more! Just add this script to your lib folder, include it in your scripts with #include_function "\lib\whateverYouNamedIt.txt" just before initialize, and stick Obj_UpdateObjects; somewhere in your @MainLoop where it will be run once per frame. Voila! Obj_SetAcceleration, Obj_SetMaxMinSpeed, Obj_SetAngularVelocity, and their corresponding Get functions are magically added and working like the built in Obj get and set functions!

Code: [Select]
/****************************************
* Variables                             *
****************************************/

let ObjectExtraProperties      = [];

let OBJECT_ID                  = 0;
let OBJECT_ACCEL               = 1;
let OBJECT_MAXMINSPEED         = 2;
let OBJECT_ANGULARVELOCITY     = 3;

/****************************************
* Public Functions                      *
****************************************/

function Obj_SetAcceleration(obj, accel){
  let indx = Obj_getIndex(obj);
  if(indx != -1){
    ObjectExtraProperties[indx] = [obj, accel, Obj_getMaxMinSpeedByIndex(indx), Obj_getAngularVelocityByIndex(indx)];
  }
  else{
    ObjectExtraProperties = ObjectExtraProperties ~ [[obj, accel, NULL, 0]];
  }
}

function Obj_SetMaxMinSpeed(obj, speed){
  let indx = Obj_getIndex(obj);
  if(indx != -1){
    ObjectExtraProperties[indx] = [obj, Obj_getAccelerationByIndex(indx), speed, Obj_getAngularVelocityByIndex(indx)];
  }
  else{
    ObjectExtraProperties = ObjectExtraProperties ~ [[obj, 0, speed, 0]];
  }
}

function Obj_SetAngularVelocity(obj, angularVelocity){
  let indx = Obj_getIndex(obj);
  if(indx != -1){
    ObjectExtraProperties[indx] = [obj, Obj_getAccelerationByIndex(indx), Obj_getMaxMinSpeedByIndex(indx), angularVelocity];
  }
  else{
    ObjectExtraProperties = ObjectExtraProperties ~ [[obj, 0, NULL, angularVelocity]];
  }
}

function Obj_GetAcceleration(obj){
  return Obj_getAccelerationByIndex(Obj_getIndex(obj));
}

function Obj_GetMaxMinSpeed(obj){
  return Obj_getMaxMinSpeedByIndex(Obj_getIndex(obj));
}

function Obj_GetAngularVelocity(obj){
  return Obj_getAngularVelocityByIndex(Obj_getIndex(obj));
}

function Obj_Update(){
  let len = length(ObjectExtraProperties);
  descent(i in 0..len){
    if(Obj_BeDeleted(ObjectExtraProperties[i][OBJECT_ID])){
      ObjectExtraProperties = erase(ObjectExtraProperties, i);
    }
    else{
      let obj = ObjectExtraProperties[i][OBJECT_ID];
      let accel = ObjectExtraProperties[i][OBJECT_ACCEL];
      let newSpeed = Obj_GetSpeed(obj) + accel;
      let angularVelocity = ObjectExtraProperties[i][OBJECT_ANGULARVELOCITY];
      let newAngle = Obj_GetAngle(obj) + angularVelocity;

      if(ObjectExtraProperties[i][OBJECT_MAXMINSPEED] != NULL){
        let maxMinSpeed = ObjectExtraProperties[i][OBJECT_MAXMINSPEED];
        if((accel<0 && newSpeed<maxMinSpeed) || (accel>0 && newSpeed>maxMinSpeed)){
          newSpeed = maxMinSpeed;
        }
      Obj_SetSpeed(obj, newSpeed);
      Obj_SetAngle(obj, newAngle);
      }
    }
  }
}

/****************************************
* Private Functions                     *
****************************************/

function Obj_getIndex(obj){
  let len = length(ObjectExtraProperties);
  ascent(i in 0..len){
    if(ObjectExtraProperties[i][OBJECT_ID] == obj){
      return i;
    }
  }
  return -1;
}

function Obj_getAccelerationByIndex(indx){
  return ObjectExtraProperties[indx][OBJECT_ACCEL];
}

function Obj_getMaxMinSpeedByIndex(indx){
  return ObjectExtraProperties[indx][OBJECT_MAXMINSPEED];
}

function Obj_getAngularVelocityByIndex(indx){
  return ObjectExtraProperties[indx][OBJECT_ANGULARVELOCITY];
}

As an example, if you saved the above code in the lib folder as ExtraObjectFunctions.txt and make a script with the following code, you'll see the object bullet will have an angular velocity and acceleration with just that tiny code!

Code: [Select]
#TouhouDanmakufu
#Title[Extra Object Bullet Functions Test]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
#include_function "\lib\ExtraObjectFunctions.txt"
let count=0;
@Initialize
{
SetLife(10000);
}

@MainLoop
{
if(count == 60){
let obj = Obj_Create(OBJ_SHOT);
Obj_SetPosition(obj, GetX, GetY);
Obj_SetAngle(obj, 90);
Obj_SetSpeed(obj, 0);
ObjShot_SetGraphic(obj, RED01);
Obj_SetAcceleration(obj, 0.05);
Obj_SetMaxMinSpeed(obj, 5);
Obj_SetAngularVelocity(obj, 0.3);
}
Obj_UpdateObjects();
count++;
}

@Finalize
{
}

@DrawLoop
{
}
}

Enjoy!


EDIT1: Hmmm, I just noticed that it runs rather slowly... perhaps I should try to edit this a little to see if I can fix it.
EDIT2: Fixed a little, but still some performance issues. First code block updated.
EDIT3: Optimized as much as possible. Can handle approximately 200-300 bullets at a time without much problems. First code block updated. Please report bugs if you find any.
Title: Re: Blargel's Danmakufu Corner
Post by: Primula on October 26, 2009, 09:51:56 PM
Hooray you returned!
Title: Re: Blargel's Danmakufu Corner
Post by: Naut on October 27, 2009, 02:55:16 AM
Hello and welcome back, sir Blargel.
Title: Re: Blargel's Danmakufu Corner
Post by: Suikama on October 27, 2009, 04:21:39 AM
Mannosuke is gone.
Aww man

It was such an inspirational thing to me (http://www.youtube.com/watch?v=w8moU5m3EWQ)
Title: Re: Blargel's Danmakufu Corner
Post by: Helepolis on October 27, 2009, 07:25:34 AM
PS Curious Blargel, what made you quit the Dnh scene and actually return again? ( I hope you were still playing somewhat Touhou (UFO etc) ? )
Title: Re: Blargel's Danmakufu Corner
Post by: Blargel on October 27, 2009, 07:39:39 AM
I sorta grew out of an obsession of Touhou and more into a mild interest. Truthfully, I haven't even touched UFO yet, and I haven't played SA much either. I still read some of the doujins every so often though. Now that I'm back, I plan to only be active in the Danmakufu community, but that could change. ;)

I started leaving Danmakufu behind during my first encounter of the problem I was having with Ikareimu. I was having trouble getting object bullets to behave like ShotA bullets and just gave up after a while. I came back recently because of an interest in programming. After learning some actual computer languages (not scripting languages), I wanted to see what Danmakufu was capable of and see if I was better at it than I was before.

If you're wondering, I don't feel much better at Danmakufu, but at least my code is cleaner now. I think I might understand why and when to use microthreading instead of putting everything into @MainLoop as well.
Title: Re: Blargel's Danmakufu Corner
Post by: Helepolis on October 27, 2009, 08:05:56 AM
Oh you should try to play SA and UFO. They are great inspirational sources for Danmakufu. Right now, Fujiwara no Mokou, Drake, Me and probably others are like fighting hard to immitate effects from the original games.

I am not a programmer genius or math genius, therefor my coding is generally poor in efficiency, though pretty tidy if I might say myself =P

Too bad we don't know eachother that well yet, but that will change perhaps. I probably entered the scene almost year ago when you were semi-active. I have played your ExPatchouli script I think.
Title: Re: Blargel's Danmakufu Corner
Post by: Blargel on October 27, 2009, 08:28:25 AM
I can't really get my hands on SA or UFO by legal means very easily since I'm living in China now. After getting used to American online banking systems, Chinese ones just seem really... weird and hard to use.

I'm not much of an effect person. I'm the type of guy to try to push a system to its limits just to see what's possible. Example: I made a pretty much functional turned-based RPG battle system... in Warcraft III: Frozen Throne. This was before moving on to Touhou and Danmakufu.

But yeah, looking forward to working with you and everyone else here.
Title: Re: Blargel's Danmakufu Corner
Post by: Helepolis on October 27, 2009, 08:47:30 AM
Your style reminds me of my younger ages with Age of Empires, Red Alert etc. I love to modify games or create news things for them.  Then I bet you also seen that dude on niconico creating Danmakufu tetris?

If you live in China, can't you like easy ship the things from Japan (should be not much to pay the shipping prices right?) I think Paletweb was still selling copies of Touhou games.

Oh pushing limits happens often, that is why I mentioned the effects. Currently I have this burning aura effect where like alot of particles are spawned to create a burning effect. It looks superb but is a huge strain on the engine :V You can see the effect on my youtube channel if you look for DoubleVla.
Title: Re: Blargel's Danmakufu Corner
Post by: Blargel on October 27, 2009, 09:53:25 AM
Then I bet you also seen that dude on niconico creating Danmakufu tetris?

Of course! Rather old actually, but amazing nonetheless. The guy even made different versions with versus modes and stuff. It probably even supports two players.

Quote
If you live in China, can't you like easy ship the things from Japan (should be not much to pay the shipping prices right?) I think Paletweb was still selling copies of Touhou games.

No see the issue is paying for it with PaletWeb. My American credit cards are canceled so I have to make do with Chinese thingies to pay online. But just how on Earth do I do that?

Quote
Oh pushing limits happens often, that is why I mentioned the effects. Currently I have this burning aura effect where like alot of particles are spawned to create a burning effect. It looks superb but is a huge strain on the engine :V You can see the effect on my youtube channel if you look for DoubleVla.

Bwahaha. It's always funny when the engine starts straining like that. Funny and a pain in the ass if it's something you actually need to make what you want to make. I recently put together another library which lets you make object bullets that behave like ShotA bullets. It's amazing how well it works except for the fact that the parameters you input into it is really messed up and it causes major performance loss.

What're the parameters? How about I give you an example?
Code: [Select]
let behavior = [
  [0, 1, 90, 4, 0.01, 5, RED01],
  [30, NULL, NULL, -1, 0.01, 5, RED01],
  [60, NULL, NULL, 0, 0.01, 5, RED01]
];
let obj = CreateObjectShotA(GetX, GetY, 10, behavior);
This has the same effect as
Code: [Select]
CreateShotA(0, GetX, GetY, 10);
SetShotDataA(0, 0, 1, 90, 4, 0.01, 5, RED01);
SetShotDataA(0, 30, NULL, NULL, -1, 0.01, 5, RED01);
SetShotDataA(0, 60, NULL, NULL, 0, 0.01, 5, RED01);
FireShot(0);

Yeah... one of the parameters you pass in is a giant two-dimensional array, one element per extra SetShotDataA imitation you wanna do. And by the way, I'm not sure if you know this, but, Danmakufu is terrible at handling multi-dimensional array. If you look in the script in the library, it's a huge mess when you get to the part about trying to handle that array.



EDIT: Extra Object Functions Library (http://www.shrinemaiden.org/forum/index.php?topic=3366.msg142107#msg142107) optimized!
Title: Re: Blargel's Danmakufu Corner
Post by: Helepolis on October 27, 2009, 10:50:25 AM
Hmmm we got chinese people on the forum, I think you should visit the "everything else" section and ask there. I am sure people can help out.

Oh object bullets behaving like CreateShotA. I noticed your code but currently at my work so got little material or time to work with now. I will look into it when I am at home.

And I have never been a fond of arrays in danmakufu :V I only use them if I have to.
Title: Re: Blargel's Danmakufu Corner
Post by: Blargel on October 27, 2009, 11:24:15 AM
Lol, you wanna take a look at it? Might as well put it up, but I warn you, it's very slow. Almost to the point of being ridiculous and unusable. Actually it probably is unusable considering how few bullets it can handle.


Anyway, I present to you all, the ObjectShotA.

Code: [Select]
/************************************************************
 *
 *  Constants
 *
 ***********************************************************/
let OBJ_ID                      = 0;
let OBJ_START_FRAME             = 1;
let OBJ_CURRENT_BEHAVIOR        = 2;

let BEHAVIOR_DURATION             = 0;
let BEHAVIOR_VELOCITY             = 1;
let BEHAVIOR_ANGLE                = 2;
let BEHAVIOR_ANGULAR_VELOCITY     = 3;
let BEHAVIOR_ACCELERATION         = 4;
let BEHAVIOR_MAX_MIN_SPEED        = 5;
let BEHAVIOR_GRAPHIC              = 6;

let MAX_BEHAVIOR_COUNT            = 8;
/************************************************************
 *
 *  Variables
 *
 ***********************************************************/

let BehaviorShots = [];
let BehaviorShotBehaviors = [];

/************************************************************
 *
 *  Public Functions
 *
 ***********************************************************/
function CreateObjectShotA(x, y, delay, behavior){
  let obj = Obj_Create(OBJ_SHOT);
  Obj_SetPosition(obj, x, y);
  ObjShot_SetDelay(obj, delay);
 
  let startFrame = CurrentFrame();
 
  //id, starting frame, current behavior, behavior list
  let behaviorShot = [obj, startFrame, 0];

  let len = length(behavior);
  let behaviorShotBehavior = [];
  if(len < MAX_BEHAVIOR_COUNT){
    behaviorShotBehavior = behaviorShotBehavior ~ behavior;
    loop(MAX_BEHAVIOR_COUNT-len) {
      behaviorShotBehavior = behaviorShotBehavior ~ [[-1, 0, 0, 0, 0, 0, 0]];
    }
  } else if (len > MAX_BEHAVIOR_COUNT){
    ascent(i in 0..MAX_BEHAVIOR_COUNT) {
      behaviorShotBehavior = behaviorShotBehavior ~ [behavior[i]];
    }
  }

  BehaviorShots = BehaviorShots ~ [behaviorShot];
 
  BehaviorShotBehaviors = BehaviorShotBehaviors ~ [behaviorShotBehavior];

  return obj;
}

function ObjectShotA_Run(){

  let len = length(BehaviorShots);

 
  OutputDebugString(0, "len", len);
  descent(i in 0..len){
    if(Obj_BeDeleted(BehaviorShots[i][OBJ_ID])){
      BehaviorShots = erase(BehaviorShots, i);
      BehaviorShotBehaviors = erase(BehaviorShotBehaviors, i);
    }
    else{
      let behaviorShot = BehaviorShots[i];
      let behaviorShotBehavior = BehaviorShotBehaviors[i];
   
      BehaviorShot_updateState(behaviorShot, behaviorShotBehavior);
      BehaviorShot_updateAttributes(behaviorShot, behaviorShotBehavior);
    }
  } 
}


/************************************************************
 *
 *  Private Functions
 *
 ***********************************************************/
function BehaviorShot_updateAttributes(behaviorShot, behaviorShotBehavior){
  let obj = behaviorShot[OBJ_ID];
  let behaviors = behaviorShotBehavior;
  let currentBehaviorIndex = behaviorShot[OBJ_CURRENT_BEHAVIOR]; 
  let currentBehavior = behaviors[currentBehaviorIndex];

  let angularVelocity  = currentBehavior[BEHAVIOR_ANGULAR_VELOCITY];
  let acceleration     = currentBehavior[BEHAVIOR_ACCELERATION];
  let maxMinSpeed      = currentBehavior[BEHAVIOR_MAX_MIN_SPEED];

  let speed            = Obj_GetSpeed(obj);
  let angle            = Obj_GetAngle(obj);
 
  let newSpeed = speed + acceleration;
  if((acceleration > 0 && newSpeed > maxMinSpeed) || (acceleration < 0 && newSpeed < maxMinSpeed)){
    newSpeed = maxMinSpeed;
  }
  let newAngle = angle + angularVelocity;
 
  Obj_SetSpeed(obj, newSpeed);
  Obj_SetAngle(obj, newAngle);
 
}

function BehaviorShot_updateState(behaviorShot, behaviorShotBehavior){
  let obj = behaviorShot[OBJ_ID];
  let startFrame = behaviorShot[OBJ_START_FRAME];
  let timePassed = CurrentFrame() - startFrame;
  let behaviors = behaviorShotBehavior;
 
  let o = BehaviorShot_getBehaviorShotIndex(obj);

  let len = length(behaviors);
  descent(i in 0..len){
    let behavior = behaviors[i];
    let triggerTime = behavior[BEHAVIOR_DURATION];
    if( triggerTime >= 0 && timePassed - triggerTime == 0){
      BehaviorShot_setBehavior(obj, behavior);
      BehaviorShots[o] = [obj, startFrame, i];
    }
  }
}

function BehaviorShot_setBehavior(obj, behavior){
  let speed            = behavior[BEHAVIOR_VELOCITY];
  let angle            = behavior[BEHAVIOR_ANGLE];
  let graphic          = behavior[BEHAVIOR_GRAPHIC];
  if(speed != NULL){
    Obj_SetSpeed(obj, speed);
  }
  if(angle != NULL){
    Obj_SetAngle(obj, angle);
  }
  ObjShot_SetGraphic(obj, graphic);
}

function BehaviorShot_getBehaviorShotIndex(obj){
  let len = length(BehaviorShots);

  ascent(i in 0..len){
    let behaviorShot = BehaviorShots[i];
    if(behaviorShot[OBJ_ID]== obj){
      return i
    }
  }
 
  return -1
}

function BehaviorShot_getBehaviorShot(obj){
  let len = length(BehaviorShots);

  ascent(i in 0..len){
    let behaviorShot = BehaviorShots[i];
    if(behaviorShot[OBJ_ID]== obj){
      return behaviorShot;
    }
  }

  RaiseError("Can't find obj.", "BehaviorShot Error");
}

function BehaviorShot_getBehaviorShotBehavior(obj){
  let len = length(BehaviorShots);

  ascent(i in 0..len){
    let behaviorShot = BehaviorShots[i];
    if(behaviorShot[OBJ_ID]== obj){
      return BehaviorShotBehaviors[i];
    }
  }

  RaiseError("Can't find obj.", "BehaviorShot Error");
}

function debugShot(obj, i){
  let behaviorShot = BehaviorShot_getBehaviorShot(obj);
  let behaviorShotBehavior = BehaviorShot_getBehaviorShotBehavior(obj);

  OutputDebugString(1, "obj", obj);
  OutputDebugString(2, "OBJ_START_FRAME", behaviorShot[OBJ_START_FRAME]);
  OutputDebugString(3, "OBJ_CURRENT_BEHAVIOR", behaviorShot[OBJ_CURRENT_BEHAVIOR]);
 
  debugBehavior(behaviorShotBehavior[i]);
}

function debugBehavior(b){
  OutputDebugString(4, "BEHAVIOR_DURATION", b[BEHAVIOR_DURATION]);
  OutputDebugString(5, "BEHAVIOR_VELOCITY", b[BEHAVIOR_VELOCITY]);
  OutputDebugString(6, "BEHAVIOR_ANGLE", b[BEHAVIOR_ANGLE]);
  OutputDebugString(7, "BEHAVIOR_ANGULAR_VELOCITY", b[BEHAVIOR_ANGULAR_VELOCITY]);
  OutputDebugString(8, "BEHAVIOR_ACCELERATION", b[BEHAVIOR_ACCELERATION]);
  OutputDebugString(9, "BEHAVIOR_MAX_MIN_SPEED", b[BEHAVIOR_MAX_MIN_SPEED]);
  OutputDebugString(10, "BEHAVIOR_GRAPHIC", b[BEHAVIOR_GRAPHIC]);
}

To use, put it in your lib folder and include it in whatever scripts are gonna use it. Put ObjectShotA_Run(); in your @MainLoop where it will be run once per frame. The parameters are rather scary but if you think of it differently, it's actually rather similar to setting up regular ShotAs

Code: [Select]
#TouhouDanmakufu
#Title[Test]
#Player[FREE]
#ScriptVersion[2]

script_enemy_main
{
  #include_function ".\BehaviorShot.dnh"
  let frame = 0;

  @Initialize
  {
    SetLife(1);
  }
  @MainLoop
  {
    if (frame == 60){
      CreateBehaviorShot(GetCenterX, GetCenterY, 10, [
        [0, 5, 90, 4, -0.1, 1, 1],
        [30, NULL, NULL, -1, 0, 0, 1],
        [60, NULL, NULL, 0, 0.01, 3, 1]
      ]);
    }
    BehaviorShot_Run();
    frame++;
  }

  @Finalize
  {
  }

  @DrawLoop
  {
  }
}

As you can see, you don't need a FireShot(); as it is fired automatically for you when you call that one function. The parameters for the function are as follows:
Code: [Select]
CreateObjectShotA(starting_x, starting_y, delay, [
  [time_to_modify_behavior, speed, angle, angular_velocity, acceleration, max/min_speed, graphic]
]);
You can have up to 8 of those arrays inside the main array which correspond to up to 8 SetShotDataA functions. Don't forget the commas between the array elements in the big array.

Feel free to try to optimize this. This was the best I could do without killing Danmakufu or myself.
Title: Re: Blargel's Danmakufu Corner
Post by: Doomsday on October 27, 2009, 11:39:22 AM
its already been said enough here, but welcome back. its good to see returning users :)
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.2 released!)
Post by: Blargel on October 28, 2009, 07:34:22 PM
Ikareimu v0.2!


(http://i44.photobucket.com/albums/f28/Blargel/snapshot000b.png)
Click here (http://www.mediafire.com/?sharekey=b91b56c4c976b428d0d290dca69ceb5c2d97c78673f4c5cbf1940a51b339e393) to download!


DO NOT UNZIP THIS IN YOUR EXISTING DANMAKUFU SCRIPT FOLDER AS IT WILL CRASH YOUR DANMAKUFU! IT ALREADY HAS DANMAKUFU PACKAGED WITH IT!

Features/changes:
 - Bullet and laser absorption systems are now in place and just about finalized.
 - There's a pretty hard attack that I made to test all the stuff. Think you can survive long?
 - The shield now looks like... well... a shield. It's also slightly bigger.
 - The shield now deactivates for a split second when you change colors.
    * YOU CAN GET HIT WHILE IT IS DOWN!!
    * This is to prevent spamming 'c' from absorbing anything that comes in absorption range.

Controls are pretty much the same as any other Touhou game, except you press 'c' to change colors. For those who never heard of or played Ikaruga, you will absorb bullets that are the same color as you and can switch between the two colors freely.

To do list:
 - Make a Ikareimu-specific player character.
 - Make the Ikaruga chaining scoring system.
 - Make a game!


Feedback is always welcome!
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.2 released!)
Post by: Solais on October 28, 2009, 08:30:51 PM
I can't say how awesome this Ikareimu code is (and that holyshititshard pattern reminded me Ikaruga's 4th boss). I wanted to see it for a while, but I somewhat disappointed as I expected to see a code what enables you to switch characters in game. Anyway, it's a really excellent stuff and a math n00b like me can only stare in awe.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.2 released!)
Post by: Blargel on October 29, 2009, 07:17:20 AM
[...]I expected to see a code what enables you to switch characters in game[...]

You can't change characters in a script. The closest you can do to imitate that is to make a player script that holds all the players you wanna switch between. The easiest way to handle the switching in the Ikareimu script would be to change the bullet properties themselves like I did and change which sprite is drawn on the character at the same time via common data.

Actually, with the way I plan to design it, the character script should change the common data and all the other scripts will read the common data, but since I don't have an Ikareimu character script yet, the spellcard script is calling the color and shield functions in its place for now.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.2 released!)
Post by: Solais on October 29, 2009, 01:08:03 PM
You can't change characters in a script. The closest you can do to imitate that is to make a player script that holds all the players you wanna switch between. The easiest way to handle the switching in the Ikareimu script would be to change the bullet properties themselves like I did and change which sprite is drawn on the character at the same time via common data.

Actually, with the way I plan to design it, the character script should change the common data and all the other scripts will read the common data, but since I don't have an Ikareimu character script yet, the spellcard script is calling the color and shield functions in its place for now.

Hmm, when I've learned enough I'll look into it. I never learned any programming ever so I'm a n00b in these areas. Anyway, it was just an old idea of mine for a Touhou game where you can collect weapons like in old-school shmups instead of choosing the shot type when you start the game. And a scoring system based on that idea, like score multipliers for how much you've changed weapon to another and stuff.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.2 released!)
Post by: Blargel on October 29, 2009, 02:54:07 PM
Hmm, when I've learned enough I'll look into it. I never learned any programming ever so I'm a n00b in these areas. Anyway, it was just an old idea of mine for a Touhou game where you can collect weapons like in old-school shmups instead of choosing the shot type when you start the game. And a scoring system based on that idea, like score multipliers for how much you've changed weapon to another and stuff.

Yeah, you'll have to put all data for the different "weapons" in a single character script. Your idea is very doable with Danmakufu, but when you get around to it, have fun scripting the items in. I'm not so sure how that's done (bullet objects? effect objects?) and thank god Ikaruga doesn't have items to collect so there's less for me to worry about.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.2 released!)
Post by: Blargel on October 31, 2009, 09:32:08 PM
Ikareimu v0.3!


(http://i44.photobucket.com/albums/f28/Blargel/ikareimu03.png)
Click here (http://www.mediafire.com/?sharekey=b91b56c4c976b428d0d290dca69ceb5c2d97c78673f4c5cbf1940a51b339e393) to download!


DO NOT UNZIP THIS IN YOUR EXISTING DANMAKUFU SCRIPT FOLDER AS IT WILL CRASH YOUR DANMAKUFU! IT ALREADY HAS DANMAKUFU PACKAGED WITH IT!

Features/changes:
 - Player character added.
 - Extra effect added to shield when it changes colors.
 - New system display! (Not all parts of the system work yet though)
 - Another new attack starring Marisa.

Controls are pretty much the same as any other Touhou game, except you press 'c' to change colors. For those who never heard of or played Ikaruga, you will absorb bullets that are the same color as you and can switch between the two colors freely.

To do list:
 - Give the Ikareimu character the ability to actually fire lasers. (Try bombing with at least one bar to see what happens for now. :3)
 - Make the Ikaruga chaining scoring system.
 - Make the system interface display chaining information.
 - Figure out 3D backgrounds (though I may skip this part).
 - Make a game!


Feedback is always welcome, and of course, please report any bugs you find!
Also, if anyone is interested, here (http://www.shrinemaiden.org/forum/index.php?topic=3037.msg145180#msg145180)'s a list of things you can help me with.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.3 released!)
Post by: Solais on October 31, 2009, 09:47:15 PM
Awesome! You're gonna recreate Ikaruga from scratch?

Also: Pew Pew!
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.3 released!)
Post by: Blargel on October 31, 2009, 09:56:53 PM
To be exact, I plan to recreate the Ikaruga engine. Then, anyone using Danmakufu and my library will be able to create Ikaruga-style games.

Of course, I plan to make a game with it too.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.3 released!)
Post by: Blargel on November 02, 2009, 02:17:50 PM
Okay, this is just such a hilariously bad yet functional work around that I just had to share it with whoever cares. First, the problem I had:

In Ikareimu, bullet collision detection in regards to absorption is handled by the enemy who fired the said bullet. The only problem was, it was all handled in the @MainLoop. Once the enemy died, the @MainLoop stopped running and any leftover bullets that the enemy fired wouldn't be absorbed, which would definitely confuse players.

The work around? Make the enemy stop running its attack and drawing functions when its life was 100 or lower, but make it still run the Ikareimu bullet absorption system. After a while, it kills itself without a trace, making the player not even notice that it wasn't really killed until just then. The resulting framework for an enemy looks so ridiculous. Here it is:

Code: [Select]
script_enemy_main {
#include_function "lib\Ikareimu\Enemy.dnh"
// Following two variables are part of a work around. Have them at all times.
let autoDeathCounter = 600;
let FinalizeRun = false;

let count=0;
@Initialize {
EnemySystem_Initialize;

// Set the life to how much health you would like the enemy to have plus 100.
// This is a work around for an issue Danmakufu cannot address easily.
SetLife(101);
}

@MainLoop {

// This if statement is the "real" @MainLoop. Sorry, but this is part of the
// work around mentioned above.
if(GetLife > 100){
count++;
}
// End of "real" @MainLoop

if(GetLife < 100){

// This if statement is the "real" @Finalize. Yup. Part of the work around.
if(!FinalizeRun){
FinalizeRun = true;
// Things like visual and sound effects during death must be handled manually here.
}
// End of "real" @Finalize.

autoDeathCounter-=1;
if(autoDeathCounter == 0){
VanishEnemy;
}
}

EnemySystem_Run;
}

@Finalize {
EnemySystem_Finalize;
}

@DrawLoop {

// This if statement is the "real" @DrawLoop.
if(GetLife > 100){
}
// End of "real" @Drawloop.

}
}
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.3 released!)
Post by: Naut on November 02, 2009, 05:23:34 PM
So I guess bombs and homing shots fuck everything over? Though I can see a work around for homing shots (Josette Y comes to mind), bombs will still kill off enemies. Actually, make the workaround number be 10000, at least then bombs wont kill off the enemy. Also, to spare some processing power (I guess), you could have an if(GetEnemyShotCount<1 && GetLife<10000){ VanishEnemy; } statement, to kill off the enemy if there are no bullets left on the screen to handle.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.3 released!)
Post by: Blargel on November 02, 2009, 05:41:43 PM
So I guess bombs and homing shots fuck everything over? Though I can see a work around for homing shots (Josette Y comes to mind), bombs will still kill off enemies.
Yeah, but if you're making Ikaruga-style gameplay with my library, you'll almost definitely be using the player character specific functions I built in as well which handles the homing lasers specifically for this workaround. And I'd hope you'd remember to restrict the usable players for your scripts to only your Ikaruga-style player character.

Quote
Actually, make the workaround number be 10000, at least then bombs wont kill off the enemy.
Yeah I suppose I should increase it anyway.

Quote
Also, to spare some processing power (I guess), you could have an if(GetEnemyShotCount<1 && GetLife<10000){ VanishEnemy; } statement, to kill off the enemy if there are no bullets left on the screen to handle.
Though I doubt much processing power is lost from having them stay when there's nothing else to handle, that's probably a good idea still. Added.



By the way, this work around only applies to the non-boss enemies. Thankfully, it's not strange for bullets to auto-delete at the end of a boss attack so there's no bullet absorption to worry about. If I had to do the work around for bosses as well, I'd have to use a custom life bar.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Blargel on November 08, 2009, 12:50:52 AM
Ikareimu v0.4!


(http://i44.photobucket.com/albums/f28/Blargel/ikareimu04.png)
Click here (http://www.mediafire.com/?sharekey=b91b56c4c976b428d0d290dca69ceb5c2d97c78673f4c5cbf1940a51b339e393) to download!


DO NOT UNZIP THIS IN YOUR EXISTING DANMAKUFU SCRIPT FOLDER AS IT WILL CRASH YOUR DANMAKUFU! IT ALREADY HAS DANMAKUFU PACKAGED WITH IT!

Features/changes:
 - Tracking lasers added!
 - Extra effects added.
 - Full (but short with no mid-boss) stage!

Controls are pretty much the same as any other Touhou game, except you press 'c' to change colors. For those who never heard of or played Ikaruga, you will absorb bullets that are the same color as you and can switch between the two colors freely.

To do list:
 - Make the Ikaruga chaining scoring system.
 - Make the system interface display chaining information.
 - Figure out 3D backgrounds (though I may skip this part).
 - Make a game!


Feedback is welcome, especially about the difficulty of the stage. It was supposed to be stage one normal mode difficulty, but it ended up becoming rather hard. Or I just suck at Ikaruga/Ikareimu. Report bugs too. That's always good. :V

EDIT: For those you can't run Danmakufu, here's a YouTube video (http://www.youtube.com/watch?v=hhuiRASnasM) to watch!
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Naut on November 08, 2009, 04:11:59 AM
Delicious!
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Prime 2.0 on November 08, 2009, 05:44:31 AM
Needs bullet shooty sounds, for enemies, the player, and especially for master spark. If it's possible to take the master spark sound out of the player's se folder(seBomb_MarisaB.wav), then do it. A shield absorption sound would also be nice.

Fun to play, even if the anti-ghosting on my keyboard means I have to fight with the controls when I change colors. Also, it's just occurred to me that since discerning black and white is Sikieiki's power, that maybe she should be a second character. :P

Also, during one of my runs, I could have sworn I somehow deathbombed...that is, I hit the "bomb" key after I got hit and lived.

Can't wait to see more on this.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Blargel on November 08, 2009, 05:51:31 AM
Needs bullet shooty sounds, for enemies, the player, and especially for master spark. If it's possible to take the master spark sound out of the player's se folder(seBomb_MarisaB.wav), then do it. A shield absorption sound would also be nice.

If you didn't notice, even enemy death sounds aren't there. They're rather low on my priority list right now, but they'll be added someday.

Quote
Fun to play, even if the anti-ghosting on my keyboard means I have to fight with the controls when I change colors. Also, it's just occurred to me that since discerning black and white is Sikieiki's power, that maybe she should be a second character. :P

I already have plans for Siki :3

Quote
Also, during one of my runs, I could have sworn I somehow deathbombed...that is, I hit the "bomb" key after I got hit and lived.

Oh shit.
*goes off to set bomb count to 0 by default*
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Solais on November 08, 2009, 09:17:54 AM
Holy shit, this is starting to get really awesome! I already have my own idea for using this system in a script what I'll make... whenever... Uh... sometime. (I should move my lazy ass already and get back to Danmakufu.)
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Helepolis on November 08, 2009, 09:46:18 AM
Ohohohoho, my image looks good in there :V

Needs more proper SFX for everything.

( Though your movie is extremely out of sync )
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Blargel on November 16, 2009, 04:41:40 AM
Ikareimu v0.5!
Also known as Ikareimu Framework v1.0


(http://i44.photobucket.com/albums/f28/Blargel/ikareimu05.jpg)
Click here (http://www.mediafire.com/blargel) to download!
Download v0.5.1 as v0.5 has a missing character sprite.


DO NOT UNZIP THIS IN YOUR EXISTING DANMAKUFU SCRIPT FOLDER AS IT WILL CRASH YOUR DANMAKUFU! IT ALREADY HAS DANMAKUFU PACKAGED WITH IT!

Features/changes:
 - Chaining added.
 - Chaining information on system display added.
 - Double damage on opposite polarity enemies added!

Explanation of the gameplay is in the readme file if you don't know how to play Ikaruga. Also, I forgot to re-add a LoadGraphic command in the player script in version 0.5 so I uploaded a version 0.5.1.

Also, sorry, still no sound effects since it's not high on my priority list. I was more worried about getting the Ikaruga system ported into Danmakufu before working on making the scripts more polished.

To do list:
 - Figure out 3D backgrounds (though I may skip this part).
 - Make a game!

As usual, feedback and bug reporting is welcome.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Prime 2.0 on November 16, 2009, 06:05:58 AM
(http://img21.imageshack.us/img21/7761/ikabsent.png)

whoops.

Chaining is neat, even if I can't seem to get the hang of it.

You know, even if sounds weren't a priority, shouldn't you have at least put in some placeholders? XD
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 16, 2009, 06:17:07 AM
Lol, no sprite wtf.

Sorry, go into the player script, remove CreateDebugWindow; and add in LoadGraphic(imgSprite); in its place.

And screw the sounds, I have green hair.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Prime 2.0 on November 16, 2009, 06:22:47 AM
I would, but it seems that particular line of code doesn't exist (http://img41.imageshack.us/img41/5217/alreadygone.png) in the player script.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 16, 2009, 06:30:49 AM
Oh so that's what happened. Nevermind then, just put LoadGraphic(imgSprite); right after IkareimuPlayer_Initialize;

I'll update the main post :x

Chaining is neat, even if I can't seem to get the hang of it.

The trick is to figure how the lasers target (or I could just tell you:
They come out for 1/6 for a second then each one finds the enemy closest to it and goes after that one
) and spam them skillfully.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Nimble on November 16, 2009, 08:30:57 AM
May I suggest life counter somewhere else than under laser bar?
Not a big problem, but at least I misunderstand for first time I play (spaming bomb laser when laser bar was fill with x4 = 4 bar!)

Chaining system cool!
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 16, 2009, 09:08:11 AM
May I suggest life counter somewhere else than under laser bar?
Not a big problem, but at least I misunderstand for first time I play (spaming bomb laser when laser bar was fill with x4 = 4 bar!)

Chaining system cool!

There's supposed to be a symbol that represents the player character to the left of the X and under the bar. It'll make more sense when I can think of something to put there but for now it's gonna have to confuse new players like that. :V

EDIT: I just realized I forgot to mention this, but since I'm finished building the system, updates will be much less frequent now since I don't want to reveal too much of the specifics of the actual game I'm making.

EDIT2: Fixed the missing sprite and reuploaded for those who couldn't or were too lazy to do it themselves. It's labeled v0.5.1 in the usual place.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Suikama on November 18, 2009, 05:03:16 AM
Um...

Your script crashed danmakufu...

PERNAMENTLY...


D:


Edit: hahaha oh wow that was purely due to my own incompetence
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 18, 2009, 06:25:01 AM
Um...

Your script crashed danmakufu...

PERNAMENTLY...


D:


Edit: hahaha oh wow that was purely due to my own incompetence

Okay, yeah.

DO NOT UNZIP THIS IN YOUR EXISTING DANMAKUFU SCRIPT FOLDER AS IT WILL CRASH YOUR DANMAKUFU! IT ALREADY HAS DANMAKUFU PACKAGED WITH IT!

*proceeds to add this disclaimer to the main posts*
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 20, 2009, 04:49:53 PM
What.
(http://i44.photobucket.com/albums/f28/Blargel/difficulties.png)

Yes, I really plan on making that last difficulty.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: KomeijiKoishi on November 20, 2009, 05:04:59 PM
What.
(http://i44.photobucket.com/albums/f28/Blargel/difficulties.png)

Yes, I really plan on making that last difficulty.
The final one made my day.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Chronojet ⚙ Dragon on November 21, 2009, 02:40:13 AM
The final one made my day.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Zengar Zombolt on November 21, 2009, 04:58:16 AM
FUCKINGWHAT
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 22, 2009, 04:32:18 AM
Common Functions

Random suggestion from IRC: Make a library full of common functions that people need that aren't already included in Danmakufu. I'm kinda surprised that no one posted one up yet (but it seems a lot of people build their own libraries full of this sort of stuff).

Anyways, just stick this (http://www.mediafire.com/download.php?2tnwzwjyzyz) in your lib folder and call #include_function "lib\CommonFunctions.dnh" before @Initialize in any script you wanna use these functions. The file itself has comments telling you how to use them so take a look in it to see how everything works.

If there's functions that aren't included in there that you need, go ahead and let me know and I'll try to add it in and update the file. Keep in mind it's for COMMON functions though. Don't make me write something that will only be useful to like two people or something.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Danielu Yoshikoto on November 22, 2009, 05:04:23 PM
I just tested v0.5.
I don?t know why but it feels that the switching takes too long.
Also what difficulty is this suposed to represent?  :V
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Suikama on November 22, 2009, 05:09:17 PM
I just tested v0.5.
I don?t know why but it feels that the switching takes too long.
Also what difficulty is this suposed to represent?  :V
That's to prevent you from spamming C

Also iirc switching is even slower(by a tiny bit) in the actual Ikaruga games
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 22, 2009, 05:13:45 PM
Stuffman also thought that switching seemed to take too long, but I wasn't so sure. Maybe I'll research that a bit and possibly change it for the next release. The stage itself was just slapped together and actually is currently being refined, but I guess v0.5's difficulty is somewhere between normal and hard mode.

Also, Master Spark is gonna be redone since it too un-Touhou-ish to me somehow.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.5 released!)
Post by: Blargel on November 30, 2009, 01:13:20 PM
Hey guess what this is! :V
(http://i44.photobucket.com/albums/f28/Blargel/ohgodimsodead.png)
That's right, it's Goliath Doll (http://www.youtube.com/watch?v=1hqnFpXiI-A#t=3m30s)! The crazy attack Alice does against Cirno in Hisoutensoku!

Here, have a download (http://www.mediafire.com/download.php?4zozn5eomtm) too, but be careful, cause the doll has a collision hitbox so don't run into it while you're running around like a madman. :V

EDIT: I just noticed the cross of the swords doesn't match where the cross of the lasers appear. Oh well. Close enough.
EDIT: YouTube (http://www.youtube.com/watch?v=C3ScSTQ8c1g) woot
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.4 released!)
Post by: Blargel on December 06, 2009, 12:35:05 AM
Ikareimu v0.6.0!

(http://i44.photobucket.com/albums/f28/Blargel/ikareimu06.png)
Click here (http://www.mediafire.com/blargel) to download!


DO NOT UNZIP THIS IN YOUR EXISTING DANMAKUFU SCRIPT FOLDER AS IT WILL CRASH YOUR DANMAKUFU! IT ALREADY HAS DANMAKUFU PACKAGED WITH IT!

Features/changes:
 - Full stage (with midboss this time, lol)
 - Sound effects
 - 5 difficulties
 - Working menu
 - Option to change how you switch polarities
 - Probably other stuff I don't remember! :V

Known issues:
 - Random crashing at the end of a stage.
 - No sound effect for "max chain" and "energy max" (not really an issue but :V)

If you don't understand the mechanics, go find an Ikaruga guide somewhere that will tell you. I don't think it's that hard to understand if you watch a video of some pro on YouTube either. Anyway, yay, 3D backgrounds. Looks a bit strange with perfectly cylindrical tree trunks, but whatever. I'm relatively happy with the way it turned out.

As usual, feedback and bug reporting is welcome.

EDIT: Oh yes, you may need a relatively decent processor to run this game. There's quite a bit of background processing going on.
EDIT2: Youtube yay (http://www.youtube.com/watch?v=e34VK4BmZiE)
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Primula on December 06, 2009, 01:56:03 AM
Okay I'm trying the script this since I have spare time(art block due to lack of cging music) and I don't know what to do with it :V
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Prime 2.0 on December 06, 2009, 08:48:16 AM
Dear god this is not stage 1. There is no fucking way this is stage 1.


I always figured that the stage you had in the demos wasn't characteristic of stage 1 difficulty... stage 1 lunatic of UFO difficulty maybe, but not stage 1. Bear in mind, this is on normal mode...and I've 1cc'd most of Touhou games on hard.

Also, you made master spark harder, you twisted little freak! XD

Anyways, I took a stroll through fuckingwhat mode, just to see what it was like. I've never played the original version of flanchan, but somehow I think this is harder. I can't last two seconds without getting hit during the boss... and I mean this in the absolute literal sense. I can't wait to see Naut's reaction.


Anyways, the stage background was good, the addition of sound effects(finally!) was very welcome, Cirno was amusing, and Marisa's new introduction was freaking sweet. For some odd reason, Marisa has a longer delay between having her HP bar depleted and declaring her spell now... hm.

The menu sound is loud. Really, really loud. Make it less loud.  :V

Addressing the alternate control schemes, I think it is absolutely awesome that you can here... but I'd like to mention something: Given that we are using Ikaruga gameplay here, it's reasonable to assume that the player is going to be using the switch colors key almost constantly... this was mentioned by someone else I talk to who has played Ikaruga, and I have to agree, you should be able to assign the switch colors key to the bomb/aimed laser thingies key, and have the bomb key go somewhere else. For instance, X is switch, and Ctrl is laser thingy. Especially this time around I have been fumbling with the switch colors key an awful lot, and this would help massively.

I'm going to be playing this some more, though. It's totally awesome.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Blargel on December 06, 2009, 09:37:52 AM
Dear god this is not stage 1. There is no fucking way this is stage 1.

I always figured that the stage you had in the demos wasn't characteristic of stage 1 difficulty... stage 1 lunatic of UFO difficulty maybe, but not stage 1. Bear in mind, this is on normal mode...and I've 1cc'd most of Touhou games on hard.
Yeah, I know there's way too many bullets for a Touhou-style stage 1, but mashing together Touhou patterns with Ikaruga gameplay is a lot harder to balance than you would think. If you don't have impossible walls of bullets coming at you, there's no point for the polarity switching. If there's too many bullets, it doesn't seem like Touhou-style anymore. You gotta remember that a lot of the time, you need to realize what color it is best to switch to. For example, against Cirno, obviously it's better to be blue. Once there is a giant spam of red fairies on top of Cirno though at the very end before Marisa, it's better to become red and focus on dodging her big blue bullets instead.

Quote
Also, you made master spark harder, you twisted little freak! XD
You gotta admit, that version is a lot more Touhou-ish though. :V

Quote
Anyways, I took a stroll through fuckingwhat mode, just to see what it was like. I've never played the original version of flanchan, but somehow I think this is harder. I can't last two seconds without getting hit during the boss... and I mean this in the absolute literal sense. I can't wait to see Naut's reaction.
I can't last long either. The way I "balanced" it was by turning on invulnerability and going "Eh, there's gaps. Someone will find a way to live." Just as a side note, I've managed to actually make it to Marisa without dying on Fuckingwhat mode. She completely demolished all my lives on the first nonspell.
Quote
For some odd reason, Marisa has a longer delay between having her HP bar depleted and declaring her spell now... hm.
Yeah, I didn't want Marisa to declare immediately, but I ended up making the delay about a second too long so that it actually feels like it interrupts the battle flow. I realized this before I released this version, but it was 9am and I hadn't slept all night. I didn't want to spend another minute working on it.  :P

Quote
The menu sound is loud. Really, really loud. Make it less loud.  :V
Yes... yes it is. I really wish Danmakufu had volume control for sound. I guess I forgot about menu sounds when I was lowering the volume of the stolen ZUN sound. >:(

Quote
Addressing the alternate control schemes, I think it is absolutely awesome that you can here... but I'd like to mention something: Given that we are using Ikaruga gameplay here, it's reasonable to assume that the player is going to be using the switch colors key almost constantly... this was mentioned by someone else I talk to who has played Ikaruga, and I have to agree, you should be able to assign the switch colors key to the bomb/aimed laser thingies key, and have the bomb key go somewhere else. For instance, X is switch, and Ctrl is laser thingy. Especially this time around I have been fumbling with the switch colors key an awful lot, and this would help massively.
Darn you, picky person!  :V
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: KomeijiKoishi on December 06, 2009, 11:14:41 AM
What the hell is up with my jaw?

Anyway, AWESOME. Cirno made me lol.

I also took a look at Fuckingwhat. With invincibility, of course.

...I doubt that even Naut can beat that. I WANT A VIDEO!
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Solais on December 06, 2009, 11:57:38 AM
BLARGEL!!!!!!!

WHY ARE YOU SO AWESOME???

It's GREAT! Not to mention, this is also the best Menu Script I ever seen in my life, so much to learn from it!
Apart from that, this whole script reeks from AWESOME!!

Yes someone should make a video! And upload it to Nico too!
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Blargel on December 06, 2009, 01:47:14 PM
Okay I'm trying the script this since I have spare time(art block due to lack of cging music) and I don't know what to do with it :V

What do you mean, you dunno what to do with it? Extract outside of any existing Danmakufu folder, navigate to the th_dnh folder, and run th_dnh.exe. Then go to the Stage menu and run Ikareimu. Congratulations you've installed a virus!

What the hell is up with my jaw?

Anyway, AWESOME. Cirno made me lol.

I also took a look at Fuckingwhat. With invincibility, of course.

...I doubt that even Naut can beat that. I WANT A VIDEO!
Fuckingwhat is possible. With practice. Lots of practice. And masochism.

BLARGER!!!!!!!

WHY ARE YOU SO AWESOME???

It's GREAT! Not to mention, this is also the best Menu Script I ever seen in my life, so much to learn from it!
Apart from that, this whole script reeks from AWESOME!!

Yes someone should make a video! And upload it to Nico too!
Who's Blarger? :V
There's actually some redundant code in there, but I'm leaving it in just in case it's needed for the spellcard practice whenever I implement it. Still wondering what the easiest and cleanest way to do that is... Not to mention the guy who's helping me with story and spellcard ideas hasn't given me a list of spellcards either.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Primula on December 06, 2009, 02:42:02 PM
No I'm just playing the script because I have spare time.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Chronojet ⚙ Dragon on December 06, 2009, 03:45:51 PM
Oh, FUCKING WHAT!@! is pretty lunatic-ish...
Oh, and Lunatic is pretty easy.



Until LOVING HEART "DOUBLE SPARK"!! WOOOO then I lost my 5 lives.

EDIT: I must be crazy or something.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Blargel on December 08, 2009, 02:40:21 AM
Here, video. http://www.youtube.com/watch?v=e34VK4BmZiE
My attempt at Fuckingwhat with some rather stupid deaths (lol Cirno killed me) and utter fail at Marisa. Followed by a near perfect run of Normal if I hadn't had other stupid deaths. Yay for stupid deaths.

God damn bad framerate. But at least the sound doesn't desync.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Naut on December 08, 2009, 06:20:51 PM
I like the rebalancing of FuckingWhat mode.

Or reskewing...? Hmm.

I still like it.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Benny1 on December 08, 2009, 06:41:23 PM
Jesus, I check this forum after not going here for months, and I see all of this!

Awesome to have you back \o/
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Blargel on December 09, 2009, 06:30:01 AM
Ahaha, you're late Benny1! :V
I could've sworn I've seen you on this part of the forum at least once before when I was on at the same time though.

I like the rebalancing of FuckingWhat mode.

Or reskewing...? Hmm.

I still like it.
The only thing I touched was Marisa's first spell for FuckingWhat. I had the great idea of making every spellcard in the game have something ridiculous and extra on FuckingWhat that would make the average player go "Fucking what." For example, 3x amount of stars in 3 different directions on Non-directional Laser and 3x the Sparks in Double Spark. I might consider making the sparks move and calling it "Non-directional Master Spark" or something.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Blargel on February 10, 2010, 01:53:58 PM
M-m-m-megabump!

Got a random update: Bad Apple (http://dl.dropbox.com/u/4234581/BadApple.rar).
Yes, in Danmakufu. No I wasn't crazy enough to construct everything out of bullets. I was just trying to kill time without working on the scripts I'm supposed to be working on. ('Cause you know, that would actually be productive.) It might be fun to look at the FrameDefine.dnh in there while you have the script. It's AWESOME.  :V

Also, I might as well announce that I actually AM working on something, though it's coming along slowly because of limited time.
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Chronojet ⚙ Dragon on February 10, 2010, 03:21:24 PM
OH SHIT. OH SHIT. OH SHIIIIIT. THIS IS FUCKING AWESOME. I COULDN'T BELIEVE IT WAS EVEN POSSIBLE, BLARGEL~! iluiluilu~
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Danielu Yoshikoto on February 10, 2010, 08:23:28 PM
Got a random update: Bad Apple (http://dl.dropbox.com/u/4234581/BadApple.rar).
Yes, in Danmakufu.


wow... no off-syncing... AWESOME
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Suikama on February 10, 2010, 10:48:54 PM
M-m-m-megabump!

Got a random update: Bad Apple (http://dl.dropbox.com/u/4234581/BadApple.rar).
Yes, in Danmakufu. No I wasn't crazy enough to construct everything out of bullets. I was just trying to kill time without working on the scripts I'm supposed to be working on. ('Cause you know, that would actually be productive.) It might be fun to look at the FrameDefine.dnh in there while you have the script. It's AWESOME.  :V

Also, I might as well announce that I actually AM working on something, though it's coming along slowly because of limited time.
Damn you I was gonna do this!

Although you did a much better job that what I could have done :V


And now to probe your scripts to learn how you managed to sync it so well :coolvee:


Edit: Ahaha I feel so dumb for doing it the way I did for my GET DOWN script (raw frame by frame work :V).
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: CK Crash on February 10, 2010, 10:52:12 PM
I demand you add matching danmaku to this.
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: Demonbman on February 11, 2010, 02:36:03 AM
I demand you add matching danmaku to this.

EDIT: ALSO, I GET AN ERROR SAYING THAT THERE WAS AN UNEXPECTED END OF ARCHIVE...WHAT IS THIS?
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Blargel on February 11, 2010, 07:50:31 AM
Damn you I was gonna do this!

Although you did a much better job that what I could have done :V


And now to probe your scripts to learn how you managed to sync it so well :coolvee:


Edit: Ahaha I feel so dumb for doing it the way I did for my GET DOWN script (raw frame by frame work :V).
:V

I demand you add matching danmaku to this.
That would be difficult.

EDIT: ALSO, I GET AN ERROR SAYING THAT THERE WAS AN UNEXPECTED END OF ARCHIVE...WHAT IS THIS?
Huh?
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: Nimble on February 11, 2010, 11:18:27 AM
=A="

Average frame per sec = 7.2 oTL~
but yeah, I can watch it very well.

For the error, seem like it'll error if you fire some shot during play.

(http://images.torrentmove.com/iv/badapple_error.jpg)
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: Danielu Yoshikoto on February 11, 2010, 08:06:12 PM
For the error, seem like it'll error if you fire some shot during play.

it works for me... infact, i wanted to make a movie with bullets of customed Danmakufu Characters over the normal video.
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: Chronojet ⚙ Dragon on February 11, 2010, 09:23:11 PM
I'm so editing the Ikareimu sprites to make an Ikuruga thing. *shot*
Title: Re: Blargel's Danmakufu Corner (Ikareimu v0.6.0 released!)
Post by: Demonbman on February 12, 2010, 02:37:27 PM
Huh?

gah, fixed
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: Blargel on March 30, 2010, 02:06:40 PM
Yo, I'm back with more useless shit. Well, this time it's only useless because it doesn't do what its name implies it's supposed to be doing. Yet. I'm working on it, I swear!

Shoot the Bullet Engine for Danmakufu (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/)
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: Zengar Zombolt on March 30, 2010, 02:17:28 PM
Shoot the Bullet Engine for Danmakufu (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/)
Jeses fucking christ
ilu blargel
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: DgBarca on March 30, 2010, 03:25:04 PM
Yo, I'm back with more useless shit. Well, this time it's only useless because it doesn't do what its name implies it's supposed to be doing. Yet. I'm working on it, I swear!

Shoot the Bullet Engine for Danmakufu (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/)
I love you.
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: Kylesky on March 30, 2010, 03:29:46 PM
Shoot the Bullet Engine for Danmakufu (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/)

:o

but honestly... it doesn't seem that hard... just tedious... all you have to do is check the position of the camera + the length and width... then check whether the boss is there... if it is... then create an object or player shot that damages the boss on top of it... for shots, just a simple DeleteEnemyShotInCircle (don't know how that would work for rectangles though... :V) then add an object effect and a timer that sets the reducing length and width... all put into a single if(GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD) statement... and of course adding if(cameracharge==100) or something like that... :D

All falls into having enough time... or not getting too lazy...
Title: Re: Blargel's Danmakufu Corner (Bad Apple Script...?)
Post by: DgBarca on March 30, 2010, 03:35:57 PM
:o

but honestly... it doesn't seem that hard... just tedious... all you have to do is check the position of the camera + the length and width... then check whether the boss is there... if it is... then create an object or player shot that damages the boss on top of it... for shots, just a simple DeleteEnemyShotInCircle (don't know how that would work for rectangles though... :V) then add an object effect and a timer that sets the reducing length and width... all put into a single if(GetKeyState(VK_SHOT)==KEY_PUSH || GetKeyState(VK_SHOT)==KEY_HOLD) statement... and of course adding if(cameracharge==100) or something like that... :D

All falls into having enough time... or not getting too lazy...
The photo thing would be near the impossible...take an automatic screen shot are resize it, all of that coded in danmakufu ? hum...?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Chronojet ⚙ Dragon on March 30, 2010, 04:38:53 PM
I like this StB thing so far, but can someone show us all how it actually works?
And... well, where's the camera shot thing?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Azure Lazuline on March 30, 2010, 04:44:54 PM
For having the shots disappear, the easiest way would be to just make everything object shots in an array. I think you could figure out the rest from there (making the shots in a certain range disappear when you take a picture).

As for the screenshots, perhaps you could do some fooling around with this (http://dmf.shrinemaiden.org/wiki/index.php?title=Miscellaneous_Functions#SaveSnapShot) function? Call it, wait a frame, then load the picture and do whatever with it. Untested, but it should probably work.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Iryan on March 30, 2010, 04:58:53 PM
For the actual bullet removal, you could write a function that, depending on the current size of the picture frame, calls enough DeleteEnemyShotInCircle to fill the entire frame. It may be tedious, rough on the edges and may cause some slowdown, but it could work.

Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Drake on March 30, 2010, 05:02:57 PM
Thank you for being less lazy than the rest of the competent programmers and actually possibly going through with this.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Chronojet ⚙ Dragon on March 30, 2010, 05:24:13 PM
I was trying to make a shot that kills the player, sorta like Hatate/Aya's camera bullet/whateveryouwannacallit, but it doesn't really work that well if I stretch it too weirdly. I figured that I could modify it a bit and use it in the StB engine.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on March 30, 2010, 10:40:51 PM
I would sure be interested in help if there will be a "TouhouDanmakufu Bunkachou - MotK Edition" (most decent, till up to pros, scripters using thier own spellcards and you have to survive the shitstorm bullet curtains).
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Chronojet ⚙ Dragon on March 30, 2010, 11:24:38 PM
I would sure be interested in help if there will be a "TouhouDanmakufu Bunkachou - MotK Edition" (most decent, till up to pros, scripters using thier own spellcards and you have to survive the shitstorm bullet curtains).

I call 6th stage boss.
I'm also going to make my own spell card already for this.

... Collab time.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on March 30, 2010, 11:40:27 PM
I call 6th stage boss.

I call for 4th Stage then.
but we are getting off-topic here, so this should be a discussion in another thread.

and for now get?s get back to topic!

EDIT:
I just remmembered this. (http://www.youtube.com/watch?v=nqDXqn1ze1Y)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Chronojet ⚙ Dragon on March 31, 2010, 03:14:52 AM
I call for 4th Stage then.
but we are getting off-topic here, so this should be a discussion in another thread.

and for now get?s get back to topic!

EDIT:
I just remmembered this. (http://www.youtube.com/watch?v=nqDXqn1ze1Y)
Speaking of BlueGraphics, today he gave me a trial version of Touhou Ronald Project. (http://www.mediafire.com/?vzjqhmnnzyz)
Maybe we can even get a copy of that Aya player script...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Suikama on March 31, 2010, 03:18:30 AM
I have the Aya script

Here: http://www.mediafire.com/?iugkkmmkx04
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Chronojet ⚙ Dragon on March 31, 2010, 03:19:38 AM
I have the Aya script
NO WAY! THAT'S IMPOSSIB-- oh wait it isn't impossible...
@Blargel -- Please use this Aya script.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on March 31, 2010, 06:11:41 AM
I'm making my own Aya. I have an idea on how to do the slowdown and pausing without using the built in Slow function because that function causes the framerate to become noticeably choppy. Also, I'll need the Aya to be able to interact with the shots the boss fires out (all object bullets like Azure suggested) so that I can easily delete in a rectangle. Also, although they're all going to be object shots, the library I'm going to build into it will have funcions like CreateStbShot01 which behaves like CreateShot01 except that it has the deletion logic built into it for you. CreateStbLaser01 will be a bit tedious to do since those split/shrink if you don't take a picture of the whole laser. And lastly, curvy lasers are pretty much impossible so don't ask for those. That is the only limitation that I can see right now.

Also, you people and your collabs.  :V
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Kylesky on March 31, 2010, 07:25:48 AM
Whoops (http://www.youtube.com/watch?v=zRDOnhch7JI)
Who says it's that hard :V only took a few hours max... I'm probably gonna trash this cause I wouldn't wanna steal Blargel's idea, and I still have my game to do...

Note: Excluding the DrawLoop portion of Naut's Sanae I did not look at anyone's scripts to do this... (and fraps desynching the thing + youtube's visual raping + my comp sucking whenever it's showing object effects and stuff = >:( )
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on March 31, 2010, 09:05:45 AM
I'd love to see what you got, but YouTube is kinda screwed up on my end. It had refused to load any videos and lately it doesn't load period.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Kylesky on March 31, 2010, 09:26:13 AM
I'd love to see what you got, but YouTube is kinda screwed up on my end. It had refused to load any videos and lately it doesn't load period.

basically... An Aya player and 1 spell pattern (and a bullet library containing only 1 bullet type)... didn't bother to expand :V
Things I didn't do:
-Didn't make a menu/scene selection
-Sound effects of camera
-Boss movement slowing down while taking a picture (I slowed down the bullets though)
-Rectangle Detection (it currently detects a circle... got too lazy to make the rectangle, especially cause the photo effect object rotates... rotating rectangle >.<)
-Snapshots (I don't know how to use SaveSnapShot... or where it saves the snapshot)
-Charge Percentage won't draw for some reason... (also... I didn't put the % symbol... just numbers)
-Speed and size balancing (movement of the frame)... and some fixing with how the graphic changes when Aya takes a picture...
-Everything else balancing...

Will try to upload it to bulletforge...

EDIT:Uploaded (http://bulletforge.org/u/kylesky/p/stb-engine-to-be-scrapped/v/01/archive)
Note: I accidentally left the sanae player and some stuff in there... I just cleaned a copied version of my danmakufu (didn't download one), and used that for this... code's also a bit messy and needs some fixing...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: DgBarca on March 31, 2010, 11:42:42 AM
I think I would make a "player script" without doing a player script, just a Effect_obj, for more flexibility. It might be long, but not that hard. But GetPlayerX/Y should be replaced, GetAngleToPlayer too.

If I make EVERYTHING with Effect Obj...it would lag ?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Naut on March 31, 2010, 11:51:10 AM
Not unless you don't delete them. Bigger effect objects take longer to process. You'd also need to hide the current player, as well as detect collisions and graze properly. Unless you're doing something particularly batshit, I wouldn't recommend it.

Yes, I've tried it, lol.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: DgBarca on March 31, 2010, 12:06:38 PM
Not unless you don't delete them. Bigger effect objects take longer to process. You'd also need to hide the current player, as well as detect collisions and graze properly. Unless you're doing something particularly batshit, I wouldn't recommend it.

Yes, I've tried it, lol.
Common Data and Effect Spamming is somewhat my speciality.
Because any value increasing or decreasing would have to be a CommonData. Normal = X, InPhoto = X/2, InPause/AfterHit = 0...
:V :V :V Ho my Suwako why I am trying to do... :ohdear:
Making the player another Effect_Obj is good, because tasks don't stop working when you are hit...
Like:
Code: [Select]
let variable = 0;
task DoIt{
loop{
Increase(variable,1);
yield;
}
}
funtion Increase(v,n){
if(GetCommonData("STAGESTATE")=="NORMAL"){v+=n;} //When Playing
if(GetCommonData("STAGESTATE")=="SLOW"){v+=n/2;} //When Taking a photo
if(GetCommonData("STAGESTATE")=="PAUSE1"){v+=0;} //When Pausing the game
if(GetCommonData("STAGESTATE")=="PAUSE2"){v+=0;} //When you gor hit
}
EDIT : Well, isn't that the wrong thread ? Okay I stop spamming Blargel thread.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on March 31, 2010, 04:04:58 PM
Whoops (http://www.youtube.com/watch?v=zRDOnhch7JI)
Who says it's that hard :V only took a few hours max... I'm probably gonna trash this cause I wouldn't wanna steal Blargel's idea, and I still have my game to do...

Note: Excluding the DrawLoop portion of Naut's Sanae I did not look at anyone's scripts to do this... (and fraps desynching the thing + youtube's visual raping + my comp sucking whenever it's showing object effects and stuff = >:( )
basically... An Aya player and 1 spell pattern (and a bullet library containing only 1 bullet type)... didn't bother to expand :V
Things I didn't do:
-Didn't make a menu/scene selection
-Sound effects of camera
-Boss movement slowing down while taking a picture (I slowed down the bullets though)
-Rectangle Detection (it currently detects a circle... got too lazy to make the rectangle, especially cause the photo effect object rotates... rotating rectangle >.<)
-Snapshots (I don't know how to use SaveSnapShot... or where it saves the snapshot)
-Charge Percentage won't draw for some reason... (also... I didn't put the % symbol... just numbers)
-Speed and size balancing (movement of the frame)... and some fixing with how the graphic changes when Aya takes a picture...
-Everything else balancing...

Will try to upload it to bulletforge...

EDIT:Uploaded (http://bulletforge.org/u/kylesky/p/stb-engine-to-be-scrapped/v/01/archive)
Note: I accidentally left the sanae player and some stuff in there... I just cleaned a copied version of my danmakufu (didn't download one), and used that for this... code's also a bit messy and needs some fixing...

Yeah uhhh, I dunno why you're bothering to show me this, but I never said it's hard. I just said I wanted to make my own player and was listing the reasons for it. I'm not really in the mood to look through coding that even you think is messy so yeah...

Also, god damn lots of spam in my thread :S
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 01, 2010, 12:01:08 AM
Here's my useless Aya char (http://www.mediafire.com/download.php?qygzjej1w5z). She can't damage enemies or delete bullets and I don't plan to let her do so with normal bosses, but you can mess around with her charging, three move speeds, and picture taking. I think I imitated the ZUN version well. It's not on BulletForge because my engine doesn't really deserve an update on just a player char that can't do anything yet.

EDIT: Forgot to mention, I made her as similar to the ZUN version as I could (except for the way the crosshair moves outside of zoom mode because I started rushing) which means that she even has a somewhat long delay after taking a picture where she cant move. Because of this, it's best if you test this on a script that doesn't have bullets.

EDIT2: Corrected the way the crosshair moves. Noticed that a strange bug with taking pictures on default or pure black backgrounds. That bug is fixed but not in this version.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: ChaoStar on April 02, 2010, 05:38:48 PM
Here's my useless Aya char (http://www.mediafire.com/download.php?qygzjej1w5z). She can't damage enemies or delete bullets and I don't plan to let her do so with normal bosses, but you can mess around with her charging, three move speeds, and picture taking. I think I imitated the ZUN version well. It's not on BulletForge because my engine doesn't really deserve an update on just a player char that can't do anything yet.

Wait. That means I can't play Phantasm Romance with it! Fuuuuuck.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 12:39:32 AM
New version of StB engine! (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/v/030)

This time it actually has players and bullets. But it's laggy :S

EDIT: There is a problem in the current version of this engine where the player script causes rather severe crashes if you have a certain kind of graphics card. If you get this issue, check out this post (http://www.shrinemaiden.org/forum/index.php?topic=3366.msg302463#msg302463)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 04, 2010, 12:54:30 AM
New version of StB engine! (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/v/030)

Either something in the script is wrong, or my computer is not working right, because whenever I open up the running window, my screen goes black for a few seconds and tells me shows me an error message.

Btw... I am talking about, after I started the script and choose Aya.
It somehow doesn?t so anything on the main menu and I am stuck there because that one error.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 01:07:06 AM
Either something in the script is wrong, or my computer is not working right, because whenever I open up the running window, my screen goes black for a few seconds and tells me shows me an error message.

Btw... I am talking about, after I started the script and choose Aya.
It somehow doesn?t so anything on the main menu and I am stuck there because that one error.

Mind telling me more about this? What kind of error message? A Danmakufu scripting error? I've confirmed that it works for two other people already, but one other person was also have trouble getting it to run.

EDIT: Scratch that, two people have problems now and both got a blue screen of death. I had no idea that was even possible due to Danmakufu... Warning to all potential downloaders, it may cause the blue screen >.>
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Suikama on April 04, 2010, 01:18:13 AM
Is this a script or did you include danmakufu in the download? If it's the whole thing and people put it in thier script folders without looking, it WILL crash danmakufu and cause other problems.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 01:19:35 AM
It's just a thing you unpack in the script folder. :ohdear:
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 04, 2010, 01:30:24 AM
It's just a thing you unpack in the script folder. :ohdear:

Well It seems to have something to do with my graphic card (or something related to that), not danmakufu, through.
Doesn?t look good.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Suikama on April 04, 2010, 01:31:05 AM
It's just a thing you unpack in the script folder. :ohdear:
Hmm... so it is

Anyways it works great for me. Nice work  8)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Chronojet ⚙ Dragon on April 04, 2010, 04:33:38 AM
I HAVE FOUND WHAT CAUSES THE CRASH!!

I copy-pasted the Aya player script in the Photography folder to my "Aya As Seen Through A Camera's Lens" folder, and tried to test the boss using your Aya player script.
Well, my computer crashed again!

After restarting my computer, I tried changing a line in the Photography folder's main.dnh file to
Code: [Select]
#Player[FREE]And Danmakufu ran the scripts without crashing.
:ohdear:
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 01:10:40 PM
That makes no sense whatsoever, but if you got it working, perhaps that little fix can help anyone else having the problem. If you changed the thing to FREE, are you sure you're using the correct Aya script though? If you had my earlier version of Aya, it might have been causing crashing.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Chronojet ⚙ Dragon on April 04, 2010, 01:12:27 PM
That makes no sense whatsoever, but if you got it working, perhaps that little fix can help anyone else having the problem. If you changed the thing to FREE, are you sure you're using the correct Aya script though? If you had my earlier version of Aya, it might have been causing crashing.
Well, I'm using Reimu A instead of your new Aya script, on your StB engine.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 02:07:54 PM
Well, I'm using Reimu A instead of your new Aya script, on your StB engine.

That's not going to work... Aya is sends out a bunch of common data that the engine needs...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 03:24:06 PM
⑨dog and I narrowed down the problem and have it fixed now. To fix it, go to Photography\player\Aya\ and open Camera.dnh. Replace the entire contents with this (http://pastebin.com/7TsFXkVh). For people new to PasteBin, you can copy the whole contents without line numbers from the text box at the bottom of the page.

For those who are interested in what the problem was, it's how graphics cards interpreted one line of code that I wrote. I tried to make an effect object with only one vertex with the intention of resizing the amount of vertices later with ObjEffect_ResizeVertexCount. However, some graphics cards don't understand how to draw an image with only one point so they cause a hard crash. By moving the image off the screen and setting the vertices to 3 instead of 1, it fixed the problem.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 04, 2010, 04:50:26 PM
Yay! It finally works!

Does it also work with costum bulletsheets? (too lazy to try out)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 09:09:15 PM
Yay! It finally works!

Does it also work with costum bulletsheets? (too lazy to try out)

Yes. You define the deletion radius per bullet (so if you have an anchor sized or unzan fist sized bullet, you can set a higher number) as well as the color of recovery particle to turn into upon deletion. I may change the code a little so that the number of recovery particles is based on size as well later. For now, each bullet turns into one recovery particle.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Azure Lazuline on April 04, 2010, 09:21:09 PM
And bigger bullets will also be worth more points, correct?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 09:25:05 PM
That is also settable. Each bullet has a stored score value. Speed does not affect this in any way, however, and truthfully, I don't know if it's really true that faster bullets are worth more points.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 04, 2010, 09:45:23 PM
I know this is a beta of some sort but...

(http://img688.imageshack.us/img688/2281/snapshot162a.png)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 11:00:20 PM
Woah, that's never happened to me before. Can you reproduce this and tell me how it happened?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 04, 2010, 11:20:37 PM
Woah, that's never happened to me before. Can you reproduce this and tell me how it happened?

Well I choose Level 1 Scene 1 and then out of no where, two Wriggles poped up.
I dunno how it happened.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 11:24:18 PM
According to the code I wrote, that should absolutely never happen. I'm extremely confused...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 04, 2010, 11:26:31 PM
According to the code I wrote, that should absolutely never happen. I'm extremely confused...

I was too, when this happened.
Oh well maybe it was because of lag or something... or it?s just my wacky computer  :V

EDIT: I tried making a script and I have run into some errors. (put it into the file wriggle2.dnh)

Code: [Select]
script_enemy_main {
  #include_function ".\bosslib\Boss.dnh"
    let imgBoss = GetCurrentScriptDirectory ~ "img\wriggle.png";
    let BossCutIn = GetCurrentScriptDirectory~"\boss.png";
    let Frame = -120;
    let Rotate = 0;
    let AngA = 0;
    let AngB = 179;
    let Amount =1;
    @Initialize {
    InitializeStbBoss;
    LoadGraphic(imgBoss);
    SetTexture(imgBoss);
    SetGraphicRect(0, 0, 48, 64);
    SetX(GetClipMinX);
    SetY(GetClipMinY);
    SetStbMovePosition03(GetCenterX, GetClipMinY+130, 20, 8);
    }

    @MainLoop {

if(GetCurrentPicture==0){
AngB = 178;
Amount = 1;
}

if(GetCurrentPicture==1){
AngB = 181;
Amount = 1;
}

if(GetCurrentPicture==2){
AngB = 179.5;
Amount = 1;
}

if(Frame>0){
Attack;
}

if(Frame==60){
Frame=0;
        SetStbMovePosition03(GetCenterX+rand(40, 80), GetClipMinY+rand(120, 200), 20, 5);
}

    Frame++;
    yield;
    }

  @DrawLoop {
    DrawGraphic(GetX, GetY);
  }

    @Finalize {
        if(GotSpellCardBonus){
            PlaySE(GetCurrentScriptDirectory~"SFX\SpellBonus.wav");
        }
    }

  task Attack{
Bullets(GetX, GetY, AngA);
AngA=AngA+AngB;
  }


  task Bullets(x, y, angle){
loop(Amount){
    let obj = ObjStbShot_Initialize(x, y, 2, angle+Rotate, RED23, 0, 50, 8, RED);
Rotate=Rotate+360/5}
}
}

1. one bullet will get stuck at th boss Position after the Boss died, and will not move at all.
2. Bullets still get shot, why Aya is taking a photo.

And sorry for trying to ALREADY create something with the engine, I was bored and wanted to get it to work.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 11:40:30 PM
You should not do any MainLoop stuff to control the boss. Everything must be done with tasks and in every task, all yields must be replaced with the Wait function that is already built in. Even single yields must be replaced with Wait(1). However, the yield in MainLoop is still a yield. Do NOT put Wait(1); in the MainLoop

The Wait function I wrote is the thing that pauses boss logic at appropriate times.

If you absolutely want to do stuff with MainLoop, you can try adding this into your code.

Code: [Select]
task ManageFrameCounter {
  loop {
    Wait(1);
    Frame++;
  }
}

Put that task in, call it once in Initialize, and remove the Frame++; in the MainLoop. I believe it should work properly.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Suikama on April 04, 2010, 11:47:27 PM
You should not do any MainLoop stuff to control the boss. Everything must be done with tasks and in every task, all yields must be replaced with the Wait function that is already built in. Even single yields must be replaced with Wait(1). However, the yield in MainLoop is still a yield. Do NOT put Wait(1); in the MainLoop

The Wait function I wrote is the thing that pauses boss logic at appropriate times.

If you absolutely want to do stuff with MainLoop, you can try adding this into your code.

Code: [Select]
task ManageFrameCounter {
  loop {
    Wait(1);
    Frame++;
  }
}

Put that task in, call it once in Initialize, and remove the Frame++; in the MainLoop. I believe it should work properly.
Uh I thought the builtin Wait function was for dialogues only
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 04, 2010, 11:54:29 PM
Uh I thought the builtin Wait function was for dialogues only

I meant the one I built into the engine for bosses. It's a modification of the usual Wait function that taskers use a lot.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 05, 2010, 12:17:26 AM
I believe it should work properly.

Adding the code somehow doesn?t make the count go up (The boss should move every 60 frames).

Adding "Wait(1);" to every task slows it down.

and nope, the problems are still there.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 05, 2010, 01:13:26 AM
Okay I took a closer look at your code by actually putting it into a script that my engine would read. Yeah, MainLoop scripting isn't going to cut it. You have to learn how to handle everything in tasks.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: AweStriker Nova on April 05, 2010, 01:19:59 AM
Is there anything special I need to know about making extra scripts for this? Is there documentation somewhere?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 05, 2010, 01:24:09 AM
You have to learn how to handle everything in tasks.

Scripting Level while normaly scripting: Level 4
Scripting Level when only able to use tasks: Nameless Fairy
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: AweStriker Nova on April 05, 2010, 01:32:02 AM
Scripting Level while normaly scripting: Level 4
Scripting Level when only able to use tasks: Nameless Fairy

...Huh. I'm the exact opposite. I can't get anything MainLoop to work correctly at all.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 05, 2010, 01:34:38 AM
Is there anything special I need to know about making extra scripts for this? Is there documentation somewhere?
There's plenty you need to know. You can take a look at the configMenus.dnh and the files in the boss\bosslib directory. They're all commented although not very well. I'll write some easier to read documentation when all the base features are completed. My wriggle1.dnh in the boss directory is a good example of how to do things though. Just for the most part, remember to put everything inside tasks and use the Wait function.

Scripting Level while normaly scripting: Level 4
Scripting Level when only able to use tasks: Nameless Fairy

Here, your code converted into tasks:
Code: [Select]
script_enemy_main {
  #include_function ".\bosslib\Boss.dnh"
  let imgBoss = GetCurrentScriptDirectory ~ "img\wriggle.png";
  let BossCutIn = GetCurrentScriptDirectory~"\boss.png";
  let Frame = -120;
  let Rotate = 0;
  let AngA = 0;
  let AngB = 179;
  let Amount =1;
  @Initialize {
    InitializeStbBoss;
    LoadGraphic(imgBoss);
    SetTexture(imgBoss);
    SetGraphicRect(0, 0, 48, 64);
    SetX(GetClipMinX);
    SetY(GetClipMinY);
    SetStbMovePosition03(GetCenterX, GetClipMinY+130, 20, 8);
   
    FakeMainLoop;
  }

  @MainLoop {
    if(GetCurrentPicture==0){
      AngB = 178;
      Amount = 1;
    }

    if(GetCurrentPicture==1){
      AngB = 181;
      Amount = 1;
    }

    if(GetCurrentPicture==2){
      AngB = 179.5;
      Amount = 1;
    }
    yield;
  }

  @DrawLoop {
    DrawGraphic(GetX, GetY);
  }

  @Finalize {
    if(GotSpellCardBonus){
      PlaySE(GetCurrentScriptDirectory~"SFX\SpellBonus.wav");
    }
  }
 
  task FakeMainLoop {
    loop {
      if(Frame>0){
        Attack;
      }

      if(Frame==60){
        Frame=0;
        SetStbMovePosition03(GetCenterX+rand(40, 80), GetClipMinY+rand(120, 200), 20, 5);
      }

      Frame++;
      Wait(1);
    }
  }
   
  task Attack {
    Bullets(GetX, GetY, AngA);
    AngA=AngA+AngB;
  }


  task Bullets(x, y, angle){
    loop(Amount){
      let obj = ObjStbShot_Initialize(x, y, 2, angle+Rotate, RED23, 0, 50, 8, RED);
      Rotate=Rotate+360/5
    }
  }
}
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: CK Crash on April 05, 2010, 02:48:16 AM
I'm working on a set of lolexample scenes, hopefully will post them tomorrow. In the meantime:

Scripting Level while normaly scripting: Level 4
Scripting Level when only able to use tasks: Nameless Fairy

Code: [Select]
//easy modo code

let frame = -60;

@MainLoop
{
if (frame==120){doshit; frame = 0;}
frame++;
}

Code: [Select]
//cool kids code

@Initialize
{
MainTask;
}

task MainTask
{
Wait(60);
loop
    {
    Wait(120);
    doshit;
    }
}

@MainLoop
{
yield;
}

Looks more complicated at first, but you can have more than one task running at the same time, so you don't have to bother with multiple frame variables. Use @MainLoop only for stuff that needs to be done every single frame, and have the attack code in the tasks.

side effects may include naut not loving you anymore
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: AweStriker Nova on April 05, 2010, 03:36:46 AM
About the bullet color parameter:

Do I have to specify a color in the array? I tried putting WHITE in and it spit out "WHITE is the unidentified identifier".

EDIT: I got around this by just making everything blue instead, but I'd still like an answer.

The other thing is this (http://www.glowfoto.com/static_image/04-203041L/5962/png/04/2010/img5/glowfoto). To clarify, the large bullets are shooting those lines of small ones. But when one of the large bullets is deleted, the small ones still spawn from 0,0. This needs to be fixed...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 05, 2010, 05:11:19 AM
Bullet color parameter allows the following: RED, ORANGE, YELLOW, GREEN, CYAN (not AQUA), BLUE, and PURPLE. These parameters are how the engine detects if you should get a Red Shot, Orange Shot, Colorful Shot, Rainbow Shot, etc. and what color the recovery particles will become. I suppose I should put a NONE parameter that spits out white particles, but if you put in 0, it should do the same thing.

As for your issue in the image, I don't believe that is my problem. If you'd like, I can try running your code if you give it to me to see if I can fix it, but I'm pretty sure it's not my fault.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: AweStriker Nova on April 05, 2010, 05:55:37 AM
Code: [Select]
script_enemy_main {
  #include_function ".\bosslib\Boss.dnh"
  let imgBoss = GetCurrentScriptDirectory ~ "img\wriggle.png";
  @Initialize {
    CreateDebugWindow;
    InitializeStbBoss;
    LoadGraphic(imgBoss);
    SetTexture(imgBoss);
    SetGraphicRect(0, 0, 48, 64);
    SetX(GetClipMinX);
    SetY(GetClipMinY);
    SetStbMovePosition03(GetCenterX, GetClipMinY+130, 20, 8);
    Attack;
  }
 
  @MainLoop {
    OutputDebugString(0, "current picture", GetCurrentPicture);
    yield;
  }
 
  @DrawLoop {
    DrawGraphic(GetX, GetY);
  }
 
  @Finalize {
  }
 
  task Attack {
    Wait(72);
    loop {
      loop {
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        if(GetCurrentPicture > 1){ break; }
        Wait(72);
        SetStbMovePosition03(GetCenterX+rand(40, 80), GetClipMinY+rand(120, 200), 20, 5);
        if(GetCurrentPicture > 1){ break; }
        Wait(72*3);
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        if(GetCurrentPicture > 1){ break; }
        Wait(72);
        SetStbMovePosition03(GetCenterX-rand(40, 80), GetClipMinY+rand(120, 200), 20, 5);
        if(GetCurrentPicture > 1){ break; }
        Wait(72*3);
      }
      loop {
        let random = rand(0, 360);
        Wait(72);
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        Wait(36);
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        Wait(36);
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        Wait(72);
        SetStbMovePosition03(GetCenterX+rand(40, 80), GetClipMinY+rand(120, 200), 20, 5);
        random = rand(0, 360);
        Wait(72);
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        Wait(36);
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        Wait(36);
        CrystalLineSeed(GetX, GetY, 0, 0, BLUE03, 15);
        Wait(72);
        SetStbMovePosition03(GetCenterX-rand(40, 80), GetClipMinY+rand(120, 200), 20, 5);
      }
    }
  }
 
  task CurvyBullets(angle){
    loop(12){
      ascent(i in 0..10){
        CurvyBullet(GetX, GetY, 3, angle+i*36, YELLOW01, 10);
      }
      Wait(6);
    }
  }
 
  task StraightBullets(angle){
    loop(12){
      ascent(i in 0..10){
        ObjStbShot_Initialize(GetX, GetY, 3, angle+i*36, YELLOW02, 10, 100, 12, YELLOW);
      }
    Wait(17);
    }
  }
 
  task CurvyBullet(x, y, speed, angle, graphic, delay){
    let obj = ObjStbShot_Initialize(x, y, speed, angle, graphic, delay, 50, 8, YELLOW);
    Wait(delay);
    loop(30){
      ObjStbShot_SetAngle(obj, ObjStbShot_GetAngle(obj)+1.5);
      Wait(1);
    }
    Wait(4);
    loop(60){
      ObjStbShot_SetAngle(obj, ObjStbShot_GetAngle(obj)-1.5);
      Wait(1);
    }
    Wait(4);
    loop(60){
      ObjStbShot_SetAngle(obj, ObjStbShot_GetAngle(obj)+1.5);
      Wait(1);
    }
    Wait(4);
    loop(60){
      ObjStbShot_SetAngle(obj, ObjStbShot_GetAngle(obj)-1.5);
      Wait(1);
    }
  }

  task CrystalLineSeed(x, y, speed, angle, graphic, delay){
    let obj = ObjStbShot_Initialize(x, y, speed, angle, graphic, delay, 150, 32, BLUE);
    Wait(delay);
    loop(10){
      ascent(i in -2..3){
        DownCrystal(ObjStbShot_GetX(obj), ObjStbShot_GetY(obj), i, 3, BLUE23, 10);
        UpCrystal(ObjStbShot_GetX(obj), ObjStbShot_GetY(obj), i, 3, BLUE23, 10);
        ObjStbShot_Initialize(x, y, 2, 0, RED23, delay, 150, 32, RED);
        ObjStbShot_Initialize(x, y, 2, 180, RED23, delay, 150, 32, RED);
      }
      Wait(57);
    }
    ObjStbShot_FadeDelete(obj);
  }

  task DownCrystal(x, y, xspeed, yspeed, graphic, delay){
    let obj = ObjStbShot_Initialize(x, y, yspeed, 90, graphic, delay, 50, 6, BLUE);
    Wait(delay);
    while(!Obj_BeDeleted(obj)){
      ObjStbShot_SetX(obj, ObjStbShot_GetX(obj)+xspeed);
      Wait(1);
    }
  }

  task UpCrystal(x, y, xspeed, yspeed, graphic, delay){
    let obj = ObjStbShot_Initialize(x, y, yspeed, 270, graphic, delay, 50, 6, BLUE);
    Wait(delay);
    while(!Obj_BeDeleted(obj)){
      ObjStbShot_SetX(obj, ObjStbShot_GetX(obj)+xspeed);
      Wait(1);
    }
  }
}

There you go. I made a few changes since the image was made so it couldn't be cheesed by staying above/to either side of the boss, and this is far from the final version.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 05, 2010, 06:31:28 AM
As I thought it isn't an error on my end. Your problem is here:
Code: [Select]
  task CrystalLineSeed(x, y, speed, angle, graphic, delay){
    let obj = ObjStbShot_Initialize(x, y, speed, angle, graphic, delay, 150, 32, BLUE);
    Wait(delay);
    loop(10){
      ascent(i in -2..3){
        DownCrystal(ObjStbShot_GetX(obj), ObjStbShot_GetY(obj), i, 3, BLUE23, 10);
        UpCrystal(ObjStbShot_GetX(obj), ObjStbShot_GetY(obj), i, 3, BLUE23, 10);
        ObjStbShot_Initialize(x, y, 2, 0, RED23, delay, 150, 32, RED);
        ObjStbShot_Initialize(x, y, 2, 180, RED23, delay, 150, 32, RED);
      }
      Wait(57);
    }
    ObjStbShot_FadeDelete(obj);
  }

Notice that your loop(10) doesn't detect if the object is deleted already anywhere in the middle of it when detecting if it should be creating more bullets. If you want to fix this, I suggest putting if(Obj_BeDeleted(obj)){ break; } right before the ascent and your problem should be fixed.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: DgBarca on April 05, 2010, 02:28:07 PM
In the Wriggle sample script, I tried to change the angle variation with a speed variation, and then, BOOM.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 05, 2010, 03:31:34 PM
In the Wriggle sample script, I tried to change the angle variation with a speed variation, and then, BOOM.

Thanks for catching that. I haven't had the chance to test if my StbShots behave exactly like a normal shot object and this is a really big oversight on my end. I've fixed this and similar problems with other ObjStbShot functions that I overlooked so they shouldn't cause an error like that again. It'll be in a new release in the near future after I get a few more features, bug fixes, and optimizations done.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 05, 2010, 05:09:48 PM
Oh hey I uploaded a video... (http://www.youtube.com/watch?v=aVZCzOx7BLc)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 05, 2010, 07:45:12 PM
Not to be mean or anything, but you are terrible at StB. :V
Mind if I use the video as my bulletforge video preview?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 05, 2010, 08:44:47 PM
Not to be mean or anything, but you are terrible at Touhou in General. :V

Mind if I use the video as my bulletforge video preview?

No Problem.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: ChaoStar on April 06, 2010, 12:01:08 PM
Okay I took a closer look at your code by actually putting it into a script that my engine would read. Yeah, MainLoop scripting isn't going to cut it. You have to learn how to handle everything in tasks.

You don't know how happy I am to hear this. Thank god it's not the other way around.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 06, 2010, 08:39:10 PM
Important, please read!

In the interests of keeping processing power required to run this engine lower while keeping all the features I want, some sacrifices will have to be made in how automatic some things will be done. Currently, when you script in Danmakufu, if you input a delay for your bullet, it automatically draws the delay effect at the correct position. However, because of how my engine slows down and pauses the game when you zoom and take photos, the default delay effect will not work and I will implement my own. However, because it is my own effect, it will have to be an effect object, which carries more power to process than I would like.

Therefore, the solution I came up with was to give a function such as CreateStbDelay(x, y, color, duration) which would spawn the effect at the given point for the given amount of time with the given color. You would have to manually call this any time you would want to have a delay effect on a bullet. My reasoning for this is that quite often, bosses will be spawning the same color bullets at the exact same spot at the exact same time with the exact same delay time. If I were to make my engine automatically draw the effect every time you created a bullet, it would create the same effect possibly hundreds of times on the exact same point, which is extremely redundant. But the point is that it would still cost processing power, and potentially a lot of it.

Any comments on this idea? I realize it will be more inconvenient because you would have to remember to call this function every time you wanted to make bullets with delay, but it would have drastically better performance than auto-drawing the effect upon bullet creation.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: ChaoStar on April 06, 2010, 09:30:58 PM
Well. In some cases, I think that having manual delay is awesome. But in other cases, annoying. Soooo...

why don't we have a bullet that has a built in delay

...and a delay function?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Azure Lazuline on April 06, 2010, 10:36:11 PM
Just do what you planned. It's slightly inconvenient, but people will get used to it easily.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 07, 2010, 12:18:25 AM
Well. In some cases, I think that having manual delay is awesome. But in other cases, annoying. Soooo...

why don't we have a bullet that has a built in delay

...and a delay function?
I'm not going to make two different bullet types for delay or non-delay. That's just completely unnecessary.

Just do what you planned. It's slightly inconvenient, but people will get used to it easily.
I suppose you're right.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: MCXD on April 07, 2010, 12:56:10 AM
I have absolutely no issues with manual delay functions. Also, I completely support this project and am greatly anticipating future updates.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 08, 2010, 03:24:22 AM
Version 1.0.0 of the Shoot the Bullet Engine is now released! (http://bulletforge.org/u/blargel/p/shoot-the-bullet-engine/v/100)

Go knock yourselves out. As always, please report any bugs you find.
Now excuse me while I go write documentation on the DMF wiki (http://dmf.shrinemaiden.org/wiki/index.php?title=StB_Engine_Documentation).
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Danielu Yoshikoto on April 08, 2010, 12:05:42 PM
Tested it... WRIGGLE KICK
So yeah... still waiting for the comments to be implied, as well as (un)locking of levels.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Iryan on April 08, 2010, 12:14:46 PM
Already now I am able to tell: You are a god.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: ChaoStar on April 08, 2010, 12:30:17 PM
Already now I am able to tell: You are a god.

Pity he can't sprite, make music, or draw :V

because if he could...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 08, 2010, 01:12:12 PM
I finally got some documentation (http://dmf.shrinemaiden.org/wiki/index.php?title=StB_Engine_Documentation) that should be enough to get most task-oriented scripters able to work on their stuff. The other sections will go up later. Also just as a heads up, the speed of the camera charging in both unfocused and superfocused mode will be increased in the next release. The one in this version, WonderfulLife pointed out was too slow.

Tested it... WRIGGLE KICK
So yeah... still waiting for the comments to be implied, as well as (un)locking of levels.
That won't be for a while. The next release is going to include functions like CreateStbShot01, CreateStbShot02, CreateStbShot11, CreateStbShot12, and laser creation. It will also (finally) have sound effects in the menu and for Aya.

Already now I am able to tell: You are a god.
Quick, give me faith before I die!

Pity he can't sprite, make music, or draw :V

because if he could...
I can play music...  :ohdear:
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Iryan on April 08, 2010, 02:28:28 PM
Pity he can't sprite, make music, or draw :V

because if he could...
Quote
he can't make music

Shun the nonbeliever! Shuuuuuuuuuun! (http://www.youtube.com/watch?v=RrcpuuRVTWo)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Demonbman on April 08, 2010, 05:37:41 PM
Quote

!   C:UsersBrandonDocumentsDownloadsPhotography (1).rar: CRC failed in Photographysoundgmgm5.mp3. The file is corrupt
!   C:UsersBrandonDocumentsDownloadsPhotography (1).rar: Unexpected end of archive
:X
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Garlyle on April 08, 2010, 05:39:22 PM
:X
How do people not know this error?  It means that your download got screwed up and cut off early.  Delete it and go redownload.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Demonbman on April 08, 2010, 05:47:39 PM
How do people not know this error?  It means that your download got screwed up and cut off early.  Delete it and go redownload.


pffffff I know that! Thats why I posted it! I've redownloaded it 6 times!
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: ChaoStar on April 08, 2010, 05:53:01 PM

pffffff I know that! Thats why I posted it! I've redownloaded it 6 times!

If you want to wait, I'll mirror it for you. That might help.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Garlyle on April 08, 2010, 07:22:58 PM
Mirroring might be a good idea because I could download it just fine.

Erm, on another note though... I can't -run- it just fine.  I tried going through the music room, selected Wind Tour... and my computer froze.  Not just for a short time, not just Danmakufu... I literally had to force power-off my comptuer.  I was able to replicate this glitch, so... it wasn't just an accidental thing.  I don't know what's going on but I'm not going to restart my computer again to test out if it freezes up on other songs.

On the other hand, everything else seems to work fine 8D Can I possibly suggest making the Nice Shot window customizable in some way?  I know in some StB scenes, it doesn't reach the full 2x score bonus possible, while in others it does.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: ChaoStar on April 08, 2010, 07:56:55 PM
Mirroring might be a good idea because I could download it just fine.

Erm, on another note though... I can't -run- it just fine.  I tried going through the music room, selected Wind Tour... and my computer froze.  Not just for a short time, not just Danmakufu... I literally had to force power-off my comptuer.  I was able to replicate this glitch, so... it wasn't just an accidental thing.  I don't know what's going on but I'm not going to restart my computer again to test out if it freezes up on other songs.

On the other hand, everything else seems to work fine 8D Can I possibly suggest making the Nice Shot window customizable in some way?  I know in some StB scenes, it doesn't reach the full 2x score bonus possible, while in others it does.

Well, weird problem. It works perfecto for me! D:
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Demonbman on April 08, 2010, 08:53:03 PM
If you want to wait, I'll mirror it for you. That might help.


Could you please? and Thank you!
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 08, 2010, 10:22:50 PM
Mirroring might be a good idea because I could download it just fine.

Erm, on another note though... I can't -run- it just fine.  I tried going through the music room, selected Wind Tour... and my computer froze.  Not just for a short time, not just Danmakufu... I literally had to force power-off my comptuer.  I was able to replicate this glitch, so... it wasn't just an accidental thing.  I don't know what's going on but I'm not going to restart my computer again to test out if it freezes up on other songs.

On the other hand, everything else seems to work fine 8D Can I possibly suggest making the Nice Shot window customizable in some way?  I know in some StB scenes, it doesn't reach the full 2x score bonus possible, while in others it does.

FFFFFFF More random ass glitches that actually mess up more than Danmakufu!? Anyone else having this problem? :S

Also in StB, Nice Shot maxes out at 1.5 multiplier if you manage to time it almost perfectly and always gets you at least 1.2 for all scenes. As far as I could tell, the window of opportunity is about the same for all scenes as well. If you can point me to a scene that doesn't fit this, I'll go ahead and change it.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: ChaoStar on April 08, 2010, 10:57:34 PM

Could you please? and Thank you!

dawn.

http://www.mediafire.com/?yyzmmyzznym
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: MCXD on April 08, 2010, 11:35:13 PM
I have no idea how many things you are aware of, but I may as well list all the little aesthetic things which are still missing:

- Comments, although implemented in-program, aren't implemented in the GUI yet.
- Nothing to indicate which scenes are beaten.
- No unlocking system yet.
- Nothing to save high-scores, or for that matter, best shots.
- No 'attempts' counter. Hell, lets just say that you're lacking a lot of things on the stage select screen *shot*
- Nothing to save replays (I'm pretty sure this is impossible anyway. Thanks, DMF.)
- No running (high)score display in the top left during gameplay.
- No stage number or text photo count in the top right of the screen during game play.
- Aya doesn't have a visible hit-box. (She's supposed to when she focuses.)
- No DS features as of yet, like tilted pictures and orientation switching.

:V

So anyway, this is actually really awesome. I've already began messing around with it and making mock spell-cards, hopefully for perhaps a little project in future. This has only made me more excited. Keep up the excellent work!
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 09, 2010, 12:11:21 AM
I have no idea how many things you are aware of, but I may as well list all the little aesthetic things which are still missing:

- Comments, although implemented in-program, aren't implemented in the GUI yet.
- Nothing to indicate which scenes are beaten.
- No unlocking system yet.
- Nothing to save high-scores, or for that matter, best shots.
- No 'attempts' counter. Hell, lets just say that you're lacking a lot of things on the stage select screen *shot*
- Nothing to save replays (I'm pretty sure this is impossible anyway. Thanks, DMF.)
- No running (high)score display in the top left during gameplay.
- No stage number or text photo count in the top right of the screen during game play.
- Aya doesn't have a visible hit-box. (She's supposed to when she focuses.)
- No DS features as of yet, like tilted pictures and orientation switching.

:V

So anyway, this is actually really awesome. I've already began messing around with it and making mock spell-cards, hopefully for perhaps a little project in future. This has only made me more excited. Keep up the excellent work!

I pretty much know all that except for the hitbox thing. Totally forgot about Aya's hitbox.  :ohdear: As for the rest of the scene select menu. Pretty much all of it is impossible until I get around to saving data into common data files to keep track of every scene's score and clear status. Aya's comments, best shots, attempted photos and all that other good stuff would be heavily dependent on those after all.

The introduction page of my documentation lists all the things that aren't implemented yet so you might want to take a look before getting too into it.

Erm, on another note though... I can't -run- it just fine.  I tried going through the music room, selected Wind Tour... and my computer froze.  Not just for a short time, not just Danmakufu... I literally had to force power-off my comptuer.  I was able to replicate this glitch, so... it wasn't just an accidental thing.  I don't know what's going on but I'm not going to restart my computer again to test out if it freezes up on other songs.

I believe I know what the problem is. It is likely a similar problem to the first crashing issue so if you've experienced crashing in the previously released version, the music room is not a good place to explore as of this version. The issue is with how the lines of text are drawn. In some of the descriptions, there are lines with no text on them and when the effect objects that take those lines tries to calculate how many vertices to create, they create 0. Creating an effect with less than 3 vertices will invariably cause certain graphics cards to perform strangely and crash the whole computer -- not just Danmakufu. I'll have this fixed in the next version.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 12, 2010, 05:58:30 AM
More optimization,  more sacrifices. This one is related to the previous sacrifice I had to make for optimization, by which I mean it's related to shot delay. It's not too big of a change, but it IS inconvenient, and so I'm letting everyone know ahead of time.

Right now, when you want to delay a bullet and show a delay effect, you have write something like this:
CreateStbDelay(GetX, GetY, YELLOW, 10);  //Delay effect lasting 10 frames.
ObjStbShot_Initialize(GetX, GetY, 3, GetAngleToPlayer, YELLOW01, 10, 30, 8, YELLOW); //Delay set at 10 frames.


That is, you have to manually draw the delay for whatever frames and set the delay of the bullet to whatever as well. What I want to do is remove the delay parameter from bullets completely. This will mean that when you spawn a bullet, it is immediately effective and immediately begins moving without a delay. To achieve the same result as the above code, you have to do this instead:
CreateStbDelay(GetX, GetY, YELLOW, 10);  //Delay effect lasting 10 frames.
Wait(10); //Wait 10 frames.
ObjStbShot_Initialize(GetX, GetY, 3, GetAngleToPlayer, YELLOW01, 30, 8, YELLOW); //Shot immediately when called.


The reason this will increase performance is because the current code loops through the whole StbShots array every frame to manage delay. If I can get rid of it, then the code would only need to loop through the array once whenever the game speed changes (i.e. when you zoom or take a picture).

EDIT: The performance test results from implementing this on my computer...
Before: 400 bullets = ~50fps
After: 2100 bullets = ~56fps

No matter what anyone says, I'm keeping it like this.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Garlyle on April 12, 2010, 06:54:19 AM
Actually... I rather like that.  It also means we can play around with delay effects to pretty stuff up, too.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 12, 2010, 07:27:10 AM
You know what, there's a bad thing about that and I have to rethink this. Delayed bullets should be able to be deleted even during delay so this isn't going to work...

As for playing with delay effects, you already could do that.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Nobu on April 12, 2010, 07:47:20 AM
Apologies if this is old or anything, but have you seen this (http://www.nicovideo.jp/watch/sm10153457) StB DMF clone yet Blargel?
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 12, 2010, 08:12:19 AM
Apologies if this is old or anything, but have you seen this (http://www.nicovideo.jp/watch/sm10153457) StB DMF clone yet Blargel?

I've seen a little and I think that whoever made that is pretty darn good. However, he (or they) is missing a few things like the pausing during picture taking, the leaf placeholder thingies on the side, and a good menu. In fact, he's using the white Aya character that I believe many other people have already. White Aya is an amazing piece of code (there's some stuff I haven't been able to figure out just by thinking about it and I'm too lazy to look through the code), but doesn't have everything in it.

In short, I'm aiming higher.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 22, 2010, 05:53:09 PM
Bumpity bump.

Hi have a really hard stage with controls that are hard to get used to (http://bulletforge.org/u/blargel/p/youmu-vs-utsuho/v/11). Now excuse me while I get back to StB engine making again after slacking off for two weeks.

EDIT: Fixed hitbox for the sun bullets.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Naut on April 22, 2010, 09:39:28 PM
....Aaaaand a video (http://www.youtube.com/watch?v=dCLjf63n160&fmt=22) of said script.

Please don't drop this, it's fucking cool.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Azure Lazuline on April 22, 2010, 09:56:41 PM
Awesome script so far. Well, awesome concept at least (a lot of the details need a LOT of tweaking in the actual danmaku. I'd give more details, but I think the engine was the main point rather than the boss, so I'll let it slide). Great work, and thank you for finally making me not feel like the only person that likes Meltdown - though I didn't know there was an instrumental version!

Naut: I was actually planning to do something similar to this when I finish my other DMF project (which might be a while), so if Blargey doesn't go through with this, then you just have to wait a bit longer. (I'll probably do it in Musuu if that's out by then, though.)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 22, 2010, 10:21:31 PM
....Aaaaand a video (http://www.youtube.com/watch?v=dCLjf63n160&fmt=22) of said script.

Please don't drop this, it's fucking cool.

It's on hold until StB engine is workable for a whole game. Because I like this idea better though, Ikareimu will likely be dropped... or put on a indefinitely long hold. I'm not even sure what I'm going to do with my ExSatori script I was doing before either...  ???

Awesome script so far. Well, awesome concept at least (a lot of the details need a LOT of tweaking in the actual danmaku. I'd give more details, but I think the engine was the main point rather than the boss, so I'll let it slide). Great work, and thank you for finally making me not feel like the only person that likes Meltdown - though I didn't know there was an instrumental version!
If you thought the danmaku needed tweaking, you should've seen what I had when I was just starting the stage design. I thought everything was relatively balanced for a Lunautic difficulty script when I released it since I was able to beat everything without dying, though not all in one run. Also, that's not just an instrumental version of Meltdown, it's a ZUNified version. :V
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Kylesky on April 23, 2010, 02:47:08 AM
Oh god that's freaking awesome... (flashbacks on my rpg crap also :V)

Well... it seems to me like the bullets reappear at the opposite side when they leave the screen, right?

also... I like you're idea for spawning enemies a lot more than mine... instead of just spawning them at certain points on the map, you spawned them in waves depending on the player's position... a lot easier in terms of coding positions... and it actually looks cooler...

I suck :ohdear:

EDIT: This made me consider highly reconstructing my code... if it's alright with you, can I copy your way of spawning enemies? (ugh... I'll have to recreate the stage setup also.. at least I've only done a few things so far :V)
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Solais on April 23, 2010, 10:13:42 AM
....You never cease to amaze me, mon.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on April 23, 2010, 10:28:42 AM
Oh god that's freaking awesome... (flashbacks on my rpg crap also :V)

Well... it seems to me like the bullets reappear at the opposite side when they leave the screen, right?

also... I like you're idea for spawning enemies a lot more than mine... instead of just spawning them at certain points on the map, you spawned them in waves depending on the player's position... a lot easier in terms of coding positions... and it actually looks cooler...

I suck :ohdear:

EDIT: This made me consider highly reconstructing my code... if it's alright with you, can I copy your way of spawning enemies? (ugh... I'll have to recreate the stage setup also.. at least I've only done a few things so far :V)
You don't suck, lol. But if you feel like it, take whatever little ideas you want. If you want code, look for it yourself, my thing is neatly organized like a labyrinth with no comments to be found anywhere. There's duplicate code too because of the way I organized normal enemies and bosses and because I rushed like hell when it was nearing completion. :V

....You never cease to amaze me, mon.
:3
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Kylesky on April 23, 2010, 10:52:12 AM
You don't suck, lol. But if you feel like it, take whatever little ideas you want. If you want code, look for it yourself, my thing is neatly organized like a labyrinth with no comments to be found anywhere. There's duplicate code too because of the way I organized normal enemies and bosses and because I rushed like hell when it was nearing completion. :V

lol, thanks... and my code's are also usually labyrinths with no comments :V I can probably still understand your code (at least... by a little bit)

Now that I'm getting error after error in my parsee script (don't ask why :V), I feel like rage quitting on this script and remake her from scratch...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Kylesky on May 02, 2010, 12:42:25 AM
Sorry for double post, but you probably wouldn't notice this if it didn't magically go back to the top :V

Ok, first I'm sorry for leaving that piece of crap on IRC last night, please disregard it... it was completely wrong and messed up, but I thought of the solution to the Collision problem already... It's pretty long and my current computer time is extremely limited so I may not be able to type everything down, and I'm not sure when I'll get back on... I don't care if you solved it already :V I just wanna post this somewhere...

This is unprecedented non-serious affair. Guy is preparing. Please wait warmly.

EDIT: God that a a fucking lot... I might've missed something though :V

Code: [Select]
//I probably could've shortened this a lot and removed some parts, but it's easier to understand like this

function Collision_Line_Line(x1, y1, x2, y2, x3, y3, x4, y4) //Gets whether 2 widthless segments intersect, actually there's an easier way, but this is easier to understand
{
    let lineangle=atan2(y4-y3, x4-x3);
    let slope=(y2-y1)/(x2-x1);
    if(x2-x1==0){slope=NULL;} //to prevent x/0
    let slopeb=(y4-y3)/(x4-x3);
    if(x4-x3==0){slopeb=NULL;} //to prevent x/0
    if(slopeb==NULL){ //if lineb is vertical
        if( (x1<=x3 && x2>=x3)||(x1>=x3 && x2<=x3) ){return true;}else{return false;} //if linea's 2 points lie on opposite sides of lineb, true, else, false
    }else if(slopeb==0){ //if lineb is horizontal
        if( (y1<=y3 && y2>=y3)||(y1>=y3 && y2<=y3) ){return true;}else{return false;} //if linea's 2 points lie on opposite sides of lineb, true, else, false
    }else{
    let x5=x1+absolute(x1-x3)*cos(lineangle); //fails at getting the x coordinate of the point where the y's are equal, but you get the idea
    let y5=y1+absolute(y1-y3)*sin(lineangle); //fails at getting the y coordinate of the point where the x's are equal, but you get the idea
    let x6=x2+absolute(x2-x3)*cos(lineangle); //fails at getting the x coordinate of the point where the y's are equal, but you get the idea
    let y6=y2+absolute(y2-y3)*sin(lineangle); //fails at getting the y coordinate of the point where the x's are equal, but you get the idea
        if(slopeb>0){ //if lineb y decreases as x increases
            if(slope==NULL){
            if( (x1<=x5 && x2>=x6)|| (x1>=x5 && x2<=x6) ){return true;}else{return false;} //opposite sides again
            }else{
                if( x1<x5 && y1<y5 ){ //if point1 is to the left-up of lineb
                    if( x2>x6 && y2>y6 ){return true;}else{return false;} //if point2 is to the right-down of line b, true, else, false
                }else if( x1>x5 && y1>y5 ){ //opposite of previous statement (for angle+180 instances)
                    if( x2<x6 && y2<y6 ){return true;}else{return false;}
                }else if( (x1==x5 && y1==y5) || (x2==x6 && y2==y6) ){return true;}else{return false;} //if point1/2 is collinear with lineb true, else, false
            }
        }
        if(slopeb<0){ //opposite of the entire slopeb>0 if statement
            if(slope==NULL){
            if( (x1<=x5 && x2>=x6)|| (x1>=x5 && x2<=x6) ){return true;}else{return false;} //opposite sides again
            }else{
                if( x1>x5 && y1<y5 ){ //if point1 is to the left-up of lineb
                    if( x2<x6 && y2>y6 ){return true;}else{return false;} //if point2 is to the right-down of line b, true, else, false
                }else if( x1<x5 && y1>y5 ){ //opposite of previous statement (for angle+180 instances)
                    if( x2>x6 && y2<y6 ){return true;}else{return false;}
                }else if( (x1==x5 && y1==y5) || (x2==x6 && y2==y6) ){return true;}else{return false;} //if point1/2 is collinear with lineb true, else, false
            }
        }
    }
} //actually... this is already the line to line function you're looking for :V I just want to continue

function Collision_Box_Line(centx, centy, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6) //Gets whether any segment from the center of the box to any corner intersects the line. (if at least one does then the box intersects the line obviously) Admittedly, this could be faster done by just checking the opposite corners, but this method is easier to understand
{ //you need to center cause I'm too lazy to calculate for it :V
    let returnval=0; //it's easier than an if statement with 3 ||'s right?
    if(Collision_Line_Line(centx, centy, x1, y1, x5, y5, x6, y6)==true){returnval++;}
    if(Collision_Line_Line(centx, centy, x2, y2, x5, y5, x6, y6)==true){returnval++;}
    if(Collision_Line_Line(centx, centy, x3, y3, x5, y5, x6, y6)==true){returnval++;}
    if(Collision_Line_Line(centx, centy, x4, y4, x5, y5, x6, y6)==true){returnval++;}
    if(returnval>=1){return true;}else{return false;}
} //notice that this statement can easily be used for a polygon with any number of sides by changing the number of parameters

function PointSideFromLine(x1, y1, x2, y2, x3, y3) //Gets whether a point is on the left or the right of a line
{
    let lineangle=atan2(y3-y2, x3-x2);
    let x4=x1+absolute(x1-x2)*cos(lineangle); //fails at getting the x coordinate of the point where the y's are equal, but you get the idea
    let y4=y1+absolute(y1-y2)*sin(lineangle); //fails at getting the y coordinate of the point where the x's are equal, but you get the idea
    if(x1<=x4){return "LEFT";}else{return "RIGHT";}
} //note that I could've just called this multiple times for the first statement, but it's easier to understand like that (at least, for me it is)

function Collision_Box_Laser(centx, centy, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, width) //god... 15 parameters
{
    if(PointSideFromLine(centx, centy, x5, y5, x6, y6)=="LEFT"){
        if(Collision_Box_Line(centx, centy, x1, y1, x2, y2, x3, y3, x4, y4, x5-width/2, y5-width/2, x6-width/2, y6-width/2)==true){return true;}else{return false;}
        //uses the leftmost line of the laser
    }else{
        if(Collision_Box_Line(centx, centy, x1, y1, x2, y2, x3, y3, x4, y4, x5+width/2, y5+width/2, x6+width/2, y6+width/2)==true){return true;}else{return false;}
        //uses the rightmost line of the laser
    }
}

Collision_Box_Laser... the computation for the x's and y's may be a bit off, but you can use your super math to get those :V, but you get the idea I'm trying to show right?

and now I have to leave until god knows when...
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Blargel on May 02, 2010, 04:17:48 AM
Arrrrrrrrrgh, stop making my head hurt! :colonveeplusalpha:

Your code is still incorrect I believe. Just because the two points of one line segment are on opposite ends of the other line segments doesn't mean they intersect because they're line segments. For example, a situation like this:

                      |
-----------           |
                      |
                      |
                      |
                      |


The two points on the vertical line are above and below the horizontal line, but the segments obviously don't intersect. Of course, maybe I didn't read your code carefully enough since I only read the comments and glimpsed the code a little (it's hard to read on the forum and I was too lazy to copy it to Notepad++) and maybe you did catch that. Your Collision_Box_Laser is similar to how I was planning to do the collision detection eventually, but there are a lot of other issues I need to work out later as well. Anyways, like I said on IRC, I already generally know how I'm going to solve this problem and the line to line collision detection is probably gonna be handled differently than how you have it. More math, less if-else construction.
Title: Re: Blargel's Danmakufu Corner (StB/DS Engine)
Post by: Kylesky on May 02, 2010, 03:09:07 PM
Your code is still incorrect I believe.

yeah... I noticed that after I left... :V

here's a very much simplified version of that block of code
Code: [Select]
function PointSideFromLine(x1, y1, x2, y2, x3, y3)
{
    let lineangle=atan2(y3-y2, x3-x2);
    let slope=(y3-y2)/(x3-x2);
    let x4=(y2-y1)/slope+x1; //hope this makes sense... tried morphing y=mx+b into x=(y-b)/m
    if(x1<=x4 || x3-x2==0){return "LEFT";}else{return "RIGHT";}
}

function Collision_Segment_Line(x1, y1, x2, y2, x3, y3, x4, y4)
{
    if(PointSideFromLine(x1, y1, x3, y3, x4, y4)=="LEFT"){
        if(PointSideFromLine(x2, y2, x3, y3, x4, y4)=="RIGHT"){return true;}else{return false;}
    }else{
        if(PointSideFromLine(x2, y2, x3, y3, x4, y4)=="LEFT"){return true;}else{return false;}
    }
}

function Collision_Segment_Segment(x1, y1, x2, y2, x3, y3, x4, y4) //either do this, or find a way to make a GetPOI function (point of intersection) and use Collision_Line_Circle to check if it's on both segments... these 2 things both make sure that it checks segment to segment and not segment to line
{
    if(Collision_Segment_Line(x1, y1, x2, y2, x3, y3, x4, y4)==true && Collision_Segment_Line(x3, y3, x4, y4, x1, y1, x2, y2)==true)
    {
    return true;
    }else{
    return false;
    }
}

function Collision_Box_Line(x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6)
{
    if(Collision_Segment_Segment(x1, y1, x3, y3, x5, y5, x6, y6)==true || Collision_Segment_Segment(x2, y2, x4, y4, x5, y5, x6, y6)==true)
    {
    return true;
    }else{
    return false;
    }
}

function Collision_Box_Laser(centx, centy, x1, y1, x2, y2, x3, y3, x4, y4, x5, y5, x6, y6, width)
{
    if(PointSideFromLine(centx, centy, x5, y5, x6, y6)=="LEFT"){
        if(Collision_Box_Line(x1, y1, x2, y2, x3, y3, x4, y4, x5-width/2, y5-width/2, x6-width/2, y6-width/2)==true){return true;}else{return false;}
    }else{
        if(Collision_Box_Line(x1, y1, x2, y2, x3, y3, x4, y4, x5+width/2, y5+width/2, x6+width/2, y6+width/2)==true){return true;}else{return false;}
    }
}

most comments are gone :V (by the way... this also works for curvy lasers :V the only problem is measuring the length to cut the laser, and I doubt if you're gonna even bother doing that)

Also, the reason why I'm trying to perfect this function/s is cause I'm also gonna use them... (in the future)
Title: Re: Blargel's Danmakufu Corner (Ikareimu Revival? and Contest)
Post by: Blargel on December 19, 2012, 02:53:36 AM
Ikareimu Fucking What Contest (https://plus.google.com/100962668451278486077/posts/Aa1MdtWPSf6)
My goal for this is really just to get exposure so I might be able to get a spriter and/or composer to help me with this and future games.