Thread: Name this game...

  1. #16
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Quote Originally Posted by medievalelks View Post
    White space is good, but those comments are redundant and grating on the eyes. Tell me what the comment above
    Code:
    if (userInput == 'q') { quit = true; }
    adds to that perfectly understandable code?

    All of those comments are unnecessary.
    Indeed, not all those comments are needed. But I have never looked at a piece of code in my life and been like, geez these people commented too much. Now the reverse is very much true. I would rather people say you over comment than under comment. Since I picked up this style of commenting, I have yet to look at an old piece of code and not be able to jump right into it. Also I disagree on the grating of the eyes, but that is just a style preference like everything. I personally think this is grating on the eyes, but through some comments and spaces it looks good to me
    Code:
    int x = 10;
    int y = 10;
    int c = 10;
    string z = "Hello";
    bool isLooping = false;
    Woop?

  2. #17
    Dr Dipshi++ mike_g's Avatar
    Join Date
    Oct 2006
    Location
    On me hyperplane
    Posts
    1,218
    The problem I find with using lots of comments is that the useful ones get lost in a swamp of inane dribble that just repeats in english what the code does. Also I like my code compact, I'd rather have things a bit more squashed together than have to scroll 6 miles down to find what I want, but thats just my personal preference. As for using descriptive variable names I find that makes code much easier to read.

  3. #18
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by mike_g View Post
    The problem I find with using lots of comments is that the useful ones get lost in a swamp of inane dribble that just repeats in english what the code does. Also I like my code compact, I'd rather have things a bit more squashed together than have to scroll 6 miles down to find what I want, but thats just my personal preference. As for using descriptive variable names I find that makes code much easier to read.
    The biggest problem with comments is that they are notorious liars. Pathological even. Oh, they may tell the truth at first, but sooner or later they'll start fibbing when the code they adorn is updated, and they are not.

  4. #19
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    What's the point of the red?
    Quote Originally Posted by prog-bman View Post
    Code:
        //
        //Will be used to hold the player position
        //

  5. #20
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    Whenever I comment something that is spanning more than one line I do that
    Code:
    //
    //Initialize the players location on the screen
    //
    int playerX = 10;
    int playerY = 15;
    int playerZ = 1;
    I find that this looks good. It really is just a style thing though. I am a big commenter and I really can't help it.
    Woop?

  6. #21
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179
    Okay, so now I fell we've heard both sides and I think this just goes to show that comments are a stylistic choice and what you do with them is your business. You can state your opinion or preference, but state it as such when you do.

    I hope we're all a little more enlightened.

    That aside, I think I'm going to go with Shox, but I'm going to use jEssYcAt's , edited slightly:
    Quote Originally Posted by jEssYcAt View Post
    Checking into work at Shox biotech/robotic engineering labs you discover the mutated creatures have escaped their cages and are making their way out of the building. Not 100% prepared for such a task you have only limited ammunition, but you only have to hold the tide of creatures back until reinforcements arrive (which is in approximately 10 levels). You set up a perimeter and deploy the containment protocol bot which runs around the perimeter and shoots at the creatures. You initially can only find slightly more ammo than the bot needs, but are sure you can find more as it moves from one room to another.
    Should I make the ammo nets so that we're capturing and not killing?
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

  7. #22
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Quote Originally Posted by guesst View Post
    Should I make the ammo nets so that we're capturing and not killing?
    Sure, if it assuages your conscience, but have you seen what people are playing nowadays? I see no problem with greasing mutant animals.

  8. #23
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179
    Quote Originally Posted by medievalelks View Post
    ...have you seen what people are playing nowadays?
    Yeah. Wii and DS, with almost no mutant splatting games (Resident Evil IV, I think is about it) own the dominant market share. Sorry, but believe it or not, despite the fact that those making the games like grizzled space marines and dark corridors for those playing the game "family fun" is the game d'jour.

    And quite frankly it's the sort of thing I enjoy. I should PM jEssY cAt to see what they think.
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

  9. #24
    Registered User
    Join Date
    Apr 2008
    Posts
    890
    Nothing wrong with family fun game, I just thought that since they were mutant animals...

  10. #25
    verbose cat
    Join Date
    Jun 2003
    Posts
    209
    Quote Originally Posted by guesst View Post
    Okay, so now I fell we've heard both sides and I think this just goes to show that comments are a stylistic choice and what you do with them is your business. You can state your opinion or preference, but state it as such when you do.

    I hope we're all a little more enlightened.

    That aside, I think I'm going to go with Shox, but I'm going to use jEssYcAt's , edited slightly:

    Should I make the ammo nets so that we're capturing and not killing?
    Both. This company works with more than one kind of animal afterall.

    Some of them are not much more than lab-rats that have mutated beyond good sense and are the size of tow-trucks. You definitely want to kill these since if they get out, they will not be very family friendly. These are the majority of what will be coming out of the building.

    Some of them are are a little more exotic, like minks, leopards, chimpanzies, etc. and the company would like to capture them rather than kill them. If it comes down to it however, the expense of paying settlements to the families of anyone they kill is more than the value of this group, so if you can catch, use the nets, otherwise kill them. You might see one of these for every 15-20 of the Tow-truck-rat-creatures. Some of the larger creatures in this category won't die from a single shot either, but will slow it down, so some of these can safely be shot once to slow them down enough for the net to work.

    And then there are a few that escaped the bio-lab's deepest, darkest reaches. Some of these are worth more than Bill Gates, and some of them contain strains of disease that have no known cure. For the former, the company would frown upon you killing them and would rather pay settlements to families than have to go through the expense and time of re-creating them. If you kill too many, you may end up replacing them... For the latter, you put a hole in one of their hides and you infect the western half of the United States with something that makes the Super-Flu from Stephen King's "The Stand" look like spring allergies. Use the nets! Some of the bigger variety in this group will walk right through a net, so firing multiple nets is a must. You probably won't see any of these until the later levels, and then only one or two for every 50 or 60 of the tow-truck-rats.

    As far as "family oriented entertainment" goes, I am a parent of a 5 year old and a 1 year old (both boys). If this was going to have graphics the likes of Resident Evil, I would keep my kids away from this game until they are quite a bit older. My 5 year old snuck down the stairs just out of eyesight one night while I was watching a scary movie with my other half. I don't remember which movie it was, but it was graphic and he had nightmares for a couple nights after that, and he's still afraid of monkeys.

    However, if this is going to be text graphics with the monsters being different letters or symbols to represent each type and the extent of a "kill shot" is the bullet collides with the monster and the monster disappears, then I would happily let my older son play this game. (My 1yo would mostly press random buttons and not get anywhere.)

    At the core of the game, it requires some thought about resource management since you have limited ammunition, and it requires some strategic thought about whether to shoot bullets or a net. These are things that I certainly don't have a problem with my kids learning. If I describe things to him as "You are shooting at monsters, but some of the monsters you have to use nets", he is good to go once he learns which monsters need nets and which can use bullets. He doesn't need all the extra of "tow-truck sized rats" and "super-flu-carrying-genetic-monstrosity", but those things make it interesting for those of us who won't have nightmares.

    You could then assign 2 "fire" buttons. One would fire bullets, the other would fire nets. You could also leave "powerups" layout around that would enhance the net gun (now one net could hold a big guy) or allow you to fire faster. Perhaps a whistle that when blown will attract all the mosnters nearby to come directly toward you, useful when one or more has gotten past you and close to escaping. And of course, even a simple security bot has a blade for close-quarters combat to protect itself (and to make a last ditch effort when the user squanders all the bullets).

    And finally, feel free to use any idea I have posted thus far in any way you like. If I had more time, I would try to make a stab at something like this with ncurses graphics since I know almost nothing about 2- or 3-d graphics yet for lack of ever looking into them. I would be interested to see what you come up with however.
    abachler: "A great programmer never stops optimizing a piece of code until it consists of nothing but preprocessor directives and comments "

  11. #26
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179
    Quote Originally Posted by jEssYcAt View Post
    sniporama
    And finally, feel free to use any idea I have posted thus far in any way you like. If I had more time, I would try to make a stab at something like this with ncurses graphics since I know almost nothing about 2- or 3-d graphics yet for lack of ever looking into them. I would be interested to see what you come up with however.
    Ha ha, I'm afraid you've seen is what I'm going to come up with, more or less. While I'll admit there's a lot that can be done this program, like all of them on Cymon's Games, is more for showing people what can be done (with curses in this case), providing a framework, and keeping it simple. You've clearly been inspired by it. But as for these modifications and additions, well, I'll let you handle that.

    RobotEscape was another good one for inspiration (IMHO), but unfortunately was harder to understand how it worked, so it probably won't result in many code forks.
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

  12. #27
    Super unModrator
    Join Date
    Dec 2007
    Posts
    321
    Damn! Looks like build-essential does not come with curses.h

    I get errors while compiling.

  13. #28
    Registered User guesst's Avatar
    Join Date
    Feb 2008
    Location
    Lehi, UT
    Posts
    179
    Quote Originally Posted by abh!shek View Post
    Damn! Looks like build-essential does not come with curses.h

    I get errors while compiling.
    Ubunutu. You have to install curses on Ubunutu. I use PDCurses on my windows build, but in Linux I think NCurses is the standard, tho I've heard whisperings that something called libncurses5-dev has everything you need.

    Just an update: Shox is now up on Cymon's Games with jEssY cAt's story.
    Type-ins are back! Visit Cymon's Games at http://www.cymonsgames.com for a new game every week!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how do the game engine and the api interact?
    By Shadow12345 in forum Game Programming
    Replies: 9
    Last Post: 12-08-2010, 12:08 AM
  2. Open Source / Semi Open source game idea. Help needed
    By CaptainPatent in forum Projects and Job Recruitment
    Replies: 10
    Last Post: 05-16-2007, 10:44 AM
  3. game engine advice?
    By stien in forum Game Programming
    Replies: 0
    Last Post: 01-23-2007, 03:46 PM
  4. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM