chalkboard project
Author |
Message |
iker
|
Posted: 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]
Description: |
|
Download |
Filename: |
chalkboard.zip |
Filesize: |
268.66 KB |
Downloaded: |
218 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: 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
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
|
Posted: 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]
|
Posted: 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
|
Posted: 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
|
Posted: Thu Nov 10, 2005 11:34 pm Post subject: Alex's Opinion |
|
|
Look into Turing's GUIs as opposed to making your own.
|
|
|
|
|
|
iker
|
Posted: Sun Nov 13, 2005 2:33 pm Post subject: (No subject) |
|
|
/\ /\ /\
| | |
update
|
|
|
|
|
|
Cervantes
|
Posted: 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.
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
|
|
|
|
|