
-----------------------------------
neel0916
Fri Jun 09, 2006 9:44 pm

Graphics
-----------------------------------
Hi, I'm taking computer science this year at my school, and I was wondering if there are any cool graphic tips, or tricks that might be useful. The project is to make the game called "mastermind". It is a very common game.

-----------------------------------
Delos
Fri Jun 09, 2006 10:51 pm


-----------------------------------
This has been posted in the wrong forum.  Moved.

As for your question, take a peek at the after you have a working engine.  I know that Mastermind is somewhat graphics oriented, but it would be just as easy to represent the pieces with numbers, than colours.  By starting simple like this, you'll save yourself a lot of time in terms of debugging the graphics issues that you'll no doubt encounter.  Once you have the game working with just text, then you can progress to add all the graphics you need.

-----------------------------------
upthescale
Sat Jun 10, 2006 8:55 am


-----------------------------------
Yes, Mastermiondi s a very popular game now a days. For your question do you know any Draw.Fill commands?


1Draw.Oval or draw.FillOval
1Draw.Box or Draw.FillBox
1Draw.Line or Draw.ThickLine
1Draw.Arc or Draw.FillArc
1Draw.MapleLeaf or Draw.FillMapleLeaf
1Draw.Polygon or Draw.Polygon

Those are all the Draw Commands, I think there are more though.

If you are finishing up your year in Computer Sciences, I am sure you know how to use at least a couple of these.

Now an idea you can do, is at the end of the game have like a pacman guy shoot across the screen, I don't know?

To do this, you can do one of two, one of which is the most horrible way


Draw.FillArc(100,200,34,34,30,-20,8)
delay(10)
cls
Draw.FillArc(110,200,34,34,30,-20,8)
delay(10)
cls
Draw.FillArc(120,200,34,34,30,-20,8)
delay(10)
cls
Draw.FillArc(130,200,34,34,30,-20,8)


That is if you aren't gonig to use any variable, which I am sure you are, so don't even use that code, that is just a possibilty, an ugly one!

Declare a variable, say 


var manx,many:int:=100


And now Make the Draw.FillArc Command...


var manx,many:int:=100
Draw.FillArc(manx,many,34,34,30,-20,8)


Now to make it move, just go:

[code
manx+=1 
%Or
manx-=1
%Depending on which way you want it to move
[/code]


That is a basic graphic that is easy to do!
