Create a Simple Game Object in Basic4GL

How to Create a Simple Game Object in Basic4GL

TextMode(TEXT_BUFFERED)

Struc SGameObj
    x#
    y#
    spr
EndStruc

Dim tex
Dim objSpr
Dim SGameObj gameObj

tex = LoadTexture("test_image.png")
objSpr = NewSprite(tex)
gameObj.spr = objSpr 

BindSprite(gameObj.spr)
SprSetPos(32,32)

Do  
    DrawText()
    Sleep(1)
Loop

End

This page has been recommended for cleanup, integration, etc.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution 2.5 License.