Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Post subject: Re: Calculator Programming
PostPosted: July 11th, 2005, 3:08 am 
Dragon Member
User avatar
Offline

Joined: February 24th, 2005, 2:32 pm
Posts: 1219
Location: In the bath eating pomegranates
RS Status: P2P
Berzerkr wrote:
Im very fluent in BASIC or calculator programming if u wanna call it that. Im not sure how much you know of it, but if you want to have graphics you need to learn the draw commands, (2nd>program). Artifical intelegence is just that, you used an example of a chess game. To have the computer move on its own, use the command "randInt(". This command has the calculator choose a random integer between two peramaters... So if you did "randInt(1,10)" the calculator would choose a random integer between 1 and 10. Store this into a varable and use some "If" "Then" statements. Like for ex:

Quote:
:randInt(1,10)->X
:If X=1
:Then
:*do something*
:If X=2
:Then
:*do something else*
:If X...


Of course you can use all the other test functions too, you can then define peramaters and how many choices the calculator has. Say if x=3 then it will " Text(26,20,"O " (ya i know its cheating to use "o" as a graphic as a chess-peice but its a bit faster than drawing a circle as a graphic). Whare "26,20" is in the middle of a square in a chess board.

If you didnt know there are only 2 languages that your calculator can handle, Assembly and BASIC. Assembly is directly interpertable by the calculators processer, BASIC uses preset "tags" (if u wanna call them that) to insert and then the calculators processer converts them to Assembly. I know pretty much all of BASIC but really nothing of Assembly. Almost all the games you see are written in Assembly, because the language is directly interpertable by the processer. That saves alot of space and makes them run noticably faster. Games can only get so big in BASIC before they are a haywaire of loops, labels, varables, lists, matricies, and whatnot. If you are trying to make a chess game that is smart, you can still do it in BASIC; but you will have to program every move to counter the users or make the game move randomly (like i described). If your just starting out, you may want to program games that are simpler, and possibly that have already been programed to see how other ppl did it. If you have other questions that are specific repost here or pm me whichever...


l13k pmg th4t5 c0nfuzzul1ng!!

_________________
Image
Image
Dragon Member #49 as of|25/11/2006
SOTW wins:
[32] [33]


Top
 Profile  
 
 Post subject: Register and login to get these in-post ads to disappear
PostPosted: July 11th, 2005, 3:08 am 
Dragon Member

Joined: September 9th, 2004, 1:47am
Posts: 9047
Location: In your web browserz


Top
  
 
Display posts from previous:  Sort by  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron