Thread: Game Power in C and C++

  1. #16
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    well, i guess you should use the industry code... since most major game developers use C++, wouldnt that be a good place to start?

  2. #17
    The Right Honourable psychopath's Avatar
    Join Date
    Mar 2004
    Location
    Where circles begin.
    Posts
    1,071
    With a little research, couldn't you determine which language is best for you on your own?

    Google is your friend.
    M.Eng Computer Engineering Candidate
    B.Sc Computer Science

    Robotics and graphics enthusiast.

  3. #18
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    499
    In my opinion, any programming language can accomplish almost anything. Some programming languages are easier for certain tasks than others. You asked whether you could create a retail-level game with C. Answer: Yes. The question is whether it's easier to write it in C++, not if it is possible.

  4. #19
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by shadok
    Nobody said I made only RPG's. Ive made 1 MUD, 2 Shooters, 1 MMORPG. I just need to know what coding language is powerful enough for me.
    Somehow I doubt you made an "MMORPG" if you can't even figure out what language you want to use.


    Quzah.
    Last edited by quzah; 08-20-2006 at 07:49 PM. Reason: Added a quotation for the easily confused.
    Hope is the first step on the road to disappointment.

  5. #20
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    499
    It's possible to write an operating system in BASIC, even if it would take 100x more code than a low-level language. (Personally, I prefer C++)

  6. #21
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by joeprogrammer
    It's possible to write an operating system in BASIC, even if it would take 100x more code than a low-level language. (Personally, I prefer C++)
    No you can't. Show me any version of BASIC that allows you direct hardware access.


    Quzah.
    Hope is the first step on the road to disappointment.

  7. #22
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    for game development you definitely want objects.
    if you haven't understood the sense/concept of object oriented programming, then figure it out - and i'm sure you'll like it.
    also the stl is such a neat thing, once you used it, you wouldn't want to live without it anymore.
    first the stl is really fast, and second its easy to use.
    signature under construction

  8. #23
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    Quote Originally Posted by quzah
    No you can't. Show me any version of BASIC that allows you direct hardware access.


    Quzah.
    well i have seen a basic ray caster (dos times) that used assembly routines to draw stuff.
    so that would be visual basic for dos 1.0 (must have been like 10 years ago now )
    signature under construction

  9. #24
    Call me AirBronto
    Join Date
    Sep 2004
    Location
    Indianapolis, Indiana
    Posts
    195
    Quote Originally Posted by Desolation
    Everything doesn't need to be private. In your example, there is absolutely no reason for x,y,z to be private thus those functions have no reasons to be there and you end up with the same solution. The only time you will need to use get/set methods is when a member variable's value affects directly other components of your application or other variable values. If you create a TextBox class, changing the variable m_lpszCaption wouldn't change the text of the text box so it would be better to make m_lpszCaption private and have set method to do both jobs at the same time (assign the new value and change the text box's caption) and of course a get method to retrieve the value anytime wanted.
    It is just good programming practice to keep the data abstraction in place.

  10. #25
    Registered User
    Join Date
    Aug 2001
    Posts
    244
    Code:
    class coord {
    	int x, y, z;
    
    	public:
    		int getX (void)
    		{
    			return x;
    		}
    		int getY (void)
    		{
    			return y;
    		}
    		int getZ (void)
    		{
    			return z;
    		}
    		void setX (int _x)
    		{
    			x = _x;
    		}
    		void setY (int _y)
    		{
    			x = _y;
    		}
    		void setZ (int _z)
    		{
    			x = _z;
    		}
    };
    i'd do it that way:
    Code:
    template<typename T, unsigned N>
    class _coord {
    private:
      T c[N];
    
    public:
      inline T& operator[] (unsigned index) { if(index >= N) RAISE(IndexOutOfBoundsException); else return c[i]; }
      inline const T& operator[] (unsigned index) const { if(index >= N) RAISE(IndexOutOfBoundsException); else return c[i]; }
    };
    
    typedef _coord<int, 3> coord;
    see how compact it is? even with error checking! (which can be removed in release versions)
    edit: oops, forgot the "[]"
    Last edited by Raven Arkadon; 08-21-2006 at 09:07 AM.
    signature under construction

  11. #26
    Registered User
    Join Date
    Mar 2006
    Posts
    9
    Quote Originally Posted by psychopath
    With a little research, couldn't you determine which language is best for you on your own?

    Google is your friend.
    Google doesnt give you a human opinion of what language is prefered by most humans...Everyone says their language is the best, or there is a message board. This is a message board, thus I feal its my right to express myself as long as it abides by the rules and is posted in the proper place.

    Im just gunna push myself to learn C++. It seems thats the preference...Thanks alot you guys youve help ALOT. Sooner or later Ill master this language...Now see ya guys later, i gotta go look at some of your tutorials :-)

  12. #27
    Registered User
    Join Date
    Aug 2006
    Posts
    3
    99.9% of big companies use C++ for games not C

  13. #28
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    It's possible to write an operating system in BASIC, even if it would take 100x more code than a low-level language. (Personally, I prefer C++)
    You don't have a snowball's chance in hell of creating an OS in BASIC. No way you can create an OS using the 'small' memory model.

  14. #29
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    499
    You don't have a snowball's chance in hell of creating an OS in BASIC. No way you can create an OS using the 'small' memory model.
    Don't get mad at me, I was actually quoting a programming book which I will refrain to name.

  15. #30
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by shadok
    Im just gunna push myself to learn C++. It seems thats the preference...Thanks alot you guys youve help ALOT. Sooner or later Ill master this language...Now see ya guys later, i gotta go look at some of your tutorials :-)
    You have no idea what you are going to get yourself in.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed