Demos in GFA and more code by me!

GFA BASIC-related articles in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

User avatar
WireLord55
Atari freak
Atari freak
Posts: 52
Joined: Sun Apr 22, 2018 9:48 am

Demos in GFA and more code by me!

Postby WireLord55 » Tue May 15, 2018 2:12 am

Hi all,

I've decided that the best way for me to learn more GFA is to look at a few game demo source code, but i cannot find any (I'm serious, lol). Could someone provide me with GFA demo code so i can see how it works, and learn some stuff?

And more code i've written:

Code: Select all

a$=MKI$(2)+MKI$(3)+MKI$(1)
a$=a$+MKI$(0)+MKI$(1)
FOR i=1 TO 16
  a$=a$+MKI$(0)+MKI$(65535)
NEXT i
score=0
x=10
y=10
BOX 5,20,635,380
PRINT AT(70,0);"SCORE: ";+score
SPRITE a$,x,y
DO
  c$=INKEY$
  c=ASC(RIGHT$(c$))
  SELECT c
  CASE &H48
    y=y-10
    SPRITE a$,x,y
    score=score+10
    PRINT AT(70,0);"SCORE: ";+score
  CASE &H50
    y=y+10
    SPRITE a$,x,y
    score=score+10
    PRINT AT(70,0);"SCORE: ";+score
  CASE &H4B
    x=x-10
    SPRITE a$,x,y
    score=score+10
    PRINT AT(70,0);"SCORE: ";+score
  CASE &H4D
    x=x+10
    SPRITE a$,x,y
    score=score+10
    PRINT AT(70,0);"SCORE: ";+score
  ENDSELECT
LOOP UNTIL c=27


Can someone tell me how i fix the PRINT, so it does not make a mess on the screen?

And

Why is the SPRITE a box?
How do i make the sprite target a picture? e.g BLOAD

Also

How do i make a BOUNDARY?

Would it be something like:

Code: Select all

BOX 5,20,635,380
BOUNDARY box


Sorry for the long post, but many thanks

WireLord55
"Do...or do not. There is no try" - Yoda, Episode V

wietze
Captain Atari
Captain Atari
Posts: 215
Joined: Fri Mar 01, 2013 10:52 pm

Re: Demos in GFA and more code by me!

Postby wietze » Tue May 15, 2018 7:00 am


User avatar
WireLord55
Atari freak
Atari freak
Posts: 52
Joined: Sun Apr 22, 2018 9:48 am

Re: Demos in GFA and more code by me!

Postby WireLord55 » Tue May 15, 2018 10:13 pm

Thanks wietze
"Do...or do not. There is no try" - Yoda, Episode V


Social Media

     

Return to “GFA BASIC”

Who is online

Users browsing this forum: No registered users and 2 guests