Thread: Help With First Process of Game.

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    4

    Help With First Process of Game.

    Hi, I am trying to learn C++ by making a game as that is the only reason I am trying to learn it. To make games. How do I get a C++ program to play a movie by looking in a certain directory. The movie is in .mpg format. Also How do i get the program to be like any other where you click on a shortcut and it launches... After I compile it? I am fairly new but have learned basics like printing functions if else while, all that good stuff.

    Can someone type up an example or point me to the right tutorial to get the job done. . . Thanks.

  2. #2
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    You should really learn more C++ and get experienced with it. Showing an .mpg movie is not the easiest task! So learn more C++ and make sure you understand what you are doing. Another thing: If you want to make games on your own dont just learn C++ to make games, learn it to make tools and programs that will aid you in making a game.
    Last edited by Shakti; 08-14-2004 at 01:11 PM.

  3. #3
    C++ n00bie :D
    Join Date
    Jul 2004
    Posts
    63
    Allegro & C++ programming

    That link will show you some basics of C++, and how to display bmp images. After learning the little that is there, learn off of the tutorials on this site for more info on C++. I started learning C++ for almost the same reason as you, but you need to practice first.

  4. #4
    Carnivore ('-'v) Hunter2's Avatar
    Join Date
    May 2002
    Posts
    2,879
    Quote Originally Posted by MattNowaczewski
    Hi, I am trying to learn C++ by making a game as that is the only reason I am trying to learn it. To make games. How do I get a C++ program to play a movie by looking in a certain directory. The movie is in .mpg format. Also How do i get the program to be like any other where you click on a shortcut and it launches... After I compile it? I am fairly new but have learned basics like printing functions if else while, all that good stuff.

    Can someone type up an example or point me to the right tutorial to get the job done. . . Thanks.
    1)
    a) Find some Windows API call to list the contents of the directory, then choose a random file and use something like ShellExecute() to open it with the default viewer.
    or
    b) Use DirectShow or some other API to load and display the movie in your own program

    As you can see, it's harder than it may seem at first

    2) Compile it, then link it => creates an .exe file => create a shortcut to the .exe on your desktop

    Pretty standard stuff.

    >>I am fairly new but have learned basics like printing functions if else while, all that good stuff.

    That's a good start A few more things I'd suggest you read up on before starting a major game project are functions, arrays, STL containers (i.e. std::vector, std::list, std::map), the switch statement, break and continue, pointers, reading/writing to files, and especially classes. Of course, it's always a good idea to make smaller games or programs along the way to help you learn those things (you can try ASCII graphics - most of us did to start out with) - but if you try doing something too big without learning enough, you won't get far. Good luck
    Just Google It. √

    (\ /)
    ( . .)
    c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.

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. my upcoming UNO card game :)
    By Hussain Hani in forum Game Programming
    Replies: 5
    Last Post: 01-24-2008, 01:19 AM
  3. Confused on how the game process works
    By Rumproast23 in forum Game Programming
    Replies: 15
    Last Post: 09-02-2006, 06:45 PM
  4. HELP!wanting to make full screen game windowed
    By rented in forum Game Programming
    Replies: 3
    Last Post: 06-11-2004, 04:19 AM
  5. My Maze Game --- A Few Questions
    By TechWins in forum Game Programming
    Replies: 18
    Last Post: 04-24-2002, 11:00 PM