Tutorial The Good, The Bad, and The BJ

Defi4nc3

Developer of DORPG
Reaction score
20
It is a good tutorial in some ways...

More or less it looks like hes basically trying to explain what BJ's are to Jass noobs or people who just don't understand what they are...

But I believe the reason he has to explain this is cause everyone freaks the fuck out when they see a BJ call or hear about it...

He is right, I mean BJ's aren't as bad as they seem, if used massively yes you can eventually start to see the difference in performance... and the fact you can avoid most BJ calls renders them useless in a lot of ways...

The top coders will sometimes even use shortcuts to get their methods done, and most JASS fans here have learned from tutorials saying "AVOID BJ'S AT ALL COST", so basically 90% of the JASS community is programmed in the head not to think outside the box and they would rather flip the fuck out when they see anything that can run a trigger for 0.0001 seconds longer...

All in all this tutorial really just promotes sloppy coding, but non the less its good clarification.
 

Sim

Forum Administrator
Staff member
Reaction score
534
Your polarprojection example is not quite the right example there.

There are other BJ functions which are far more useful. :)

> If you're not sure, use the Native form. It's almost always going to be better.

Well, IMO there are some BJs which mainly exist for safety. I don't have an example right there but in the function's code there are some argument checks to see if they are valid, and only then call the native function. So, I would think the opposite actually.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
Just quickly and the first thing I found that's better (Easier) as a BJ would be something like:
Code:
Cinematic - Apply a filter over 2.00 seconds using Normal blending on texture White Mask, starting with color (100.00%, 100.00%, 100.00%) and 100.00% transparency and ending with color (0.00%, 0.00%, 0.00%) and 0.00% transparency
In JASS BJ:
JASS:
call CinematicFilterGenericBJ( 2, BLEND_MODE_BLEND, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 100, 100, 100, 100, 0, 0, 0, 0 )

In JASS native:


Again, that's probably not a good example but just shows that some BJ's are better to use for readability and not making your code an extra 9 lines longer.

EDIT: Longer then 9 lines actually...
There's another BJ in the native:

And it's native is:
JASS:
function AbortCinematicFadeBJ takes nothing returns nothing
    if (bj_cineFadeContinueTimer != null) then
        call DestroyTimer(bj_cineFadeContinueTimer)
    endif

    if (bj_cineFadeFinishTimer != null) then
        call DestroyTimer(bj_cineFadeFinishTimer)
    endif
endfunction
 

Sevion

The DIY Ninja
Reaction score
413
Update-Bump!

Changed some things!

I'm blind when it comes to my own work (at least to the badstuffzzz)

So find meh mistakes!!!! :D
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top