on the calculator, what are the odd buttons to the side such as sin co sin and all the others used for? ive never really messed with them, mainly cause i dont know what they do..... and what does spreading alterable values do? still confused on that one too...
[Game design makes my brain feel like its gonna explode.]
Sin, Cos, and Tan are trigonometry expressions used to find angles and such. Vital to making any kind of decent 360' static engine.
If your profile age is accurate, you should've or should be in the process of learning this kind of stuff in Highschool.
Spreading an alterable value, at least how I've used it, allows you to give a unique to each instance of an object, with an index value of whatever you place in.
So for example, if you give a spread value of 1 to "Active 1"'s Value A, and there are 5 instances of that object, then instance one will have a value of 1, instance two will have a value of two, three will have 3, and so on. It's a good way to tag objects with an unique ID number. Another pretty important thing to know when creating a static engine, particularly for enemies with multiple sensors and you need to attach each sensor to the corresponding enemy, or creating name tags for people in an online game, so that you get the right name to the right object player.
When you do use spread values, you must always keep in mind that when comparing the assigned value of an object, the order of conditions matter. E.g., if the comparison of the ID is before another condition rather than after it, it may not work correctly.
Unfortunately, I can't remember for sure whether it needs to be first. I think so, but don't quote me.
Originally Posted by siven on the calculator, what are the odd buttons to the side such as sin co sin and all the others used for?
Mod (modulus operator)
"Divides the value of one expression by the value of another, and returns the remainder."
For example:
123 mod 10
123/10=12.3
then it takes out the integer and multiply the remaining decimal value by the second input.
0.3*10=3
So 123 mod 10=3
68 mod 8=4
64 mod 8=0
123515617 mod 1=0
It's really practical when you work with a grid.
Val & Str$
Used to convert a a string to a value or the opposite.
When you use them:
If you use an edit box or any object that return string data, but want to use it to get a numerical value.
Val( Edittext$( "Edit Box" ) )
Letters and ponctuation return zero.
Or if you have a value that is over the maximum 4,294,967,295, you might want to store it to a sting
Str$( 4,294,967,295 )
Bitwise operators are used under the hood for binary math and processing, but can also be used in programming to save memory. I think generally they are used in arrays and tables to sort data, and also I think in photo editing. (Matrix manipulation, so pretty much an array. ) Oh, also in RAID arrays for data preservation.
Geez guys, are you trying to scare him away from kliking? ... hehehe. Hey Siven, if you want to see a really scary wicked crazy kewl useful spread value example, then check out my 2.5d project page. (look 2 over from the "downloads" link at the top of page to go to the projects listing, then klik on my 2.5d project)
It's probably a bit advanced for a beginner but it's somewhat commented to lead you towards understanding.
Also be sure to check out DeadManDines article on Spread Values.
Sorry for spamming about my project so much guys, but I'm really wanting more feedback and advice.
Btw, I've fixed the latest glitch and wound up with a super jump side-effect ... should I keep it?
I'll be posting the next opensource version after I add jumping off the side portion of the wall. (that'll be the most fun wall jump because can jump back and forth between two platform walls.) It will probably be 3 or 4 days at the most if all goes well.
Blood of the Ancient One, Seen only as Shadow, Faster than Lightning, Fierce as the Greatest Dragon, Nearly Invisible, Floating in a Dream, Entered through the Demon Door, Destroyer of Evil in a Realm with a Red Sky Scarred, Who could I be ?