Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

OOT (Object Oriented Turing) or Turing

perrotta14perrotta14 Member Posts: 14
hey all, i need help with something...i am trying to make space invaders and i cant figure out how to make the ship move around & how to make a beam come out of my ship.....help!.......

Comments

  • Josh CodeJosh Code Member Posts: 675
    : hey all, i need help with something...i am trying to make space invaders and i cant figure out how to make the ship move around & how to make a beam come out of my ship.....help!.......
    :

    Make some variables to store the location of the ship.

    Change these variables when the user presses certain keys(ie. arrow keys).

    For the beem, you could draw some lines or use another image.
    If you want lines, just store a flag somewhere that will define when the beem is visible. Make sure that when the display is updated, those lines are drawn.

    For the image, you can show its movement after being shot. Use a variable to store where the image is and if the image is visible. When the display is updated, just draw the image at its current location, if it is visible.







  • Justin BibJustin Bib USAMember Posts: 0

    _________ \ http://forcoder.org \ free video tutorials and ebooks about { Objective-C, Swift, Visual Basic .NET, Scratch, Java, C#, R, JavaScript, Go, Visual Basic, PL/SQL, Perl, Assembly, Delphi, Ruby, C, C++, PHP, Python, MATLAB Ada, Julia, SAS, ABAP, Kotlin, VBScript, LabVIEW, Scheme, F#, Alice, Crystal, Fortran, Clojure, Erlang, Lisp, FoxPro, Prolog, Hack, Logo, D, Awk, Bash, Scala, Dart, Apex, Lua, Rust, ML, Transact-SQL, COBOL } _________

Sign In or Register to comment.