
-----------------------------------
Sean
Fri Feb 08, 2008 5:31 pm

The Paint Program Contest
-----------------------------------
The Paint Program Contest (P.P.C)

Objective:
To successfully create a Paint Program in a programming language, preferably Turing. To establish an efficient, unique and user-friendly program that allows users to design, draw and create pictures using your functions, procedures and the language predefined designs. The program can either use GUI or Non-GUI, decidable by you. All programs must meet the requirements to have atleast completed the objective. 

Requirements:
Number of Designs: Minimum of Five
Number of Colours: Minimum of Eight
Number of Programming Lines: As many as needed
Style of Programming: GUI or Non-GUI
Documentation: Required
Due Date: Meet the Stated Due Date
Input: Keyboard and/or Mouse Input


Submission:
Due Date: February 15th, 2008
Submission Style: Submit .exe format on forums, and PM Vilament with Source Code to ensure your code is not stolen.
Sumbission Detail: Submit a brief description of what it does, and if you used GUI or not.

Rules:
 :arrow: Code with the help of tutorials, class work and knowledge.
 :arrow: Do not steal, or ask people to code it for you.
 :arrow: Do feel free to ask a judge, or represenative on what else is allowed.
 :arrow: Do not submit a program created by someone else, that is on the site, or off the site.
 :arrow: Be creative, express your talent through this program.
 

Judges/Represenatives:
Host/Judge: Vilament
Other Judges: Please Contact if you have a great understanding of any other language then Turing.
Admins: All Admins (Allowed to Lock, or Delete any inappropiate posts, submissions and/or spamming of the thread).

Prizes:
Prizes: Prizes awarded to those who are judged highest. They will receive bits depending on where they finish.
Donations: Feel free to donate any bits that you wish to have rewarded to the winners, this can be done by donating to Vilament.

-----------------------------------
StealthArcher
Fri Feb 08, 2008 5:37 pm

RE:The Paint Program Contest
-----------------------------------
I'm in, here's my 50 bit entrance fee.

-----------------------------------
Tony
Fri Feb 08, 2008 5:43 pm

RE:The Paint Program Contest
-----------------------------------
@Vilament - I think it would be a good idea to put up your own submission first, as a reference.

The requirements seem kind of sketchy. Number of colours? Documentation? Hmm... and 1 week deadline is way too short for something like this.

-----------------------------------
Sean
Fri Feb 08, 2008 5:53 pm

Re: The Paint Program Contest
-----------------------------------
Updates:

 :arrow: Due Date: March 8th, 2008.

-----------------------------------
StealthArcher
Fri Feb 08, 2008 5:59 pm

RE:The Paint Program Contest
-----------------------------------
Is it okay if I use Cervantes text field for this?

-----------------------------------
Sean
Fri Feb 08, 2008 6:20 pm

Re: The Paint Program Contest
-----------------------------------
Might I ask what it is?

-----------------------------------
Tony
Fri Feb 08, 2008 6:21 pm

RE:The Paint Program Contest
-----------------------------------
I'm also thinking that the submissions should be posted as source code. After all, we're here to learn. To avoid any "viewed source before deadline" issues, it could be a protected .zip file.

Refer to [url=http://compsci.ca/v3/viewtopic.php?t=17228]zylum's tetris challenge for the process.

Unless, of course, there are objections to this.

-----------------------------------
Sean
Fri Feb 08, 2008 6:53 pm

Re: The Paint Program Contest
-----------------------------------
Agreed with Tony, new submission status now.

.Zip format with your .exe and Source Code.

-----------------------------------
StealthArcher
Fri Feb 08, 2008 7:25 pm

RE:The Paint Program Contest
-----------------------------------
Cervantes started making gui repolacements as a way to teach coding with classes in turing.  He made a button, which i havew improved some and use, and a text filed replacement.  Which is why I asked, because I would like to use it, rather than code from scratch as it is about 500 lines. I do understand the code.

-----------------------------------
Nick
Fri Feb 08, 2008 7:26 pm

RE:The Paint Program Contest
-----------------------------------
got it all done except colors plus bonus features (ex: undo,more shapes, more colors, save/load,etc...)

-----------------------------------
McKenzie
Fri Feb 08, 2008 8:31 pm

Re: The Paint Program Contest
-----------------------------------
Are you sure you're the most qualified to evaluate a paint program? I've evaluated about 400 paint programs in the past 7 years  :wink:

-----------------------------------
Mackie
Fri Feb 08, 2008 10:34 pm

RE:The Paint Program Contest
-----------------------------------
Are all languages accepted?

-----------------------------------
fishtastic
Fri Feb 08, 2008 10:37 pm

Re: The Paint Program Contest
-----------------------------------
Wow! The one I posted in the Turing submission part meets all your requirement.  :lol: 


 var version := "1.2" var loadtime := 0.0 var mx, my, mc : int var selected := 255 var chosen := 1 var key : array char of boolean var actions : flexible array 1 .. 0 of int var ax1, ax2, ay1, ay2 : flexible array 1 .. 0 of int var step : flexible array 1 .. 0 of int var aColor : flexible array 1 .. 0 of int var thick : flexible array 1 .. 0 of int var toolName : array 0 .. 9 of string := init ("erasor", "Line", "brush", "rectangle", "oval", "star", "mapleleaf", "fillshape", "fillblank", "no") var thickness := 1.0 var tool := 1 var name := "" View.Set ("offscreenonly")     proc help     var ch : char     cls     color (red)     put "Welcome to Turing Paint " + version     put "Press 'h' at ANY TIME for HELP"     put ""     color (black)     put "select colour at the bottom of the window"     put "press '0'~'9' to select tools"     put "press '+' and '-' to adjust line thickness"     put "press 'z' to move 1 step back"     put "press 's' to save and 'l' to load"     put "press 'w' and 'q' to selection previous and next colour"     put ""     put "press any key to continue"     View.Update     ch := getchar end help  proc newAll     new actions, upper (actions) + 1     new ax1, upper (ax1) + 1     new ay1, upper (ay1) + 1     new ax2, upper (ax2) + 1     new ay2, upper (ay2) + 1     new aColor, upper (aColor) + 1     new thick, upper (thick) + 1      actions (upper (actions)) := 0     aColor (upper (aColor)) := 0     ax1 (upper (ax1)) := 0     ay1 (upper (ay1)) := 0     ax2 (upper (ax1)) := 0     ay2 (upper (ay1)) := 0     thick (upper (thick)) := 0 end newAll  proc back     if upper (actions) > 0 then         loop             exit when upper (actions) = step (upper (step))             new actions, upper (actions) - 1             new ax1, upper (ax1) - 1             new ay1, upper (ay1) - 1             new ax2, upper (ax2) - 1             new ay2, upper (ay2) - 1             new aColor, upper (aColor) - 1             new thick, upper (thick) - 1         end loop         new step, upper (step) - 1         delay (50)     end if end back  proc drawAll     for i : 1 .. upper (actions)         if actions (i) = 0 then             Draw.ThickLine (ax1 (i), ay1 (i), ax2 (i), ay2 (i), thick (i), white)         elsif actions (i) = 1 then             Draw.ThickLine (ax1 (i), ay1 (i), ax2 (i), ay2 (i), thick (i), aColor (i))         elsif actions (i) = 2 then             Draw.ThickLine (ax1 (i), ay1 (i), ax2 (i), ay2 (i), thick (i), aColor (i))         elsif actions (i) = 3 then             drawfillbox (ax1 (i), ay1 (i), ax2 (i), ay2 (i), aColor (i))         elsif actions (i) = 4 then             drawfilloval (ax1 (i), ay1 (i), ax2 (i) - ax1 (i), ay2 (i) - ay1 (i), aColor (i))         elsif actions (i) = 5 then             drawfillstar (ax1 (i), ay1 (i), ax2 (i), ay2 (i), aColor (i))         elsif actions (i) = 6 then             drawfillmapleleaf (ax1 (i), ay1 (i), ax2 (i), ay2 (i), aColor (i))         elsif actions (i) = 7 then             drawfill (ax1 (i), ay1 (i), aColor (i), 0)         elsif actions (i) = 8 then             drawfill (ax1 (i), ay1 (i), 255, aColor (i))         end if     end for end drawAll  proc showStat     if (Time.Elapsed - loadtime not= 0) then         color (black)         put "FPS:", 1000 / (Time.Elapsed - loadtime) : 4 : 0, "  Total Points:", upper (ay2)         color (red)         put toolName (tool), " tool"         put "thickness: ", round (thickness), "  colour #: ", chosen     end if end showStat  proc showAll     for i : 0 .. maxcolor         drawfillbox (round ((maxx / maxcolor) * i), 0, round ((maxx / maxcolor) * i) + 3, 20, i)     end for     drawfillbox (0, 20, maxx, 40, chosen)     if my < 20 then         drawfillbox (0, 20, maxx, 40, selected)     end if     loadtime := Time.Elapsed end showAll   proc save (name : string)     var OUT : int     open : OUT, name, put     for i : 1 .. upper (ax1)         put : OUT, ax1 (i)         put : OUT, ay1 (i)         put : OUT, ax2 (i)         put : OUT, ay2 (i)         put : OUT, actions (i)         put : OUT, thick (i)         put : OUT, aColor (i)     end for     put "saved!!"     delay (1000)     close : OUT end save  proc load (name : string)     for i : 1 .. upper (ax1) + 1         back     end for     var IN : int     open : IN, name, get     newAll     loop         get : IN, ax1 (upper (ax1))         get : IN, ay1 (upper (ay1))         get : IN, ax2 (upper (ax2))         get : IN, ay2 (upper (ay2))         get : IN, actions (upper (actions))         get : IN, thick (upper (thick))         get : IN, aColor (upper (aColor))         exit when eof (IN) = true         newAll     end loop     put "loaded!!"     delay (1000)     close : IN end load  proc checkKeys     Input.KeyDown (key)     if key (chr (ord ("+"))) then         thickness += 0.2     elsif key (chr (ord ("-"))) and thickness > 1 then         thickness -= 0.2     elsif key (chr (ord ("z"))) then         back         put "canceled 1 move"         View.Update         delay (100)     elsif key (chr (ord ("h"))) then         help     elsif key (chr (ord ("s"))) then         cls         View.Set ("nooffscreenonly")         put "File name(type 'cancel' to cancel)"         get name         if name not= "cancel" then             save (name + ".txt")         end if         View.Set ("offscreenonly")     elsif key (chr (ord ("l"))) then         cls         View.Set ("nooffscreenonly")         put "File name(type 'cancel' to cancel)"         get name         if name not= "cancel" then             load (name + ".txt")         end if         View.Set ("offscreenonly")     elsif key (chr (ord ("q"))) then         if chosen > 0 then             chosen -= 1         end if     elsif key (chr (ord ("w"))) then         if chosen < 255 then             chosen += 1         end if     end if     for i : 0 .. 9         if key (chr (ord (intstr (i)))) then             tool := i         end if     end for end checkKeys  help  loop     cls     mousewhere (mx, my, mc)     showStat     drawAll     showAll     checkKeys          if mc = 1 and my > 20 then         new step, upper (step) + 1         step (upper (step)) := upper (ax1)         newAll         actions (upper (actions)) := tool         aColor (upper (aColor)) := chosen         ax1 (upper (ax1)) := mx         ay1 (upper (ay1)) := my         thick (upper (thick)) := round (thickness)         loop              cls             mousewhere (mx, my, mc)              ax2 (upper (ax2)) := mx             ay2 (upper (ay2)) := my              showStat             drawAll             showAll              exit when mc = 0             if tool = 0 or tool = 2                     then                 newAll                 actions (upper (actions)) := tool                 aColor (upper (aColor)) := chosen                 ax1 (upper (ax1)) := mx                 ay1 (upper (ay1)) := my                 thick (upper (thick)) := round (thickness)             end if             View.Update             delay (10)         end loop     elsif my < 20 and round (mx / (maxx / maxcolor)) > -1 and round (mx / (maxx / maxcolor)) 