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

Username:   Password: 
 RegisterRegister   
 [Tutorial] [Blitz] Graphics Engine
Index -> Programming, Visual Basic and Other Basics -> Other Basics
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
shorthair




PostPosted: Mon Feb 16, 2004 10:12 pm   Post subject: [Tutorial] [Blitz] Graphics Engine

Getting Graphic
BlitzBasic is not designed for building text based application such as our initial guessing game. It is also not designed for building applications featuring friendly graphics user interfaces filled with windows and sliders.

The only thing BlitzBasic has been designed for is the very serious business of video game development.

The following program initializes a 640x480 video display then plots points at random positions until the user presses the escape key.

code:
; getting graphic
Graphics 640,480
While Not KeyDown(1)
Color Rnd (256), Rnd (256), Rnd (256)
Plot Rnd(640),Rnd(480)
Wend



Once again we rely on the random number generator to provide an interesting result. Try adding the following color command before the plot statement to vary the color of the dots.

code:
Color Rnd(256),Rnd(256),Rnd(256)

Although this may seem like a simple program, creating a DirectX display such as featured here using traditional methods can be a complex task. BlitzBasic makes it so easy!
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Tue Feb 17, 2004 5:45 pm   Post subject: (No subject)

psst : you've got the while after the wend Razz

code:

; getting graphic
Graphics 640,480
While Not KeyDown(1)
Color Rnd (256), Rnd (256), Rnd (256)
Plot Rnd(640),Rnd(480)
Wend
shorthair




PostPosted: Tue Feb 17, 2004 6:24 pm   Post subject: (No subject)

sorry gusy, iwas writing these in a hurry , they need to be edited , 5 bits for each mistake found , some 5 for you cervantes
Cervantes




PostPosted: Thu Feb 19, 2004 8:34 pm   Post subject: (No subject)

hmm.. Blitz seems to have relaxed syntax on the commands.
ex. You can type in delay blah blah and it'll change it to Delay
ex. you can type in "Delay 50" or "Delay (50)"

however Blitz is rather killer on the variables.. Sad

is there an F2 key like in Turing?
shorthair




PostPosted: Fri Feb 20, 2004 6:19 pm   Post subject: (No subject)

If i get my mod status ,im gonna just move em out into there own thread , so the tutorials dont look messey but for now jsut keep posting them in here
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Other Basics
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: