Egsl is one of my favorite languages. It is easy to use and has good graphics. It also has an interpreter that allows for quick debugging. It uses a Direct Draw format, that makes the graphics fast. It is very similar to Basic but a lot easier to use.
 Site:     http://egsl.retrogamecoding.org/

       This page is made for the purpose of providing a quick reference for the EGSL language. I use pages like this one so I can quickly see the usable syntax for the language I am using and a way to cut and paste code pieces.

 

 screen (640,480,32,"Line Test")

cls()

alphachannel (128)

color (0,255,0)

line (10,10,250,400)

circle (320,240,200)

x = 320 y = 240  w = 50

text = "This is a test"

fillcircle (x,y,w)

dot (200,150)

box (100,100,320,200)

ellipse (320,240,200,50)

fillbox (10,50,75,250)

fillellipse (100,100,50,35)

triangle (10,10,50,50,90,90)

filltriangle (10,10,50,50,90,90)

drawtext(400,20,text)

redraw()

key = inkey()

closewindow() 


                  Supported  Images

•BMP

•JPEG, JPEG2000

•PNG/APNG, MNG, JNG

•GIF

•TGA

•DDS

•PBM, PGM, PPM, PAM, PFM

•TIFF

•PSD

•PCX

•XPM


putimage (100,150,myimage)

drawimage (10,10,64,32,100,100,myimage)

newimage = copyimage (0,0,32,32,myimage)

anotherimage = grabimage (10,250,32,32)

w = imagewidth (myimage)

h = imageheight (myimage)


openwindow (640,480,32,"Screenshot")

circle (320,240,240)

screenshot = grabimage (0,0,640,480)

saveimage (screenshot, "screenshot.bmp")

flipped = fliphorizontal (myimage)

flipped = flipvertical (myimage)

closewindow()


colourkey (120,5,117)

nocolourkey()

alphachannel (128)

•freeimage (image)

•createimage (width,height)

•startimagedraw (image)

•stopimagedraw()

•imagered (x,y,image)

•imagegreen (x,y,image)

•imageblue (x,y,image)

•imagealpha (x,y,image)

•loadtileset (filename, lines, rows, string)

•tileset (image, lines, rows, string)

•drawtile (x, y, textstr, tileset)

                   Animations

•spriteanimation (image,lines,rows,timer,direction)

•spriteframe (animation)

•framenumber (animation)

•setanimationspeed (animation, speed)


           Sound and Music

•loadsound (soundfile)

•playsound (soundname,volume, channel, loop)

•playmusic (musicfile,volume,loop)

•loadmusic (musicfile)

•pausemusic()

•resumemusic()


          Text output and input

•drawtext (x,y,text)

•input (x,y,length) [only with embedded font]

•setcursortype ("cursortype")

•loadbmpfont (filename, lines, rows, fontface)

•bmptext (x,y,text,font)

•bmpinput (x,y,length,font)

•bmpfont (image, lines, rows, fontface)

•fontwidth (font)

•fontheight (font)

•loadmonofont (filename)

•monotext (x,y,text)

•monoinput (x,y,length)

•monowidth (textstring)

•monoheight()


         Other Functions
•wait (ms)
•timeleft()
•setframetimer (frames)
•timerticks()
•int (number)
•rnd()
•chr (code) [Pascal: chrstr]
•asc (char)
•val (string)
•left (string,pos)
•right (string, pos)
•mid (string, pos, length)
•insert (string1, string2, pos) [Pascal: insertstr]
•len (string)
•time()
•date()
•uppercase(string) [Pascal: upper]
•lowercase (string) [Pascal: lower]
•arguments()
•cos
•sin
•sqrt
•abs
•floor
•insidetriangle (px,py,x1,y1,x2,y2,x3,y3)
•insidecircle (px,py,cx,cy,radius)
•insiderectangle (px,py,x1,y1,x2,y2)

 


screen(800,600,32,"hello")

color (255,255,0)

-- sets colour to yellow

backcolour (0,0,255)

-- sets background to blue

redraw()

wait(2000)

clearscreen()

setcaption ("We now have a blue screen")

fillcircle (320,240,150)

redraw()

inkey()

resizewindow (1000,600)

clearscreen()

sync()

inkey()

closewindow()  


 size=screenwidth()

drawtext (0,0,size)


screen (640,480,"GetPixel Test")

color (123,50,70)

dot (200,200)

red=screenred (200,200)

--' red has the value of 123


screen (640,480,"GetPixel Test")

color (123,50,70)

dot (200,200)

green=screengreen (200,200)

--' green has the value of 50


screen (640,480,"GetPixel Test")

alphachannel (128)

color (123,50,70)

dot (200,200)

alpha=screenalpha (200,200)

--' alpha has the value of 128

            Collision Detection

•boxcoll (x1,y1,w1,h1,x2,y2,w2,h2)

•pixelcoll (image1,ax,ay,image2,bx,by,skip)

•circlecoll (x1,y1,r1,x2,y2,r2,offset)

•roundcoll (image1,x1, y1, image2, x2, y2)

•imagecoll (image1,ax,ay,image2,bx,by)

•sidecoll (x,y,w,h,dx,dy, rx, ry, rw, rh)


              Particles

•createparticles (px,py,number,cycle, red,green,blue)

•updateparticles()

•resetparticles()

•setparticlesize (size, "flag")

•setparticletype ("type")

•setparticleimage (image) 


            Keyboard

•getkey()

•inkey()

•keystate (key)


           Mouse

•mousex()

•mousey()

•mouseb()

•mousehide()

•mouseshow()

•mousezone (x1,y1,x2,y2)

•grabmouse()

•releasemouse()

•warpmouse (x,y)


          Joystick

•joystickplugged()

•getjoyx()

•getjoyy()

•getjoybutton(button)

•numberjoybuttons()

                    File Management

•open (file,"r/w/a")

•close (file)

•fprint (file, string)

•finput (file)

•eof (file)

•eoln (file)

•fileexists (file)

•directoryexists (directory)

•makedir (directory)

•removedir (directory)

•changedir (directory)

•deletefile (file)

•system (program)

ABS

ALPHACHANNEL

AND

ARGUMENTS

ASC

BACKCOLOR

BACKCOLOUR

BMPINPUT

BMPTEXT

BOX

BOXCOLL

BREAK

CHANGEDIR

CHR

CIRCLE

CIRCLECOLL

CLEARSCREEN

CLOSE

CLOSEWINDOW

CLS

COLOR

COLORKEY

COLOUR 

COLOURKEY

COPYIMAGE

COS

CREATEIMAGE

DATE

DELETEFILE

DIRECTORYEXISTS

DO

DOT

DRAWIMAGE

DRAWTEXT

DRAWTILE

ELLIPSE

ELSE

ELSEIF

END

EOF

EOLN

FALSE

FILEEXISTS

FILLBOX

FILLCIRCLE

FILLELLIPSE 

 MOUSEY

MOUSEZONE

NIL

NOCOLORKEY

NOCOLOURKEY

NOT

NUMBERJOYBUTTONS

OPEN

OPENWINDOW

OR

OSTYPE

PAUSEMUSIC

PIXELCOLL

PLAYMUSIC

PLAYSOUND

PUTIMAGE

REDRAW

REMOVEDIR

REPEAT

REQUIRE

RESIZEWINDOW

RESUMEMUSIC

RETURN

PIE

 RIGHT

RND

ROTATEIMAGE

ROUNDCOLL

SAVEIMAGE

SCREEN

SCREENALPHA

SCREENBLUE

SCREENGREEN

SCREENHEIGHT

SCREENRED

SCREENWIDTH

SETCAPTION

SETFRAMETIMER

SIN

SPRITEANIMATION

SPRITEFRAME

SQRT

STARTIMAGEDRAW

STOPIMAGEDRAW

SYNC

SYSTEM

THEN

FILLPIE

 FILLTRIANGLE

FINPUT

FLIPHORIZONTAL

FLIPVERTICAL

FLOOR

FOR

FPRINT

FRAMENUMBER

FREEIMAGE

FUNCTION

GETJOYBUTTON

GETJOYX

GETJOYY

GETKEY

GRABIMAGE

IF

IMAGEALPHA

IMAGEBLUE

IMAGECOLL

IMAGEGREEN

IMAGEHEIGHT

IMAGERED

IMAGEWIDTH

IN

INKEY

INPUT

INSERT

INT

JOYSTICKPLUGGED

KEYSTATE

LEFT

LEN

LINE

LOADBMPFONT

LOADIMAGE

LOADMUSIC

LOADSOUND

LOADTILESET

LOCAL

LOWERCASE

MAKEDIR

MID

MOUSEB

MOUSEHIDE

MOUSESHOW

MOUSEX 

TIME

TIMELEFT

TIMERTICKS

TOGGLEFULLSCREEN

TRIANGLE

TRUE

UNTIL

UPPERCASE

VAL

WAIT

WHILE

ZOOMIMAGE

INSIDECIRCLE

INSIDETRIANGLE

INSIDERECTANGLE

BMPFONT

AALINE

AACIRCLE

AAELLIPSE

AATRIANGLE

AAFLIPHORIZONTAL

AAFLIPVERTICAL

AAROTATEIMAGE

ROUND 

AAZOOMIMAGE

TILESET

WARPMOUSE

RELEASEMOUSE

GRABMOUSE

SIDECOLL

SETANIMATIONSPEED

FONTHEIGHT

FONTWIDTH

SETCURSORTYPE

CREATEPARTICLES

UPDATEPARTICLES

SETPARTICLESIZE

SETPARTICLETYPE

SETPARTICLEIMAGE

RESETPARTICLES

RECTANGLE

FILLRECTANGLE

LOADMONOFONT

MONOTEXT

MONOINPUT

MONOWIDTH

MONOHEIGHT

CEIL 

 

Make a free website with Yola