Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 chalkboard project
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
iker




PostPosted: Wed Nov 09, 2005 7:48 pm   Post subject: chalkboard project

Here is a simple school chalkboard project that I made with a save and load feature incorperated.
Please comment on it, thnx.
edit: updated attachment[/code]



chalkboard.zip
 Description:
updated chalk program

Download
 Filename:  chalkboard.zip
 Filesize:  268.66 KB
 Downloaded:  218 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Thu Nov 10, 2005 10:14 am   Post subject: (No subject)

it just draws ovals. If I was to move my mouse fast enough, it will skip over and have something like

O O O O O OOO

Same for the eraser. And it's also oval Confused

You should make the strokes to be continues, and perhaps have some chalk effect in there (you know, chalk looking edges). Go draw something in your classroom on the board, and see how that compares.
codemage




PostPosted: Thu Nov 10, 2005 10:25 am   Post subject: (No subject)

You could implement a whiteboard mode, as well.

If you use the same algorithm that our crappy markers here do, each marker has enough ink to draw, poorly, about 50 cm worth of line before dying. They'll work again for the same amount if you leave them alone for an hour.

You have 60 almost dead markers to choose from, 40 of which are yellow, and the rest of which are useless, illegible pastel / baby colours.
[Gandalf]




PostPosted: Thu Nov 10, 2005 4:50 pm   Post subject: (No subject)

The break in the continuous line is because of the delay between each loop, even if there is no delay, Turing cannot run it fast enough for a continuous line. The solution to this problem is to have something fill in when you don't know the x/y of the mouse:
code:
var mx, my, mb : int := -10
var mxPrevious, myPrevious : int
loop
    mxPrevious := mx
    myPrevious := my
    Mouse.Where (mx, my, mb)
    Draw.ThickLine (mxPrevious, myPrevious, mx, my, 10, red)
    Draw.FillOval (mx, my, 5, 5, red)
end loop

To get a better idea of the code, add a small (say, 50 ms) delay at the end of each loop iteration.
iker




PostPosted: Thu Nov 10, 2005 7:16 pm   Post subject: (No subject)

no delay, no lie...
and thank you for the comments, i'm actualy thinking of adding in the previous mx and my thing that you just mentioned, anyways, il be back with an update... soon
Mr. T




PostPosted: Thu Nov 10, 2005 11:34 pm   Post subject: Alex's Opinion

Look into Turing's GUIs as opposed to making your own. Idea
iker




PostPosted: Sun Nov 13, 2005 2:33 pm   Post subject: (No subject)

/\ /\ /\
| | |
update
Cervantes




PostPosted: Sun Nov 13, 2005 3:58 pm   Post subject: Re: Alex's Opinion

Pwned wrote:
Look into Turing's GUIs as opposed to making your own. Idea

On top of being ugly, Turing's GUI places severe restrictions on your coding style. Learning to make your own GUI is in no way a bad idea. Yes, I am aware it is reinventing the wheel. But reinventing the wheel is good if it satisfies at least one of the following conditions: a) the new wheel is better; b) the individual understands the wheel better.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 8 Posts ]
Jump to:   


Style:  
Search: