Computer Science Canada

LFS , a shooter game :D

Author:  iker [ Thu Nov 10, 2005 7:49 pm ]
Post subject:  LFS , a shooter game :D

Here is a shooter game that I made. Your computer has to be a not the fastest, but pretty fast to run it, I don't know why...

My computer suddenly stopped having memory when I was programming this game, dunno why, but its only 400+ lines long... And it flashes every once and a while, (if red, your hit), but it didn't before I compiled it...

If your planning on telling me there are collision problems, there aren't, its just the way it should be... Rolling Eyes

Chosing an alliance does not change gameplay, just the look of the game. I couldn't decide which one was cooler, so I included both

Anyways controls and instructions are in the game Very Happy plz comment

mod edit: fix your attachments
edit:attachment fixed

Author:  do_pete [ Fri Nov 11, 2005 11:27 am ]
Post subject: 

can't unzip the files.
WinZip said:The WinZip Wizard cannot open this file; it does not appear to be a valid archive.

Author:  iker [ Mon Nov 14, 2005 6:55 pm ]
Post subject: 

/\ /\ /\
| | |
fixed

Author:  MysticVegeta [ Wed Nov 16, 2005 7:48 pm ]
Post subject: 

Good game but there is a way to cheat in it, Stay down adn it cant hit you. Wink

Author:  jamonathin [ Thu Nov 17, 2005 1:28 pm ]
Post subject: 

Good Start. Question though, why do the trees teleport? hmm And why can we fly all around if the guy we attack stays on the same y-value. And I can never seem to kill the guy, i just kinda get points for hittin him.
What you should do next is have the enemies move all around, dont move the trees, acuzyou cant even see em at night, and use gravity for moving (if thats the right term. inc/dec acceleration). Such as, the longer you hold "up", the faster you will be going, and once you let go, it slows down. Somethin liek that.
Good work.

Author:  MysticVegeta [ Thu Nov 17, 2005 2:55 pm ]
Post subject: 

Now that you bring it up jamonathin, I was never able to kill the guy either. But I liked the game all i have to say, is make the alien go up and down, that way we cant cheat and stay down and hit cheap shots

Author:  iker [ Thu Nov 17, 2005 4:45 pm ]
Post subject: 

The trees only 'teleport' because its supposed to look as if your flying foreward, im fixing that, and im fixing the alien staying at one y level until you hit him, any other suggestions, just let me know

Author:  jamonathin [ Fri Nov 18, 2005 12:46 pm ]
Post subject: 

Here's what it should look like if yoru moving forward. You can do this with a couple extra things flying through the air or whatever. And i dont have time right now to explain it, maybe tonight, but here it see, maybe you can figure it out Razz.


I used yoru trees and background
code:
var back : int := Pic.FileNew ("day.bmp")
setscreen ("graphics:" + intstr (Pic.Width (back)) + ";" + intstr (Pic.Height (back)) + ",nobuttonbar,position:center;center,offscreenonly")
cls

var tree : int := Pic.FileNew ("daytrees.bmp")
var t : flexible array 1 .. Rand.Int(4,10) of
    record
        sizex, sizey, x, y : int
    end record
var scale : int
for i : 1 .. upper (t)
    t (i).y := Rand.Int (0, maxy div 2)
    t (i).x := Rand.Int (0, maxx)
    t (i).sizex := ((maxy div 2 + 30) - t (i).y) div 2
    t (i).sizey := ((maxy div 2 + 30) - t (i).y) div 2
end for

proc refresh
    cls
    Pic.Draw (back, 0, 0, picCopy)
    for i : 1 .. upper (t)
        t (i).y -= 7
        t (i).sizex := ((maxy div 2 + 30) - t (i).y) div 2
        t (i).sizex := ((maxy div 2 + 30) - t (i).y) div 2
        scale := Pic.Scale (tree, t (i).sizex, t (i).sizey)
        Pic.Draw (scale, t (i).x, t (i).y, picMerge)
        if t (i).y < t (i).y * -1 then
            t (i).y := maxy div 2
            t (i).x := Rand.Int (0, maxx)
            t (i).sizex := ((maxy div 2 + 30) - t (i).y) div 2
            t (i).sizey := ((maxy div 2 + 30) - t (i).y) div 2
        end if
    end for
    View.Update
    Pic.Free (scale)
end refresh
loop
    refresh
    delay (50)
    exit when hasch
end loop

Author:  iker [ Sat Nov 19, 2005 8:29 pm ]
Post subject: 

With all of your suggestions, I made the game beter. You can now kill the enemy, trees scroll down the screen and get bigger, the enemy moves up and down, but I did not use the 'gravity' that jamonathin suggested. I chose not too because I'm too lazy to think of a way to get different speeds.

aswell as incorperating your suggestions, I chose to add an enemy health percentage and when its health = 0% then you advance a level.

anyways, heres the update
|
\/ comments and suggestions as always will help

Author:  jamonathin [ Sun Nov 20, 2005 6:11 pm ]
Post subject: 

Good, the enemy moves around now, the trees dont teleport, and you can kill the enemy. Keyword 'can' not 'will'. I dunno about anyone else but it's friggin hard to hit him and time comsuming to kill that bugger. Maybe make the shots faster? I dunno, up to you.
And another thing, screen flashes. You're probaibly use View.Update/offscreenonly, good, now know when to use them. Where ever there is a delay, put the View.Update right before it. now in your game you should only have 1 delay because your game is pretty straight forward, but i can garuntee you that you have more than one View.Update or delay. (my money's on the View.Update). Stick to ONE View.Update and ONE delay. If need be, let variables represent delays.

For example:

- If you have a variable, lets call it 'number', and it's value is '0'

- And your delay is delay(10)

- BUT, you want your guy to delay, lets say delay (50).

- You can add to 'number' once every loop, and once 'number' gets to 5, it would be equivilent to a delay(50), thats when you can do whatever it is you need to do, and you reset 'number' back to 0.

Author:  iker [ Sun Nov 20, 2005 8:53 pm ]
Post subject: 

There is only ONE View.Update, but a few delays in the shot processes.
it only flashes because i have the dreaded processes running the shooting, and i didnt feel like creating a HUGE amount of lines.
The program draws the shot, then the pics and goes between those... I guess I could try and use some procedures instead of processes, but I'l be back with an update soon, maby...

Author:  iker [ Tue Nov 22, 2005 7:28 pm ]
Post subject: 

Actualy, I've decided to go 'high tech' and make the game 3D.
I'm using Zylums Engine, some pics are from windows, and its not completely finished.
The only thing is i decided to use a wireframe for the ship because you have to be able to see through it, and the program would run weird when its done too, so here is the just started game

any comments and suggestions will help

Author:  iker [ Wed Nov 23, 2005 9:38 pm ]
Post subject: 

LFS 3D is up and running! Its smooth, little to no slow down, has a more advanced, but shorter code then the first game.

Udates to last posted game
-No more wireframe (I figured out how to make the game without it)
-Enemies, levels, health, music, a startup page, a help menu, targeting

Here is the download
|
\/

again, comments and/or suggestions will help

Author:  jamonathin [ Wed Nov 23, 2005 11:32 pm ]
Post subject: 

Thats a pretty cool update to your game. You could probabily save space by not reloading the entire sunset image, and just the part that moves. But the game looks pretty good.

It's a work in progress, but there's one thing you gotta fix. The computer.
The computer reminds me of a cat in heat, runnin around with it's ass in the air. (i think your plane is facing the wrong way).
Overall, gj, keep it up.

Author:  iker [ Mon Nov 28, 2005 8:35 pm ]
Post subject: 

Can you say... MULTIPLAYER?... ONLINE?... TURING?... If you can't, then theres something wrong with you, or you're just a baby... anyways, I'm currently working on making LFS a multiplayer game, just testing it out with my friend right now over the net, and I'll have it posted as soon as we're done, or all the bugs are fixed (not too many though)Very Happy!

Author:  iker [ Mon Nov 28, 2005 8:50 pm ]
Post subject: 

Well, that was a failed attempt, probly because I'm on dial up, anyways, heres the program, fully working, minor bugs, but its turing...

If you think you know how to fix these bugs, PM me, and I'll send you the source if I trust in you...

Anyways, if you find it doesn't work, just open the game twice, and play yourself by typing in ether your IP or 127.0.0.1(your computers IP offline or something like that, basically connects to your computer through your computer instead of the net... i think)

here she is


: