Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
Author Message
andyman

Posted: Thu Jun 12, 2003 6:18 pm   Post subject: Space Invaders help

I've been designing a space invaders game on Turing 3. something and I can't figure out how to make the laser (the red thing that comes out of triangle) shoot and destroy oncoming enemies from the right. Unfortunately the extent of my teachers turing knowledge is a put statement and I'm the smartest guy in my class *laugh*. He doesn't even know how to update turing on our school's server!

Anywho, here's the program so far
 code: var w : int := Window.Open ("fullscreen") Window.Set (w, "nocursor") setscreen ("graphics") % Background drawbox ( - 1, - 1, 800, 601, 54) drawfill (1, 1, 16, 54) % Basic drawline (100, 5, 150, 26, 55) drawline (100, 55, 150, 26, 55) drawline (100, 55, 100, 5, 55) drawfill (105, 16, 55, 55) %Controls var x, e : int var c : string (1) x := 0 loop     getch (c)     if c = chr (200) and x < 540 then         drawline (100, x, 150, 21 + x, 55)         drawline (100, 50 + x, 150, 21 + x, 55)         drawline (100, 50 + x, 100, x, 55)         drawfill (1, 1, 16, 54)         x := x + 5         e := 26 + x     elsif c = chr (208) and x > 0 then         drawline (100, 10 + x, 150, 31 + x, 55)         drawline (100, 60 + x, 150, 31 + x, 55)         drawline (100, 60 + x, 100, 10 + x, 55)         drawfill (1, 1, 16, 54)         x := x - 5         e := 26 + x     elsif c = chr (205) then         for t : 1 .. 700 by 10             drawline (150 + t, e, 180 + t, e, red)             delay (10)             drawline (150 + t, e, 180 + t, e, 16)         end for     end if     drawline (100, 5 + x, 150, e, 55)     drawline (100, 55 + x, 150, e, 55)     drawline (100, 55 + x, 100, 5 + x, 55)     drawfill (105, 15 + x, 55, 55) end loop

If you could help me or just give me tips ASAP, I'd really appreciate it

Mazer

Posted: Thu Jun 12, 2003 6:26 pm   Post subject: (No subject)

before you go any further i'm gonna have to ask you to switch to turing v4.04 if you have it. games that use the keyboard are just awful without Input.KeyDown.

and if you don't have turing 4, i suggest using the mouse for flying the ship. ie, if the mouse y coord is greater than the ship's y coord, increase y, if it is lower, decrease y. in case you don't know how to use the mouse there are some good tutorials somewhere around here:
http://www.compsci.ca/bbs/viewtopic.php?t=6
born130

Posted: Thu Jun 12, 2003 7:16 pm   Post subject: (No subject)

are u andy sun?
andyman

Posted: Thu Jun 12, 2003 7:25 pm   Post subject: (No subject)

No I'm Andy Johnson
Homer_simpson

Posted: Thu Jun 12, 2003 8:16 pm   Post subject: (No subject)

try reading the collision detection tutorials on this website first... theil help u with detecting when the laser hits your enemies...
Asok

Posted: Thu Jun 12, 2003 8:47 pm   Post subject: (No subject)

I'll post it in July.
Andy

Posted: Fri Jun 13, 2003 10:39 am   Post subject: (No subject)

hmm isn't it called glaxian
Asok

Posted: Fri Jun 13, 2003 1:26 pm   Post subject: (No subject)

MINE is called space invaders 2

naoki

Posted: Fri Jun 13, 2003 9:54 pm   Post subject: (No subject)

use like a process to control a shooting animation so it'll shoot while u move

everything else is just collision detection and seeing when you hit the upper bound, when the max number of bullets is achieved, and so on. i won't tell u everything, experiment 1st and then i'll help u some more
Andy

Posted: Sat Jun 14, 2003 4:03 pm   Post subject: (No subject)

born 130, shut up, stop saying my full name u fag and no its not me, u'd know i'm better than that and i dun use turing 3
hello

Posted: Sun Jun 15, 2003 1:18 pm   Post subject: (No subject)

offscreenonly
View.Update
wait does turing 3.0 have View.Update?
born130

Posted: Sun Jun 15, 2003 1:51 pm   Post subject: (No subject)

no
Andy

Posted: Sun Jun 15, 2003 3:09 pm   Post subject: (No subject)

and once again, born130 gets 2 bits for 2 lettersr

Posted: Sun Jun 15, 2003 3:10 pm   Post subject: (No subject)

85882

Posted: Mon Jun 16, 2003 3:53 pm   Post subject: (No subject)

Your program is good so far.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 2  [ 21 Posts ]
Goto page 1, 2  Next
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: