Computer Science Canada

Top-Down shooter demo

Author:  CodeMonkey2000 [ Fri May 25, 2007 9:45 pm ]
Post subject:  Top-Down shooter demo

Here is a demo of a top-down shooter I've been working on. The code is a bit messy, but meh. I didn't include the bullet class, because it doesn't work properly. I'll finish it up when I get more time.

EDIT: Ok, the bullets work now but it's still a bit glitchy. Oh yea, it's w,a,s,d to move, mouse to aim, and click to shoot

Author:  DIIST [ Sun May 27, 2007 9:02 am ]
Post subject:  Re: Top-Down shooter demo

CodeMonkey2000 @ Fri May 25, 2007 9:45 pm wrote:

EDIT: Ok, the bullets work now but it's still a bit glitchy. Oh yea, it's w,a,s,d to move, mouse to aim, and click to shoot

Those bullets seem more like explosions. Confused
Try to make it so you can move in the direction you point. Other than that this game needs a bit of enemies. If there were any, i haven't run into them so far. But still overall a good start.

Author:  CodeMonkey2000 [ Sun May 27, 2007 12:41 pm ]
Post subject:  Re: Top-Down shooter demo

thuvs @ Sun May 27, 2007 9:02 am wrote:

Those bullets seem more like explosions. Confused

You need to download the file again. I added the bullets late last night Razz. And I initially did have the player move towards the mouse, but it wasn't as fun as moving up,down,left,right. This way is better because it's easier to strafe. I do have enemies, but I didn't include them in the demo, as the AI isn't working properly (right now it's an Artificial Idiot Razz).

Oh, and here's another update. The bullets are no longer glitchy and I added weapons. Press 1 to select shotgun,2 for pistol, 3 for machine gun.

Author:  Tallguy [ Mon May 28, 2007 7:56 am ]
Post subject:  RE:Top-Down shooter demo

what syestem u using for this program?? turing wont open it

Author:  rollerdude [ Mon May 28, 2007 9:43 am ]
Post subject:  Re: Top-Down shooter demo

.rar isnt a turing file, its like a .zip ... you need to download winrar, id give it to you, but my external drive is at home Sad

Author:  CodeMonkey2000 [ Mon May 28, 2007 4:10 pm ]
Post subject:  Re: Top-Down shooter demo

Here's a link http://www.rarlab.com/download.htm

EDIT: Here is, yet again, another update. The problems with collisions are fixed (you could walk through wall if you run diagonally). I added a map editor (It's a damn good one too if I do say so myself). To move the map press w-a-s-d, to place tiles, just click on your square. You can select different tiles from the side bar. If you want to test out your level, remember to save it as map2.txt
Comments are appreciated Very Happy

Author:  CodeMonkey2000 [ Mon May 28, 2007 7:45 pm ]
Post subject:  RE:Top-Down shooter demo

50 bits to the person who correctly guesses the method for collision I used for my bullets, and what it was initially used for.

Author:  DIIST [ Mon May 28, 2007 8:51 pm ]
Post subject:  Re: Top-Down shooter demo

Dunno the name but your checking if the object is in the same tile as another object or something along the lines. Dont know much about collision only that its hard to do collisions of polygons where sides are greater than 4. You have to use some weird summation trick, see if the number of points of one polygon resides in the area that the other polygon covers. That is its self another problem. Trying to figuring out wither a point lies inside or outside the polygon. My team used whatdotcolor and drawfillpolygon in CCC for that question. Drew it to an off screen buffer. Lol got away with it too. Saved our asses. Laughing

Author:  CodeMonkey2000 [ Wed May 30, 2007 8:09 pm ]
Post subject:  Re: Top-Down shooter demo

YEAH! I'm finally done the AI!! The enemies have 2 modes, patrol, and "kill the player at all costs". Since their aim is super perfect, I thought that they should go back to patrolling once they are off screen. I need some constructive feed back regarding the AI. Comments are appreciated Very Happy

Once the AI is fully functioning, I plan to allow the user to place enemies, and set patrol points (which will be using the map editor off course).

Author:  aramadia [ Wed May 30, 2007 9:56 pm ]
Post subject:  RE:Top-Down shooter demo

I'm just curious Code Money. Are you talking to me in your signature? Or are you talking about this: http://aramadia.googlepages.com/home

Author:  DIIST [ Thu May 31, 2007 6:31 am ]
Post subject:  Re: RE:Top-Down shooter demo

aramadia @ Wed May 30, 2007 9:56 pm wrote:
I'm just curious Code Money. Are you talking to me in your signature? Or are you talking about this: http://aramadia.googlepages.com/home
Laughing No he's really talking to all of us. To me that sig say "thuvs, please support open sourcing, because sharing is caring Very Happy ".

Author:  CodeMonkey2000 [ Thu May 31, 2007 9:07 pm ]
Post subject:  Re: Top-Down shooter demo

New update. I've added enemy sentries, and patrol points for them in my mapEdit. I've made some game play enhancements, everything looks smoother. For my next edit I plan to improve the AI and change my tiles (the current ones suck, expect for the water. ) This new map is pretty cool (IMO) and I've loaded it up with enemies. Enjoy!

Author:  DifinityRJ [ Thu May 31, 2007 9:24 pm ]
Post subject:  Re: Top-Down shooter demo

CodeMonkey, your code is impressive, not to mention your programming techniques. Absolutely amazing Very Happy

Good job. Mr. Green

Author:  glani05 [ Fri Jun 01, 2007 6:42 pm ]
Post subject:  Re: Top-Down shooter demo

imm really struggling with my shooter, can i use urs as a reference?

Author:  CodeMonkey2000 [ Fri Jun 01, 2007 6:47 pm ]
Post subject:  RE:Top-Down shooter demo

You may, but you might have a tough time understanding it, since I'm not commenting at all (I hate commenting, it's a waste of memory Razz).

Author:  CodeMonkey2000 [ Fri Jun 01, 2007 10:00 pm ]
Post subject:  Re: Top-Down shooter demo

Save this code into the file classes. I'm thinking about adding this as a flame thrower; this is a test, and I need feed back on weather or not I should include it or not. (As some of you can see, it bares resemblance to shoobyman's and windsurfer's particle systems.)
Turing:
import "particleClass.tu"
View.Set ("offscreenonly")
var myParticle : ^particleSystem
var x, y, b : int
new particleSystem, myParticle
colourback (black)

loop
    Mouse.Where (x, y, b)
    if b > 0 then
        particleSystem (myParticle).atributes ((maxx div 2 - x) / 10, (maxy div 2 - y) / 10, yellow, 250, 5, 1000)
        particleSystem (myParticle).execute (8, x, y)
    end if
    particleSystem (myParticle).RunParticle
    View.Update
    Time.DelaySinceLast (round (1000 / 30))
    cls
end loop

Author:  DifinityRJ [ Fri Jun 01, 2007 10:25 pm ]
Post subject:  Re: Top-Down shooter demo

Yes, you should include this in your game, the particles make your game more enjoyable (in my opinion). Good job Exclamation

Author:  CodeMonkey2000 [ Fri Jun 01, 2007 10:48 pm ]
Post subject:  RE:Top-Down shooter demo

The particles are in the game. Everytime you shoot a wall or someone gets shot, those effects are called by the bullet class. But the problem is that the collision will be tough. And it is too much work for just one weapon. The particles also slow down my game (on my crappy comp anyway). And there is nothing I can do to reduce it. I'm not sure if I it's worth the extra effort, since it won't work well on my comp (or the school's comp) Sad

EDIT: Minor update. I added a bunch of new tiles. And the mapEditor has also been updated. Next I need to add triggers (pick up red key, red doors open, step on certain tiles, and the mission is over), and a way to change maps (ie. enter buildings, exit buildings etc...)

Author:  DifinityRJ [ Sat Jun 02, 2007 10:35 pm ]
Post subject:  Re: Top-Down shooter demo

Ooh, these new tiles spice up your game a lot more. Hope to see more. Smile

Author:  DIIST [ Sun Jun 03, 2007 6:53 am ]
Post subject:  Re: Top-Down shooter demo

Laughing Their all over the place. I cant hide anywhere. How do you kill these guys.

Good Job, i see a lot of improvement from the previous game. You need to fix the player collision. For some odd reason i can pass through the enemy. Other than that, the tiles look great. An the graphics , a definite boost. Still would be nice to move in the direction you are pointing though. Another think to think about is reading the map as a square (like a matrix). I swear, it will be easier to edit that compared to you current map file which is a number per line.

What i mean is write you map like this:
1 1 0 0 0 1 1
0 0 0 0 0 1 1
1 1 1 0 0 1 1
0 0 0 0 0 1 1

Its just easier to look at that. Than a number per line. Your map editor is quite dandy though. Should set limits or cost so the user doesn't go bezerk and put brick wall all over the place. Wink

Author:  CodeMonkey2000 [ Fri Jun 29, 2007 1:58 pm ]
Post subject:  Re: Top-Down shooter demo

Update: I added a few new tiles, triggers (pick up red keys, open up red doors, pick up green keys, open green doors etc.), and to win a level you must step on the green tile with a black arrow pointing down. You can go in and out of maps (there is only 1 level, and it includes 5 different maps). Enemies die, you can die. I need to add health/ammo pickups. Till then you get infinite ammo and 6 time the health so it shouldn't be that hard to beat the level.

Controls:
w-a-s-d to move
mouse to aim and shoot
1 for shot-gun (everyone dies in 1 shot Very Happy)
2 for pistol (everyone dies in 4 shots)
3 for machine gun (everyone dies in 5 shots, but fires quickly)

Author:  CodeMonkey2000 [ Fri Jun 29, 2007 2:02 pm ]
Post subject:  Re: Top-Down shooter demo

Update: I added a few new tiles, triggers (pick up red keys, open up red doors, pick up green keys, open green doors etc.), and to win a level you must step on the green tile with a black arrow pointing down. You can go in and out of maps (there is only 1 level, and it includes 5 different maps). Enemies die, you can die. I need to add health/ammo pickups. Till then you get infinite ammo and 6 time the health so it shouldn't be that hard to beat the level. Oh an I turned up the blood a bit, and slow the game down to 15 frames a second.

Controls:
w-a-s-d to move
mouse to aim and shoot
1 for shot-gun (everyone dies in 1 shot Very Happy)
2 for pistol (everyone dies in 4 shots)
3 for machine gun (everyone dies in 5 shots, but fires quickly)

Author:  DifinityRJ [ Sun Jul 01, 2007 3:29 pm ]
Post subject:  Re: Top-Down shooter demo

That is awesome, good job. You should add in different types of enemy that do melee damage instead of shooting a gun. Also waiting on your new Tutorial for 2d mapping. If you get some time for it.

Author:  CodeMonkey2000 [ Mon Jul 02, 2007 5:04 pm ]
Post subject:  RE:Top-Down shooter demo

How does an 8 player death match sound?

Author:  DifinityRJ [ Mon Jul 02, 2007 8:59 pm ]
Post subject:  Re: Top-Down shooter demo

That sounds pretty exciting, but one question, is it through the Net or LAN or neither?

Author:  CodeMonkey2000 [ Tue Oct 02, 2007 9:12 pm ]
Post subject:  Re: Top-Down shooter demo

Here is the final version of the game (I finished this a long time ago, but meh), it's officially called wolfenstein 2D now. There are only two levels in it, I really don't feel like adding more. I added a map editor, so if you want to make more levels feel free to do so (I might even give bits for really good maps Very Happy).


: