Randomizer Tutorial

Talk about anything Fraxy-related here. If you need help with Fraxy or the forums, you can ask here.
Post Reply
User avatar
Firefox11
Excelling Fraxian
Excelling Fraxian
Posts: 137
Joined: Tue Jan 19, 2010 11:27 am
Epicness: Lacks epicness.

Randomizer Tutorial

Post by Firefox11 »

Randomizer Tutorial
This tutorial will try to help understand how the Randomizers I've been using since Fulgur Aquila/Silicis Macropus work. In order to make the most out of this Randomizer system, it's advised that you have knowledge on how Variables work in Fraxy. It's also recommended that you tend to build boss attacks in separate Rolling Panels or other parts that trigger multiple parts by themselves, instead of having to trigger each part 'manually'. Note that this system is not completely random (it uses the player's position to determine the attacks), but it's highly unlikely that the player will do the same movements during all the runs.

To start off, you have to think of how many attacks do you want your boss to have. Pair number work better, specially if over 4 attacks, due to the fact that there are only four Variables in Fraxy (Making unpair number of attacks is still possible, but you would probably have to make it so an attack has actually higher 'chance' to trigger than others). If you want 4 or less attacks you will be golden with the same number of searchlights; any higher and you will have to 'split' the attacks into 'First Run', 'Second Run' and successives. That is to say:

I want to make four attacks, all in the same movepool!
- Then you will need four searchlights.
I want to make four attacks, split in two movepools!
- Then you will need two searchlights and use two variable values.
I want to make twelve attacks!
- Then you will need four searchlights and use three variable values.
It's actually easier than I'm making it look like.

Building!
Note: This guide will help you build a randomizer with 8 attacks. If you can understand this one, you should be able to make randomizers for fewer/higher number of attacks.
Your randomizer should look like this or similar:
Image
The parts in that picture are:
- Randomizer Lights: Rolling Panel M. This will make the lights 'spin', causing the variable changes.
- ATK Detect1/4: SearchLights. These will detect the player and add their corresponding variable to...
- Randomizer: ...this Block. At the same time, this block will change the Variable 1 value of the next parts depending on its own Variable 1~4 values.
- Hidden/Exposed ATK: Rolling Panels S. These are the ones that actually trigger the attacks on the boss depending on their Variable 1/2 values. Don't mind their names, it's just that I copied Umbra Lynx's Randomizer into a new file for the tutorial =p

Events!
- Randomizer Lights: In the example, it has events that set its speed depending on the move action. For more 'complex' randomizing, you can add other events that alter the speed (for instance, +1 to E.Param2 for every frame the player is shooting, +2 if the player is shooting, 0 speed if the player dies).

- ATK Detect1/4:
They have the E.Param event and the Detect event. Said event adds 1 to [Randomizer] to one variable, depending on what Search Light you are on. (ATK Detect1 adds 1 to variable 1, ATK Detect2 adds 1 to variable 2, etc.)

- Randomizer:
The Randomizer permanently makes a variable comparision from the input received by the ATK Detect searchlights and changes the ATK Panels' variable 1 accordingly. The 'Startup Stop' event is one I forgot to delete; it was there to prevent any attacks from triggering before the boss' startup animation was completed (by stopping the ATK Panels' Move Action on startup).

- ATK Panel 1:
ATK Panel 1 has 7 events in total.
These events are the ones that trigger the corresponding attacks by playing the ATK1~4 move actions (or Movement, depending on how you stopped them). Variable 1 is the value given by the Randomizer to both ATK Panel 1 and 2, which determines the attack in the movepool that will be played; Variable 2 lets the system 'know' which Movepool you want to use. Finally, the Move Frame condition makes it so the system won't be playing attacks at inappropiate times. The events also add 1 to its own Variable 4 value; this is explained with the next picture:
This is where Variable 4 comes into play. The first and third events shown trigger when an attack has been triggered (since that changes Variable4=1). 'Variable Reset' changes the Randomizers variables so it will start tracking the player position anew once an attack starts. 'Attack Reset' stops both ATK Panel 1 and 2, sets their Move Frame to 0 and resets the 'Attack used' variable, Variable4=0, preventing more than one attacks to be triggered at once. 'No-ATK/Reset', on the other hand, makes both panels enter a loop in case Variable4=0 at Move Frame=15; this happens when the Randomizer can't determine which variable to set the panels to, which at the same time is caused by two or more variables having the same value (caused by either luck or the player having been dead a whole attack cycle). This was more useful on Silicis Macropus and Fulgur Aquila, since their Randomizer variable values were reset at the end of each attack instead of at the start, making it more common for the player to be dead when the next attack is determined.

- ATK Panel 2:
Same style of events as ATK Panel 1, but with Variable2=1 and setting ATK Panel 1's Variable4=1.

Up to this point are the actual randomizer parts. You can copy them to a different file and, setting the events accordingly, should work properly.
Image
EXAMPLE .FED: http://acmlm.kafuka.org/uploader/get.php?id=3581" onclick="window.open(this.href);return false;
Extras included in the .fed:
- Functioning 'enemy': Shooting the Big Core will start up the system.

- Attack Pattern timers: Labeled from 1 to 8, each one of them is triggered by different Search Lights. From what the picture shows, Attack 1 (Bullet-Small) and 5 (Bullet-Twin) are triggered by the red search light (ATK Detect 1); Attack 2 (Needle Gun) and 6 (Power Ball) are triggered by the green search light (ATK Detect 2); Attack 3 (Homing Laser) and 7 (Missiles) are triggered by the blue search light (ATK Detect 3); Attack 4 (Energy Egg) and 8 (Vulcan Twin) are triggered by the yellow search light (ATK Detect 4). Each attack will run for 295 frames, then stop and play a different one.

- Example on movepool changes: Attacks will change movepools in a 1=>2=>1 loop. This is accomplished by editing an event: ATK Panel 1 => Attack Reset => Add final action: Variable Addition [Self; Include child parts] Variable2 +1 [Don't delete after execution]; and adding an extra event to the same part:
Code:

Code: Select all

Movepool Reset:
Condition:
- Variable2=2
Action:
- Variable Substitution [Self, Include child parts] Variable2 =0
[x]Don't delete after execution
The first one will make it so the movepools will change after each attack trigger, the second one will prevent the movepool variable from going over 1.

- IMPORTANT EVENT Attack stop/restart: On each ATK # timer there are two events; the attack start event and the attack stop event. It is VERY important that the attack stop event starts up again the ATK Panel #s.

Miscellaneous information/Theorycrafting
- This setup (Search Lights on a Rolling Panel) is the most 'random' way I could think of, specially if you add in events on the rolling panel that change its rotation speed depending on the player actions. However, you could set up it differently: for instance, Silicis Macropus and Fulgur Aquila had it set by distance, instead of 'randomly'. They have three static searchlights covering the whole field, and standing in each section will trigger different attacks from both movepool 1 (normal attacks) and movepool 2 (special attacks). A different way to make it random, but with more parts, would involve a move joint with the rolling panel on it, so the move joint would move across the field.

- In case you want a boss with significantly harder attacks every now and then, it's advised to use a system similar to what I used on Fulgur Aquila and Silicis Macropus, which makes them play their 'normal' attacks before using one of the 'special', then return back to a 'normal' cycle before a new 'special'. Remember that this setup leaves free Variable3, which could be used in conjunction with the regular 1=>2=>1 movepool loop to trigger complex sequences: (Consider 1 and 2 being regular attacks, 3 and 4 being specials) 1=>2=>1=>3=>2=>1=>2=>4=>loop

- This example *DOES NOT* include an anti-repeat event. That is to say, you could fight the boss during 10 attack cycles and only see two attacks. To solve that, you'd have to add a new action on each ATK # panel that added 1 to one of its own variables upon Stop/Resetting the attack, then add a new event before the actual start of the attack (in the provided .fed, Move Frame =1~4) that stops and resets the ATK # panel, resets the anti-repeat variable to 0 AND plays the next ATK # panel.

- Be wary of what bosses do you implement this system on. Imagine playing your favourite Shmup (HellSinker, Reflex, Sither Kain, Touhou, you name it) and suddenly memorizing the patterns becomes less useful because the bosses can jump from one to another randomly. What I'm trying to say is, if your boss is HARD and has no 'attack startup' animation, it might be wise to NOT use this, since it might bring frustration. You can see a slight example in Lumina Lupus: some of the attacks are tricky or require some positioning to lure the shots; this is why I added a small animation (30~40 frames, around 1 second at full FPS), different for each attack, to show the player which attack will be next. And even then sometimes you don't have time to react! Now imagine this against a Glowing Ball of Death (TM) that spews high speed projectiles with no warning whatsoever, and you don't know when it'll do that.

Well, I do think that is all. Hope I was clear enough, and happy randomizing!

User avatar
AlexMdle
Administrator
Administrator
Posts: 1189
Joined: Mon Jan 18, 2010 8:36 pm
Epicness: micro skills

Re: Randomizer Tutorial

Post by AlexMdle »

Actually, recently I have developed a randomizer system that works with (wait for it!!!) ONE SINGLE PART.

How does this wonder work? Alex will tell you if you really need.

http://acmlm.kafuka.org/uploader/get.php?id=3590" onclick="window.open(this.href);return false;
Now under new management.

Post Reply
Users browsing this forum: No registered users and 39 guests