wtf why is this on page 3
HUEGPOST CAUTION CAUTION (Text written in green is for everyone)
Enemy-related functions discussing with programmerz tiem
The library I originally planned out actually isn't as big as I had thought, we've done most of the specifics and the rest is just a bunch of general things to do. So next come the enemy-related parts. Of course being a full game I would think that stage enemies need to be a bit more defined than "okay lets just have things shoot bullets", even though that's all they do. Naming from the list I made (which were written in no particular order), there's
-More versatile enemy spawning functions (pretty much adding arguments to the regular one)
-An exploding enemy function
-Have variables for different enemies and their colors (power/points = red/blue etc), and reference those for drawing enemy animations instead of having all the drawloops inside the script and clogging the attacks/spells up.
-Use one of these names for each enemy scripts and (using alternative) write different behaviours instead of making like fifty thousand enemy scripts
-MoveEx functions for enemies, bosses, options and whatever needs to move in a complex manner
-Animation functions such as if(EnemyMovingLeft==true){
-Create 'familiar' functions (draw on point, positions are referencable)
To begin with, making the enemy scripts themselves. As there are only Power and Points dropped by a specific enemy, technically we only need two colors of fairies. Although that's pretty boring and there could be another enemy type that drops both power and points, and maybe one that drops extra IE, just to have some color variation.
For all the basic enemies in the game, I suggest referencing them by simple variabled names instead of having fifty different scripts for all the enemies; if only each enemy type has it's own script, it makes each script fairly huge, but more organized and easy to scroll through if you're looking for a certain behaviour. SMALL_RED and LARGE_BLUE, etc. These would be used for spawning and drawing.
For drawing, you would just put [DrawFairy;] in the DrawLoop and ask what kind of fairy it is in the one function using alternatives, and set GraphicRects accordingly. That gets rid of a huge amount of space right there.
For spawning, it would be more of something like [SpawnFairy(SMALL_BLUE,4,2,5);] with type, stage number, bullet behaviour and movement. To eliminate the need to explain the movement in each script, upon initialize we call upon a separate encompassing "enemy movement" script that moves the enemy, but in an entirely different thread/script so that the bullet behaviour and movement behaviour aren't linked whatsoever and it's easy to go through each one. To eliminate the need to have multiple scripts for each bullet behaviour as well, another alternative function is called asking the current stage and pattern, then a main task runs based on that.
For example, in the stage script you have a variable like [current_stage] for the stage number, and one like [enemy_move] that would increment after every enemy spawns to number each enemy that appears in a line. Then, you would have [SpawnFairy(SMALL_BLUE,current_stage,2,enemy_move);] or whatever.
SMALL_BLUE would be "ijiyatsu/script_enm/small_blue.txt", current_stage would be 4, 2 indicates bullet behaviour and enemy_move is 5. It calls the SpawnFairy function, which asks what script to create. It creates the SMALL_BLUE script, then finds the movement sorting function. It picks movement by the number of the enemy in the enemy_move line, and moves the enemy. Next, the behaviour sorting function. The behaviour gets picked and the equivalent main task is run. Anything that's in the main task is what seperates one enemy from another, and the MainLoop, Finalize and whatever contain the same functions for each enemy type. Next, it hits the DrawLoop and finds the GraphicRect sorting function and picks the right one, and draws the enemy.
If any enemies spawn familiars or something (not sure if we're going to add familiars for basic enemies, there's not much reason to if you can just make more enemies...) then you can create another enemy with a FAMILIAR enemy type, and the chain goes on.
Animation functions like [if(EnemyMovingLeft==true)] is useless and you can just use GetSpeed, sorry. As well, MoveEx can just be made seperately and it should be pretty obvious how they're done.