How to draw graphics into screen?

Game development specific discussions.
Post Reply
yoidog
Posts: 3
Joined: Jun 29, 2022 7:58

How to draw graphics into screen?

Post by yoidog »

Hi, i want to draw graphics into the screen like a simple red 2d cube, can anyone tell me how?
BasicCoder2
Posts: 3906
Joined: Jan 01, 2009 7:03
Location: Australia

Re: How to draw graphics into screen?

Post by BasicCoder2 »

.
Last edited by BasicCoder2 on Sep 08, 2022 7:58, edited 1 time in total.
D.J.Peters
Posts: 8586
Joined: May 28, 2005 3:28
Contact:

Re: How to draw graphics into screen?

Post by D.J.Peters »

Here are all FreeBASIC graphics commands -->: CatPgGfx

Joshy

Code: Select all

' graphic screen with 8 bit palette = 256 colors
screenres 640,480,8
' a red diagonal line
line (10,10)-step(100,100),4
' a red [B]ox
line (120,10)-step(100,100),4,B
' a red [B]ox [F]illed 
line (240,10)-step(100,100),4,BF
' a red [B]ox [F]illed with white line conture
line (360,10)-step(100,100),15,B
line (361,11)-step( 98, 98),4,BF
sleep
yoidog
Posts: 3
Joined: Jun 29, 2022 7:58

Re: How to draw graphics into screen?

Post by yoidog »

D.J.Peters wrote: Sep 08, 2022 4:25 Here are all FreeBASIC graphics commands -->: CatPgGfx

Joshy

Code: Select all

' graphic screen with 8 bit palette = 256 colors
screenres 640,480,8
' a red diagonal line
line (10,10)-step(100,100),4
' a red [B]ox
line (120,10)-step(100,100),4,B
' a red [B]ox [F]illed 
line (240,10)-step(100,100),4,BF
' a red [B]ox [F]illed with white line conture
line (360,10)-step(100,100),15,B
line (361,11)-step( 98, 98),4,BF
sleep
Hey, thank you so much!
Post Reply