The Daily Click ::. Forums ::. Klik Coding Help ::. what are these used for?
 

Post Reply  Post Oekaki 
 

Posted By Message

siven

I EAT ROCKS

Registered
  03/11/2008
Points
  604

Wii OwnerVIP Member
16th June, 2009 at 06:18:33 -

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.]

Silveraura

God's God

Registered
  08/08/2002
Points
  6747

Game of the Week WinnerKlikCast StarAlien In Training!VIP Member360 OwnerWii OwnerSonic SpeedThe Cake is a LieComputerChristmas Tree!
I am an April Fool
16th June, 2009 at 06:23:49 -

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.

Edited by Silveraura

 
http://www.facebook.com/truediamondgame

Dr. James MD

Addict

Registered
  08/12/2003
Points
  11941

First GOTW AwardSecond GOTW AwardThird GOTW AwardPicture Me This -Round 26- Winner!
16th June, 2009 at 12:22:05 -

They're all maths stuff innit.

Spreading alternate values is like assigning each object with a 1-x value. So you can have 100 objects but they all have a different (selected) value.

 
Image
http://uk.youtube.com/watch?v=j--8iXVv2_U
On the sixth day God created Manchester
"You gotta get that sand out your vaj!" x13
www.bossbaddie.com

OMC

What a goofball

Registered
  21/05/2007
Points
  3309

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th June, 2009 at 13:44:47 -

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.

 

  		
  		

Spitznagl

Cabinetmaker

Registered
  06/12/2008
Points
  4260

The SpinsterVIP MemberHas Donated, Thank You!Picture Me This Round 29 Winner!Picture Me This Round 31 Winner!Picture Me This Round 36 Winner!
16th June, 2009 at 16:01:49 -


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 )

Logs & Ln
I just learned what they were for yesterday.
Check here: http://www.create-games.com/forum_post.asp?id=254349

I personally still have to learn what Exp and the 3 bit-wise And Or and Xor are for.

 
...

OMC

What a goofball

Registered
  21/05/2007
Points
  3309

KlikCast Musician! Guy with a HatSomewhat CrazyARGH SignLikes TDCHas Donated, Thank You!Retired Admin
16th June, 2009 at 16:11:17 -

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.

I don't know why you'd need them.

Edited by OMC

 

  		
  		

MBK



Registered
  07/06/2007
Points
  1578

VIP Member
17th June, 2009 at 06:18:34 -

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.


 
Click Me! http://www.create-games.com/project.asp?view=main&id=1444

http://www.mediafire.com/download.php?aoo1dnnlq5i

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 ?
   

Post Reply



 



Advertisement

Worth A Click