0 Members and 1 Guest are viewing this topic.
Moreover, I think that it will become even slower with enemies and all, so moving by 2 pixels at once may be better
[TOPLEFT]+[TOPRIGHT]+[BOTTOMLEFT]+[BOTTOMRIGHT]/4 -> A //average of corner values[WIDTH]/2 //half the width will be our max/min displacement value (can be whatever)*2 -> I //convert to positive range, save to Irand^I //generate random displacement based on upper bound (I)-(I/2) //convert to actual +/- range by subtracting half of the positive range+A //add to the average of the rectangle corners-> M //and that's the new midpoint valueM >> 255 ? 255 -> M //keep it between 0 and 255M << 0 ? 0 -> MMReturn
@kindermoumoute, how's the menu systems coming along?
:#Axiom(MEMKIT):::.MAIN:If ALPHA::If WORKBENCH:CRAFT(1):ElseIf FURNACE:CRAFT(2):ElseIf OVEN:CRAFT(3):ElseIf ANVIL:CRAFT(4):Else:CRAFT(0):End::End......:Lbl CRAFT:.MAKELIST5(r1)::.Display "CRAFTING" & BOX:If r1:.Display "HAVE" & BOX, "COST" & BOX:Else:.Display "INVENTORY" instead of "CRAFTING":If CHEST:.Shift "INVENTORY" & BOX to the right, and Display "CHEST" & BOX to the left:End:End::Repeat ALPHA:.Display LIST5 (& CHEST data when needed):End:Return::Lbl MAKELIST5:0→I:!If r1:.Eg to make INVENTORY LIST:For(r6,0,52):If {r6*2+PointerOfItemData}:→{I*2+L5}:.If there is quantity of the current item:{r6*2+1+PointerOfItemData}→{I*2+1+L5}:I++:End:End:0→{I*2+L5}:Else ...etc:...etc:End:Return
Code: [Select]:.MAIN:If ALPHA::If WORKBENCH:CRAFT(1):ElseIf FURNACE:CRAFT(2):ElseIf OVEN:CRAFT(3):ElseIf ANVIL:CRAFT(4):Else:CRAFT(0):End::End...
:.MAIN:If ALPHA::If WORKBENCH:CRAFT(1):ElseIf FURNACE:CRAFT(2):ElseIf OVEN:CRAFT(3):ElseIf ANVIL:CRAFT(4):Else:CRAFT(0):End::End...