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

Username:   Password: 
 RegisterRegister   
 Graphics
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
neel0916




PostPosted: Fri Jun 09, 2006 9:44 pm   Post subject: 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.
Sponsor
Sponsor
Sponsor
sponsor
Delos




PostPosted: Fri Jun 09, 2006 10:51 pm   Post subject: (No subject)

This has been posted in the wrong forum. Moved.

As for your question, take a peek at the [Turing Walkthrough] to get you started. This is pretty much the same response you'll get from most people - since it's the most informative place to start.
There may not be too much on graphics in there, but enough to get started.

Also, do a Search in [Turing Source Code] for graphics, or something along those lines. You'll likely end up with many, many examples of graphics created in Turing - though I'll warn you that many are bright, flashy, and otherwise potentially seizure inducing.
If you're up to it, take a look at the Tut on the Pic.() module - it will allow you to import external images (.bmp, .jpg) into your programme...can be quite useful.

I would, as a general comment, refrain from dressing your programme up with graphics until 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




PostPosted: Sat Jun 10, 2006 8:55 am   Post subject: (No subject)

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

code:

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

code:

var manx,many:int:=100


And now Make the Draw.FillArc Command...

code:

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!
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: