Oh shnap, i made a game

This is a discussion on Oh shnap, i made a game within the C++ Programming forums, part of the General Programming Boards category; This is my first game!... actually, I've done plenty of games before... but most of them were either AS-flash or, ...

  1. #1
    Registered User
    Join Date
    Oct 2004
    Posts
    12

    Oh shnap, i made a game

    This is my first game!... actually, I've done plenty of games before... but most of them were either AS-flash or, really crappy projects that weren't succesfful


    So, this game here, to me is an accomplishment.

    I've created a pacman game, except, i should call it "lame" pacman.

    The ghost AI is completely randomized:
    it picks a way, and it keeps going that way. whenever there is an oppurtunity to turn, it uses a 2/7 random number to decide wether to turn or not.
    Once it hits a wall, then it randomly picks either left or right to turn, and then just restarts it's walking.

    Also, there is no Cherry, no 2nd level, no "pick this up and eat the ghosts [all though i prepared for this, but never got to coding it]"

    And, the fact, that it's ASCII..



    BUT, I'm still proud of this, and I just want to see what you guys say about it


    P.S. oh yeah, I haven't done C++ for like, 2 years

    edit: pluss, no tutorial either.. all by myself [if you cant tell yet, im proud of this]
    Attached Files Attached Files
    Last edited by s3abass; 10-10-2004 at 05:28 PM.

  2. #2
    Registered User
    Join Date
    Oct 2004
    Posts
    25
    Cool game;
    Constructive critique: sometimes the "eaters" are a bit dumb and don't eat you

  3. #3
    Software Developer jverkoey's Avatar
    Join Date
    Feb 2003
    Location
    University of Waterloo
    Posts
    1,903
    Awesome job Now if you feel you've got C++ down pat, you should move on to API's like OpenGL or Win32.

  4. #4
    Registered User
    Join Date
    Oct 2004
    Posts
    12
    Quote Originally Posted by karb0noxyde
    Cool game;
    Constructive critique: sometimes the "eaters" are a bit dumb and don't eat you
    Because, the collision function checks if you are on the exact same place at the same time

    so if you were standing under one, and he moves down at the same time you move up, then you will be teleported up one unit and he will be teleported down one unit, and there being no collision.




    Awesome job Now if you feel you've got C++ down pat, you should move on to API's like OpenGL or Win32.
    I've tried that before, but that stuffs hard... lol

  5. #5
    Registered User
    Join Date
    Oct 2004
    Posts
    25
    Quote Originally Posted by s3abass
    Because, the collision function checks if you are on the exact same place at the same time

    so if you were standing under one, and he moves down at the same time you move up, then you will be teleported up one unit and he will be teleported down one unit, and there being no collision.






    I've tried that before, but that stuffs hard... lol
    It's quite good anyways

  6. #6
    Super Moderator
    Join Date
    Sep 2001
    Posts
    4,913
    An easy solution - change the collision function to check if the locations are separted by one unit.

  7. #7
    VA National Guard The Brain's Avatar
    Join Date
    May 2004
    Location
    Manassas, VA USA
    Posts
    903

    Smile

    Quote Originally Posted by karb0noxyde
    Cool game;
    Constructive critique: sometimes the "eaters" are a bit dumb and don't eat you

    as a caveat (i think that's spelled right) to what karbonoxyde is saying.. i think you could give the ghosts an 'orientation' towards pursuing pac man... instead of just random left/right on collision.. perhaps maybe a 60/40 chance on beginning levels.. and maybe like 70/30 on higher levels. Game looks good overall
    • "Problem Solving C++, The Object of Programming" -Walter Savitch
    • "Data Structures and Other Objects using C++" -Walter Savitch
    • "Assembly Language for Intel-Based Computers" -Kip Irvine
    • "Programming Windows, 5th edition" -Charles Petzold
    • "Visual C++ MFC Programming by Example" -John E. Swanke
    • "Network Programming Windows" -Jones/Ohlund
    • "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
    • "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel

  8. #8
    Registered User
    Join Date
    Oct 2004
    Posts
    12
    I was thinking of something .... like..

    (note: not actual variables, just a bunch of bs)

    Code:
    if (ghost.x < pacman.x) {
    direction = 2;//left
    }
    if (ghost.x == pacman.x) {
    direction = 0;//none
    }
    if (ghost.x > pacman.x) {
    direction = 1;//right
    }
    but then, the thought of having to program them going AROUND the walls frightened me, so i didnt

  9. #9
    Registered User
    Join Date
    Jan 2007
    Posts
    35
    any one of you plz send me the code of that game plz i will b very thank full 2 u plzzzzzzzzzzzzzzzzzzzzzzzz

  10. #10
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Seeing that the user was active for 3 days in 2004, good luck.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

  11. #11
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Don't resurrect 5 year old threads!
    Isn't there a way to automatically lock threads that have been inactive for a certain amount of time?
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

  12. #12
    Registered User
    Join Date
    Dec 2007
    Posts
    69
    I must ask, what was this compiled with? MinGW? VC++?

  13. #13
    Always learning
    Join Date
    Apr 2009
    Posts
    25
    I don't think s3abass will be able to answer, seeing that he hasn't been in these forums for so long :P. I'll also ask a question, hoping someone else knows the answer: How do I go about making something like this? I'm not looking for a tutorial or someone to make it for me. A simple "look up X" as a starting point will suffice.
    Last edited by Mr.Pointer; 05-10-2009 at 08:07 PM.

  14. #14
    Registered User
    Join Date
    Jan 2007
    Posts
    35
    i can understand but i m stuck in da problem how to introduce ghost in da game i know how to program pacman and walls etc but stuck in introducing ghost!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  15. #15
    The larch
    Join Date
    May 2006
    Posts
    3,573
    Yes, but you falling asleep on the keyboard won't bring back the OP if he has left years ago.

    In any case, this is not a "plz send me teh codez!!!!!!" site.
    I might be wrong.

    Thank you, anon. You sure know how to recognize different types of trees from quite a long way away.
    Quoted more than 1000 times (I hope).

Page 1 of 2 12 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. 20q game problems
    By Nexus-ZERO in forum C Programming
    Replies: 24
    Last Post: 12-17-2008, 05:48 PM
  2. 2D Game project requires extra C++ programmers, new or experienced
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 05-16-2007, 11:46 AM
  3. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 05:19 AM
  4. Game Programmer's AIM Circle: Join Today
    By KingZoolerius66 in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 12-20-2003, 12:12 PM
  5. Someone help me with this game??
    By stehigs321 in forum Game Programming
    Replies: 15
    Last Post: 10-30-2003, 09:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21