Game coding

GFA BASIC-related articles in here please

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

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

Re: Game coding

Post by WireLord55 »

Well I've done some more! yay :)
And it's like a sprite! (kind of)
But it's not going round the whole screen...

Code: Select all

x1=40
y1=20
x2=10
y2=30
PBOX x1,y1,x2,y2
svar$=MKI$(x1)+MKI$(y1)+MKI$(x2)+MKI$(y2)
GET x1,y1,x2,y2,svar$
DO
  c$=INKEY$
  c=ASC(RIGHT$(c$))
  SELECT c
  CASE &H4B
    x=ADD(x1,20)
    CLS
    PUT x,y,svar$
  CASE &H4D
    x=SUB(x1,20)
    CLS
    PUT x,y,svar$
  ENDSELECT
LOOP UNTIL c=27
Can someone tell me why that is?

And also

Can i replace svar$ with a picture file? (i'd assume that it's possible, maybe with BLOAD?)

Thanks,

WireLord55
"Do...or do not. There is no try" - Yoda, Episode V
User avatar
WireLord55
Atari freak
Atari freak
Posts: 54
Joined: Sun Apr 22, 2018 9:48 am

Re: Game coding

Post by WireLord55 »

I accidentally posted twice thinking that it (the post above) had become another topic. But it was a new page! lol :)

So this was the post above

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

Return to “GFA BASIC”