Computer Science Canada

Defend Your Computer

Author:  upthescale [ Thu May 25, 2006 8:00 pm ]
Post subject:  Defend Your Computer

Not a bad game at all, quite fun,and good graphics!

i learned some new things to:
<b>1</b>-At the top it will say your name, and your health...you health will decrease
<b>2</b>I learned the function Math.DistancePointLine...not to hard
<b>3</b>I got Window.Close to work...

to play, you must click on the targets, you may have to click on them once, twice or three times depending on how strong they are...(I set a randint of hitcounts)
You can get head shots, or body shots. To throw a bomb and kill them all, you must hit enter, but you only have 3 so use them wisely!
get 200 to win, 0 to lose
have fun!


*Edit- game is now updated

Author:  TheOneTrueGod [ Thu May 25, 2006 8:08 pm ]
Post subject: 

Uh... All that happens is the "bomb" rolls across the screen, kills everything, and once it gets to the right hand side of the screen it says I win. Not to mention the fact that I tried to hit the enemies before the bomb got there, and they didn't get hit...

Author:  upthescale [ Thu May 25, 2006 8:55 pm ]
Post subject: 

WOPS SORRY ...while i was testing the winning section, i fer got to change

code:

if score >=12 then
%Code
end if


to
code:

if score >=200then
%Code
end if

it is now updated

Author:  MysticVegeta [ Fri May 26, 2006 2:06 pm ]
Post subject: 

hey, cool game, nice graphics. Really liked playing it Smile

Author:  Vertico [ Fri May 26, 2006 6:03 pm ]
Post subject: 

it was fairly interesting Claping i give it two thumbs up Cool

Author:  upthescale [ Fri May 26, 2006 9:42 pm ]
Post subject: 

thanks guys

Author:  Anonymous [ Sat May 27, 2006 8:18 am ]
Post subject: 

All you have to do now is add a command, each time your computer gets hit, it deletes a random file on your hard drive =)

Author:  Darkmantis [ Sat May 27, 2006 8:44 am ]
Post subject: 

vahnx wrote:
All you have to do now is add a command, each time your computer gets hit, it deletes a random file on your hard drive =)
lmao, nice.

Author:  upthescale [ Sat May 27, 2006 2:47 pm ]
Post subject: 

even if i knew how to do that i still wudnt but good thinking lol

Author:  Anonymous [ Sat May 27, 2006 5:51 pm ]
Post subject:  Hehe

Here is some code that lists all the files in your directory of choice:

code:

% The "DirectoryListing" program.
var winID := Window.Open ("graphics:0;0")
var dir : string
setscreen ("text")
put "Enter a directory ('.' for current, '..' for back): " ..
get dir : *
put ""
var streamNumber := Dir.Open (dir)
var num : int
var fileName : string
var q : char
assert streamNumber > 0

for i : 1 .. streamNumber
    fileName := Dir.Get (streamNumber)
    put fileName
    exit when fileName = ""
end for

Dir.Close (streamNumber)

put "Press any key to exit " ..
Input.Pause
Window.Close (winID)
return


Look up on File.Delete if you wish to delete a random file. Possibly associate the File with a number, and count the numbers, then use Rand.Int to randomly select 1 of all the numbers, then File.Delete(fileName)!

Author:  jamonathin [ Sun May 28, 2006 10:55 am ]
Post subject:  Re: Hehe

vahnx wrote:

Look up on File.Delete if you wish to delete a random file. Possibly associate the File with a number, and count the numbers, then use Rand.Int to randomly select 1 of all the numbers, then File.Delete(fileName)!


<cough> eh hem <cough>

Author:  Anonymous [ Mon May 29, 2006 3:02 pm ]
Post subject: 

Hey I am just saying it's possible, and I didn't tell him how to use File.Delete or anything Twisted Evil

Author:  BenLi [ Mon May 29, 2006 4:11 pm ]
Post subject: 

hey i don't think your dir listing prog works, it keeps returning assert false

Author:  upthescale [ Mon May 29, 2006 4:15 pm ]
Post subject: 

File.Delete("Target.t")

so w/e the filename is u put it there right? to delre it?

Author:  Anonymous [ Mon May 29, 2006 7:47 pm ]
Post subject: 

Yeah, it deletes whatever the directory is. But it doesn't delete the folder. So let's say this:

code:

File.Delete("c:/program files/turing/turing_files.ini")


: