Game w/ Source

This is a discussion on Game w/ Source within the Game Programming forums, part of the General Programming Boards category; I made this game with c++ and SDL, it's a vertical shooter and an exe is included in the zip. ...

  1. #1
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735

    Game w/ Source

    I made this game with c++ and SDL, it's a vertical shooter and an exe is included in the zip.

    I would continue making it, but I need to jumpstart my FPS before Christmas break ends.

    If you want to compile yourself, you need these libs
    SDLmain.lib sdl.lib SDL_image.lib SDL_mixer.lib SDL_ttf.lib

    I'd love any feedback/bugs because I might develop it more later...

    Enjoy!
    http://www.filelodge.com/files/hdd5/...ep%20Space.zip

  2. #2
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,803
    Why do you put function definition in the headers?
    Woop?

  3. #3
    Registered User
    Join Date
    Nov 2004
    Location
    Pennsylvania
    Posts
    434
    Neat, i think its a pretty nifty little game, a bit challenging. Good job! And good luck to you in the future!

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    Crashes on first screen.

    After I select a difficulty it dies.

    And after looking at the project it's you are using headers completely wrong.

    Headers contain declarations such as classes, defines, etc. They only contain code if you make your class functions inline. The globals.h is totally unecessary as well as are the other h files. Try sticking this stuff in classes. If you try to make an FPS like this, you will run into huge problems.

    Your structure should be something like this:

    CInput.h
    class CInput {}

    CMouse.h
    class CMouse {}

    CKeyboard.h
    class CKeyboard {}

    CGameController.h
    class CGameController {}


    CSound.h
    class CSound {}

    CSoundCache.h
    Code:
    class CSoundCache
    {
      CSound *m_pSounds;
      ...
    };
    CTexture.h
    class CTexture {}

    CTextureCache.h
    Code:
    class CTextureCache
    {
      CTexture *m_pTextures;
      ...
    };
    CResourceCache.h
    Code:
    class CResourceCache
    {
      CTextureCache *m_pTextureCache;
      CSoundCache *m_pSoundCache;
      ...
    };
    CEngine.h
    Code:
    class CEngine
    {
      CResourceCache *m_pResourceCache;
      CInput  *m_pInput;
      CMouse *m_pMouse;
      CKeyboard *m_pKeyboard;
      CGameController *m_pGameController;
    
    
      public:
        ...
    
        void Render(float fTimeDelta);
    };
    One way of doing it, but at least it's all modular and object oriented. Each one of these would have a CPP counterpart.

    Just a suggestion. But you are not using headers correctly.
    Last edited by VirtualAce; 01-02-2006 at 10:59 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Open-source Game Project
    By Glorfindel in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 03-24-2009, 01:12 AM
  2. PC Game project requires c++ programmers
    By drallstars in forum Projects and Job Recruitment
    Replies: 2
    Last Post: 02-21-2006, 11:23 PM
  3. Game Engine Link Prob
    By swgh in forum Game Programming
    Replies: 2
    Last Post: 01-25-2006, 11:14 PM
  4. u got me wrong fellas
    By clover in forum Game Programming
    Replies: 4
    Last Post: 10-18-2003, 04:23 PM
  5. My Memory Game
    By jazy921 in forum C Programming
    Replies: 0
    Last Post: 05-05-2003, 05:13 PM

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