Loading ...
Sorry, an error occurred while loading the content.
 

Re: [libertybasic] Game Programming

Expand Messages
  • Marc Rossi
    Ando, I wrote this little demo of a spaceship moving.  It is one of the most basic game program I ade.  it was the first program I wrote. I will paste it
    Message 1 of 3 , May 16, 2013
      Ando,
      I wrote this little demo of a spaceship moving.  It is one of the most basic game program I ade.  it was the first program I wrote.
      I will paste it here so you can see it.
      Marc
      ' code start

      NOMAINWIN
      WindowWidth = 1000
      WindowHeight = 800
      x = 500
      y = 350
      open "ASCII WARS" for graphics as #gwin
      ' open "d" for text as #t
      print #gwin, "trapclose [quit]"

      print #gwin, "home;north;down;place ";x ; " "; y
      print #gwin, "\<"
      print #gwin, "setfocus;when characterInput [move]"

      [move]
      k$ = Inkey$
      'print #t, "x= ";x;"     y=";y
      if asc(right$(k$,1)) = _VK_LEFT then
      call moveleft x,y
      end if
      if asc(right$(k$,1)) = _VK_RIGHT then
      call moveright x,y
      end if
      if asc(right$(k$,1)) = _VK_UP then
      call moveup x,y
      end if
      if asc(right$(k$,1)) = _VK_DOWN then
      call movedown x,y
      end if
      if x < -4 then
      x =964
      end if
      if x > 964 then
      x = -4
      end if
      if y < 2 then
      y = 752
      end if
      if y > 752 then
      y = 2
      end if
      wait
      sub moveleft byref shipx  ,byref shipy
      shipx = shipx - 4
      erase = shipx +8
      print #gwin,"place "; shipx ;" "; shipy
      print #gwin, "\<"
      print #gwin, "place ";erase; " ";shipy
      print #gwin, "\    "
      end sub
      sub moveright byref shipx  ,byref shipy
      shipx = shipx + 4
      erase = shipx -17
      print #gwin,"place "; shipx ;" "; shipy
      print #gwin, "\>"
      print #gwin, "place ";erase; " ";shipy
      print #gwin, "\    "
      end sub
      sub moveup byref shipx  ,byref shipy
      shipy = shipy - 4
      print #gwin,"place "; shipx ;" "; shipy
      print #gwin, "\^"
      end sub
      sub movedown byref shipx  ,byref shipy
      shipy = shipy + 4
      print #gwin,"place "; shipx ;" "; shipy
      print #gwin, "\v"
      end sub
      [quit]
      close #gwin
      close #t
      end

       

      ________________________________
      From: andocool123 <andocool123@...>
      To: libertybasic@yahoogroups.com
      Sent: Thursday, May 16, 2013 8:58 PM
      Subject: [libertybasic] Game Programming

       

      I am new to liberty basic programming, I read the beginning programming for dummies book. So know I would like to develop bit video games. But truthfully I really have not much of an idea how. So I would like a tutorial from someone, or a video, or a video posted on youtube or something. There is not much about libertybasic game programming out there. I tried your website but am having a hard time. So it would help if somebody could help me.




      [Non-text portions of this message have been removed]
    • Stefan Pendl
      ... Find a tutorial on creating sprite based games at http://lbpe.wikispaces.com/tutorials#Sprites Find some games at http://alycesrestaurant.com/Games.htm
      Message 2 of 3 , May 16, 2013
        Am 17.05.2013 05:43, schrieb Marc Rossi:
        >
        > I am new to liberty basic programming, I read the beginning programming for dummies book. So know I would like to develop bit video games. But truthfully I really have not much of an idea how. So I would like a tutorial from someone, or a video, or a video posted on youtube or something. There is not much about libertybasic game programming out there. I tried your website but am having a hard time. So it would help if somebody could help me.
        >

        Find a tutorial on creating sprite based games at
        http://lbpe.wikispaces.com/tutorials#Sprites

        Find some games at http://alycesrestaurant.com/Games.htm

        Visit the sites linked in my signature for more information.


        --
        Stefan Pendl
        http://stefanpendl.runbasichosting.com/

        LB 4.04 Pro ... http://www.libertybasic.com/assist.html
        LB 4.04 ....... http://www.libertybasic.com/lb404setup.exe

        LB Community Wiki .............. http://basic.wikispaces.com/
        LB Programmer's Encyclopedia ... http://lbpe.wikispaces.com/
        LB Bug Tracker ................. http://libertybasicbugs.wikispaces.com/

        Books at http://www.lulu.com/ and http://www.amazon.com/
        Alyce Watson ... APIs for Liberty BASIC
        Carl Gundel .... Beginning Programming with Liberty BASIC

        Windows 7 Home Premium 64-bit SP1
        AMD Turion X2 RM-70 2GHz, 4GB RAM
      Your message has been successfully submitted and would be delivered to recipients shortly.