Simple grass textrure rendering

Post your FreeBASIC tips and tricks here. Please don’t post your code without including an explanation.
AndT
Posts: 26
Joined: Aug 01, 2007 10:05

Simple grass textrure rendering

Postby AndT » Dec 24, 2007 15:45

With minimalcode ;)

Code: Select all

screenres 800,600,32
randomize timer
line ( 1,1) - (512,512) ,rgb(0,255,0),bf
dim as uinteger x,y,psetcolmod
do
x=int(rnd*512)+1
y=int(rnd*512)+1
psetcolmod=point(x,y)
psetcolmod + = rgb(0,int(rnd*16),0)
pset (x,y),psetcolmod
loop until inkey <> ""
sleep


or

Code: Select all

screenres 800,600,32
randomize timer
line ( 1,1) - (512,512) ,rgb(0,255,0),bf
dim as uinteger x,y,psetcolmod
dim as byte rndx,rndy
do
rndx = Int(rnd * 255)
rndy = Int(rnd * 255)
x=256+rndx
y=256+rndy
psetcolmod=point(x,y)
psetcolmod+=rgb(0,int(rnd*16),0)
pset (x,y),psetcolmod
loop until inkey <> ""
sleep
Hexadecimal Dude!
Posts: 360
Joined: Jun 07, 2005 20:59
Location: england, somewhere around the middle
Contact:

Postby Hexadecimal Dude! » Dec 24, 2007 16:47

cool. looking at the way it moves, it might look good as water, too.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Postby notthecheatr » Dec 24, 2007 17:51

Not bad!
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Postby Lachie Dazdarian » Dec 25, 2007 2:12

Yeah. And with so little code.

Return to “Tips and Tricks”

Who is online

Users browsing this forum: No registered users and 6 guests