Author Topic: Team Player System for Danmakufu  (Read 1732 times)

gtbot

  • Master of ScreenSplit
Team Player System for Danmakufu
« on: May 17, 2015, 06:18:34 PM »
Hello~

I've developed a team player template/library/system, in which you may create a player script, and then combine them with any other amount of player scripts into a single player script, and my system will swap between the players in any way you see fit. Logic exists for flash bombs and last words, as well. The major drawback for this system is that the player script has to specifically be made to work with this system, so existing scripts cannot work with it, nor can they work on their own (making a "team" of just 1 player is possible though).

The main 'player' is the MasterFile.txt file, which deals with turning on and off the other players as needed, as well as drawing the hitbox graphic.

A player consists of 6 major tasks, which all deal with a specific element to the player: DrawPlayer, PlayerShot, PlayerFlashBomb, PlayerBomb, PlayerDeath, PlayerOption

After you've made your player scripts, all you simply do is add them to the Initialize:
Code: [Select]
@Initialize{
AddPlayerScriptA1(current~"Reisen/", "ReisenA.txt");
AddPlayerScriptA1(current~"Reimu/", "ReimuA.txt");
AddPlayerScriptA1(current~"Marisa/", "MarisaA.txt");
...}
Their order within the team is determined by the order of how you added them.

ShotData and sound files are handled differently. Instead of putting in an shot ID, you put in a constant name for it, and you refer to the bullet by using the constant.
Code: [Select]
ShotData{
REIMU_A_SHOT_1
rect = (0,0,16,16)
...
}

Sound files are added to any of the Sounds/ folders. The MasterFile will pull from the sub player's /Sounds/ or from its own Sounds/ folder. You then use the function PlaySoundA1("name") to play the sound, with "name" being the filename of the sound minus the file extension (so , if the file is se_shot.wav, you would use PlaySoundA1("se_shot")).

In order to generate the shot data files (and also generate a task to load the sounds into the script), it is required that you set the GenerateData variable, found at the top of MasterFile.txt, to true, and then run the player.  You will get a window popup that the generation was completed, if it was sucessful. You then set GenerateData back to false. This must be done anytime you add new players to or remove players from the team. It also must be done if you added new sound files or updated the shot data of any of the players.


I'd be interested in knowing if anyone would possibly use this system..? I can make a more indepth tutorial if that's the case.

You can download a Reisen/Reimu example here: http://www.bulletforge.org/u/gtbot/p/reisenreimu-player/

Any feedback from using the Reisen/Reimu player, or just any thoughts about this, I'd appreciate :)

Trickysticks

  • What am I? TRICKYSTEAKS I AM!
  • A stick of the tricky variety.
Re: Team Player System for Danmakufu
« Reply #1 on: May 21, 2015, 09:57:09 PM »
This seems promising. I haven't made a player before, but I've used your systems in the past and they work wonderfully. A tutorial would be appreciated  :)
Interested in playing some boss fights I made? Have Danmakufu? Then check out my Danmakufu creations!