Click to See Complete Forum and Search --> : VB: 2D Counter Strike [Source]
alexDrewn
May 20th, 2004, 12:54 AM
this is an alpha version of a game im working on.
Its a 2d version of counter strike.
I've been working on it for the last 4 months and this is all I've gotten done so far. I still need to fix wall collision,add bullet collsion, weapons, a score menu, and a buy menu.
It is important to run the game at 1024x768.
please leave comments.
How to host a game:
1.Click host
2.choose a team
3.Press escape and give the IP address that is in the IP address box to other players
How to connect to a game:
1.enter the server IP in the IP address box.
2.click add IP
3.click connect
4.choose a team
Controls:
W,A,S,D and SPACE
*UPDATE 10/3/04*
I've zipped the code, exe, and map editor together.
No game updates though.
Map editor located in the maps folder.
*UPDATE 7/8/05*
Check out www.cs2d.com for a really good 2d
counter-strike game.
Look for a demo of a new game Im working on soon.
BodwadUK
May 20th, 2004, 04:05 AM
After an incident that i wasnt around to witness nobody runs exe's anymore. people have a tendancy to be evil and write programs to destroy other peoples pc's.
:)
jonask
May 20th, 2004, 04:30 AM
Yes, I totaly agree with BodwadUK. It's not smart to just post an exe file, people can't be to safe these days ;) and besides, if you don't post your code, how are we supposed to learn anything from your writing, or help you out with your code. Post the code too, so people can se what you've written =)
Cheers
BodwadUK
May 20th, 2004, 05:49 AM
I ran it and it seems ok :)
Electroman
May 20th, 2004, 07:34 AM
Posted by BodwadUK
I ran it and it seems ok :) :rolleyes:
Well I suppose I will run it now ;).
Electroman
May 20th, 2004, 07:38 AM
Nice:), mind I didn't have anyone to play with :(.
BTW you're not clipping the tiles at the edge. And also you not clearing the back buffer I can see (this isn't a problem but that how I could tell you weren't clipping the edges ;) )
Merri
May 20th, 2004, 08:14 AM
Add Esc support to credits. Please.
NoteMe
May 20th, 2004, 09:15 AM
The sprite for the guy is not changing when you are running uppvards and shoot like in the other directions...
alexDrewn
May 20th, 2004, 06:01 PM
Electroman , did you run the game at 1042x768?
if you have higher res, then you might see the back buffer around the edges.
Good idea merri, thanks.
The sprite might not be changing frames right because i didnt make the animation time based.
Electroman
May 20th, 2004, 06:37 PM
Posted by alexDrewn
Electroman , did you run the game at 1042x768? There was an option :confused: My desktop id at 1280x1024 I suppose that could be it, mind I advise you do it properly and clip the edges, means you don't nne to do as much painting too ;)
NoteMe
May 20th, 2004, 07:04 PM
Originally posted by alexDrewn
The sprite might not be changing frames right because i didnt make the animation time based.
What I ment was that if you hold the shooting button down when you are moving in a direction, h puts the gun to his sholder and shoot, that does not happen if he run upwards...;)
alexDrewn
May 21st, 2004, 12:54 AM
What do you mean clip the edges? Do you mean I shouldnt draw the tiles that arent going to be seen?
Yea I didnt feel like adding a shoot upward animation. The art is done, unless i pay someone to draw some really good sprites for me.
Has anyone played with other people yet?
If you run the game at 1024x768 the frame rate will dramatically drop.
Heres the code, theres a map editor in the maps folder:
Electroman
May 21st, 2004, 07:08 AM
Posted by alexDrewn
What do you mean clip the edges? Do you mean I shouldnt draw the tiles that arent going to be seen? I mean the Tiles are part on and part off the edges will not get drawn because in the Blt routine if the operation your doing doesn't fit on the surface it just ignore the whole operation and doesn't draw any of the tiles.
So what you do is alter the DestRECT to make sure its not going off the surface, then you alter the SrcRECT to select just the portion of the image that goes into the size of the DestRECT you now have.
Did that make sense? I know I probably didn't word it the best I could do but I didn't know how much detail I should go into cos I don't know how much you know ;).
Posted by alexDrewn
Has anyone played with other people yet?
If you run the game at 1024x768 the frame rate will dramatically drop. Are you saying even though i'm running it at a higher res now that if I put the res down to 1024x768 then it'll run slower? It actually runs at a good speed how it is anyway ;).
alexDrewn
May 21st, 2004, 03:26 PM
Sorry I still dont understand. I draw only part of the tiles that line the top and left side of the screen. If you run at a higer res than 1024x768, youll see that the very top and very left tiles are only a fraction of a full tile. And that the right and bottom tiles are full times.
But the game is messed up at a higer res than 1024x768, because the game doesnt fill the whole screen.
I meant to say any higher than 1024x768 will have bad frame rates, at least when playing with someone else for some reason.
Electroman
May 21st, 2004, 03:41 PM
Ow, what post does it use BTW for the multi player? just becuase I would need to allow my Firewall to unblock it if I played it online.
alexDrewn
May 21st, 2004, 03:48 PM
Do you mean port?
It uses port 7118 if that port isnt being used. If it is being used it will try the next port and so on until it finds a unused port.
The game only works through LANS
Electroman
May 21st, 2004, 04:05 PM
Yeah I meant port, dunno what I was thinking. Only works on LANs :sick: how come :(, I only have the one monitor so that wouldn't really work for me :(.
alexDrewn
May 21st, 2004, 04:09 PM
i dont know how to make it work through the internet.
or maybe you can make it work throught the net.
Could I play with someone over the net if I know only their IP?
Electroman?
alkatran
May 22nd, 2004, 01:24 PM
If you know their IP and they know you want to connect, then yes, you can play through the net. The basic idea is:
-Person 1 tells port X to listen
-Person 2 sends connect request to person 1's ip on port X
-Person 1 receives request and accepts (or denies) the connection
-Person 2 receives confirmation of acceptance and the connection is officialy established
BodwadUK
May 24th, 2004, 03:30 AM
AKA its the same as a LAN :D
Tekken
Aug 18th, 2004, 11:32 AM
I'd love to try the game, but a little problem... It won't run, When I try to open the file i get
Compontent 'MSWINSCK.OCX' or one of its dependencies not correctly registered: a file is missing or invalid
What os are you using? I'm on XP and no really wierd programs installed so its not likely to be software conflict.
Possibly this just won't run on XP (High Technology my ( | ) )
alkatran
Aug 18th, 2004, 11:52 AM
That's a standard error.. you don't have the winsock .OCX
Search for that file on the internet, it's not very hard to find.
Electroman
Aug 18th, 2004, 01:01 PM
Posted by Tekken
I'd love to try the game, but a little problem... It won't run, When I try to open the file i get
What os are you using? I'm on XP and no really wierd programs installed so its not likely to be software conflict.
Possibly this just won't run on XP (High Technology my ( | ) ) You do have the VB IDE installed on that PC? The ocx file would have came with it ;).
BodwadUK
Aug 19th, 2004, 03:26 AM
Or install the vb6 runtimes from microsoft. I am sure they said the OS came with them as standard but there we go :D
d3graph
Oct 20th, 2004, 02:21 PM
good work
i got a bug
when we fire gunshot remain on screen
see attched image
alexDrewn
Oct 20th, 2004, 05:38 PM
Thanks D3,
Thats just a muzzle flash though. I never got around to adding bullets yet.
I havent worked on this game for a long time im really busy with school. Digipen is really tough this year.
Im thinking about porting the game over to c++ and using D3D.
I've attached my lastest build. If you have winsock errors, run the winsock program that I have included. DO NOT RUN the winsock program if you have no errors.
Collision is also really F'd up.
The most people I've had connected was 4, and it only lastest about 8 minutes before the game crashed. But it was awesome while it lastest. Even thougt all we did was run around.
RickP
Oct 23rd, 2004, 07:27 AM
Very impressive. I once had this idea as I love counter-strike. It looks like you draw the gun seperate from the player, is that true? It would almost have to in CS. Also are you using DX? It seems not with all the windows controls you show. If you aren't you most likely show as that would run faster. The dust layout isn't there. Seems maps will be limited due to the fact that multiple levels would be hard to pull off, though not impossible. I think this is one of the reasons I didn't follow through.
Where did you get that sprite of the CT? I like it. I might pick up on making a version of this game still.
toughcoder
Oct 23rd, 2004, 11:29 AM
Hello alexDrewn,
Excellent work buddy.:thumb:
I was able to play the game on LAN with 3 guyz, was gud but crashed after some time. Have some suggestions.
1. The game doesnt displays the whole map. On my sys. on 1024x768 resolution, only half the screen contained the map, the other half was blank. When i moved onto my right, then the map was displayed on the right.
2. Also, its not catching diagonal keys like DOWN+RIGHT keys. U can do that pretty easily so that the character moves diagonally.
3. Also, on my sys. with a RADEON SAPPHIRE 9800 PRO, the frame rates were pretty dismal. U can do better than that.
4. And last, chk why the hell is it crashing. Mayb some overflow or memory leak.
Overall, a good attempt. 3 cheers & 4 stars (****) :afrog:
alexDrewn
Nov 25th, 2004, 01:09 AM
Dont know why only part of the screen appeared at first.
I dropped frame rates on purpose. It's a temp fix to limit how many frames are being sent to the server or clients.
Girvo911
Dec 14th, 2004, 10:59 PM
Hey, nice game. It runs well on my cmouter, but the screen problem is there for me as well. It doesnt display the whole map, until i walk into the other side. its weird. aside from that, good game. Keep at it.
emanz
Jun 6th, 2005, 10:28 PM
i cant play it coz the load_winsock file doesnt work????
it keeps on saying
"runtime error '76'
path not found
wat do i do now????
emanz
Jun 9th, 2005, 08:25 PM
i downloaded the winsck.ocx file but it keeps saying the same thing that the file is missing????????
wat up wit dat?????
Nove
Jun 9th, 2005, 09:27 PM
Did you put in your system/system32 folder?
emanz
Jun 12th, 2005, 06:41 PM
then wat do i do afta dat?
emanz
Jun 12th, 2005, 06:43 PM
hey nove u ran the game yet???
Nove
Jun 12th, 2005, 06:59 PM
No, I haven't looked into it. Are you sure you downloaded the right .ocx and that it's in the correct folder? If you have and it still isn't working, you may need to register the control. I forgot the program for this but I can look it up if you need it.
BodwadUK
Jun 13th, 2005, 03:18 AM
Command prompt
regsvr32 "winsock.ocx"
:)
Y Anderson
Jul 4th, 2005, 12:17 PM
damn i smell some major profit from a phone game, but i suggest chaning it to not include the words "counter strike" else sierra might bring down some sort of law suit
Nove
Jul 4th, 2005, 02:25 PM
Cell phones run VB applications now?
BodwadUK
Jul 5th, 2005, 03:42 AM
What have you all been smoking? :sick: :confused:
chemicalNova
Jul 8th, 2005, 01:52 PM
Cell phones run VB applications now?
No, but PDA's do. :P
chem
asgsoft
Jul 11th, 2005, 06:01 PM
you can add a built in screen resilon setter?
Nove
Jul 17th, 2005, 01:28 PM
I thought PDA's had their own operating system, how would that run a Windows application?
BodwadUK
Jul 18th, 2005, 04:07 AM
You can but it needs a slight change to your methods :)
feneck
Aug 21st, 2008, 03:36 AM
(very nice app/game ^.^)
The only code I know of that runs on phones is Java :S and i hate java lol... so sluggish and old... yet people seem to use it :S
psychotomus
Sep 5th, 2008, 03:47 PM
I use to have a PDA and it ran my vb6 programs. i needed a vb6 add-in though.
Hlinzi
Oct 15th, 2008, 10:25 AM
Nice!
ohailo
Dec 2nd, 2009, 02:55 AM
DAMN...why if we go to lan games then connected each other...we cant be enemies....we cant shot and die...sorry for bad english...can anyone help this?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.