Try my two player shooter(console game)

first game I've created, call it BattleByte. Pretty proud of my own work i did, if anyone wants to try it feel free!! heres a link to my dropbox that holds the file(its a .rar so you'll need a program to unzip it.)
http://dl.dropbox.com/u/78573135/BattleByte1.09a.rar

Feel free to tear my work to shreds and tell me every flaw about the game!

**Update**
-improved the game thanks to the helpful input below

         [] The game no longer takes bad input as a turn(discards and waits)
         [] Removed I's and replaced with white spaces for easy recognition

-added the project for easy access to source code(code::blocks)
Last edited on
I'm not a big fan of text based games but it's not bad. It is a little difficult for me to see the characters with the I's as the background, is it possible to use spaces? Any plans to convert it to using a graphic lib? I haven't looked at the source yet so I cannot comment.
Eventually yes, ill use SFML and openGL to create a graphical version of the game. And im also looking into giving the characters color or making them more obvious, i do hear a lot that they are hard to see. Thanks for trying it!
Just some things that I noticed was that when making moves, anything that isn't wasd or g counted as a turn, and it looped through the turns very fast. It took me seriously like 5 turns before I realized that <UP> didn't mean press up -.-

Aside from that, same thing that naraku9333 had said, the I's make it very hard to read the board. Also, have you thought about using special characters instead of just typical print characters? A Square block for impenetrable wall, maybe a spade for a wall that can be shot, and maybe the two smiley faces for the people? Just thoughts. Anyways, not a bad game.

I'd look into the instructions page a little more, try to condense it or break it into two pages. It scrolled down on me and I had no idea how much text had scrolled past me.

P.S. Use my menu ;)
Updated link and fixed some stuff, i appreciate the help!
nice i liked it,
suggestion : arrow keys - e.g.
Up- control code : 224 keycode : 27
you can use two getch to implement this one for control
other for keycode if user presses ascii key control is the ascii value,
this is just a raw idea, try to implement it
anyways nice game
getch() is not standard and shouldn't be used. Use windows specific Virtual Keys and use Duoas example on how to use a proper getch():
http://www.cplusplus.com/articles/iw6AC542/

It's hard to use a standard keyboard capture function, but his examples show the best ways to do it.
Dude! Its AWESOME!
Two questions:
1. How would I compile the source code with mingw?
2. Would you mind if I added basic AI to the game?
(http://www.cplusplus.com/forum/lounge/73972/)
thanks for the reply guys, ill look into making those controls easier to use and read.

script coder--
1. using what compiler? i use code::blocks

2. not at all, feel free to use the game however you want its completely open source. If you add AI in defiantly show me, sounds like an awesome idea
I am using the MingW compiler :P
@Volatil getch() is not standard i know , but isn'n windows vitual keys also o\s specific,
It is not so hard to do that with getch()
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
do
    {
        switch(int a=getch())
        {
        case 224:
            switch(int b=getch())
            {
            case 77: //right
                {
                    right_key_pressed();
                };
                break;
            case 80: //down
                {
                    down_key_pressed();
                };
                break;
            case 72: //UP
                {
                    up_key_pressed():
                }
                break;
            case 75: //left
                {
                    left_key_pressed();
                };
                break;
            }
            break;
        default:
         key_pressed(a);
            
    }
    while(!exit);

P.S : I'm a beginner, i may be wrong somewhere..
Last edited on
in this game we can only shoot in one direction,it should be better if it was multidirectional..
@amhndu
Yes, virtual keys are windows specific, but so is what you posted. The difference between the two is that every compiler will handle virtual keys exactly the same way, but this is not true for getch() since it is not standard. I learned about the differences upon reading the articles on this site from Duoas. You can also make it more portable by enabling keyboard handling for *NIX systems as well. I haven't gotten far enough to try it myself yet though.

@Need4Sleep
Have you run into any problems or needed any help with the code thus far? I'm no expect, but I might be able to offer some insight into problems. Sometimes it helps to just have a fresh pair of eyes.
That was great job! gj
Topic archived. No new replies allowed.