Jump to content

Game programming language (not engine one) question

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
11 replies to this topic

#1
newn

newn

    Newbie

  • Members
  • PipPip
  • 11 posts
Hi everyone,
i was peacefully learning c++ when my friend asked me what i'm doing. Then he tried to convince me to learn other languages, for example Java or C# after i told him, that i have no intention making engines.
So, my question is: What languages are used to create games mostly? I mean big games, not mario or tetris. And i mean PC games, not console ones, not Unix, but Windows based games, because i'm confused what to learn - finish C++ book and go for another language, continue learning C++ or drop C++ and go for another language now. I have no intention writing engines like ogre or something like that.
Thanks for advices and answers.

#2
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
You could use any language that has access to the Windows API and DirectX, more or less. C++, C#, VB/VB.NET, Delphi and more...

What is most used for games, I don't know.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#3
newn

newn

    Newbie

  • Members
  • PipPip
  • 11 posts
Yea, i know i can use them all, that's why i asked that question.

#4
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Most professional games are programmed in C or C++.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#5
newn

newn

    Newbie

  • Members
  • PipPip
  • 11 posts
Yes, thanks for your answer, that's what i thought. That means i don't need Java or C# as my friend told me. He told me, that those languages are much faster and better and easier and used as much, as C++ in PC games programming world.

#6
so1i

so1i

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 312 posts

newn said:

Yes, thanks for your answer, that's what i thought. That means i don't need Java or C# as my friend told me. He told me, that those languages are much faster and better and easier and used as much, as C++ in PC games programming world.

C#, while faster than VB.NET, is not as fast as C++, so noticeable in games. Java is used a lot for making browser based games, but for a lot of PC games, C++ is the choice. Along with something such as the OpenGL Graphics API.

#7
newn

newn

    Newbie

  • Members
  • PipPip
  • 11 posts
So1i, thanks for a very informative answer. That means i don't need to move to another language, which is good.
Another question, just adding to APIs:
Right now i'm reading a book called 'C++ for dummies, 5th edition'. Borrowed that one from my friend. Here's the content of the book:

Quote

Chapter 1: Writing Your First C++ Program
Chapter 2: Declaring Variables Constantly
Chapter 3: Performing Mathematical Operations
Chapter 4: Performing Logical Operations
Chapter 5: Controlling Program Flow
Chapter 6: Creating Functions
Chapter 7: Storing Sequences in Arrays
Chapter 8: Taking a First Look at C++ Pointers
Chapter 9: Taking a Second Look at C++ Pointers
Chapter 10: Debugging C++
Chapter 11: Examining Object-Oriented Programming
Chapter 12: Adding Class to C++
Chapter 13: Making Classes Work
Chapter 14: Point and Stare at Objects
Chapter 15: Protecting Members: Do Not Disturb
Chapter 16: “Why Do You Build Me Up, Just to Tear Me Down, Baby?”
Chapter 17: Making Constructive Arguments
Chapter 18: Copying the Copy Copy Copy Constructor
Chapter 19: Static Members: Can Fabric Softener Help?
Chapter 20: Inheriting a Class
Chapter 21: Examining Virtual Member Functions: Are They for Real?
Chapter 22: Factoring Classes
Chapter 23: A New Assignment Operator, Should You Decide to Accept It
Chapter 24: Using Stream I/O
Chapter 25: Handling Errors — Exceptions
Chapter 26: Inheriting Multiple Inheritance
Chapter 27: Tempting C++ Templates
Chapter 28: Standardizing on the Standard Template Library
Do you think it'll be enough information to start creating some kind of game after that? I mean Tic Tac Toe or Tetris or Mario. Or i still need to take another course of some other stuff... I know i have to learn DirectX or OpenGL after that (somehow i think DirectX is better for no reason).

#8
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
Well, yes, if you know how to handle all about that, you can start with those kind of games, but, 1) I can't see any graphical programming there, so that is absolutely needed to know more of. 2) the level of information in the dummies series isn't too deep. I assume you need to go at least one or two levels deeper before doing some small games

"For dummies" -> Beginners -> Intermediate might be a good one...
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall

#9
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
Just so you know, there are two definitions for a language being "faster". There's "faster execution" and "faster coding". C# and VB.net generally take less time to get the same effect, but will generally not run as quickly, either.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#10
newn

newn

    Newbie

  • Members
  • PipPip
  • 11 posts
Well, my friend does not have any advanced books. Maybe you know any recommended books after this one? I mean for beginners and intermediates.

#11
JCoder

JCoder

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 245 posts

WingedPanther said:

Just so you know, there are two definitions for a language being "faster". There's "faster execution" and "faster coding". C# and VB.net generally take less time to get the same effect, but will generally not run as quickly, either.

The tradeoff for C# and Java is typically: 2x-4x faster coding, 10%-20% slower execution. However, you can code the most demanding parts in C/C++, the rest in C# and Java which probably gives you the best of the two worlds.

The main problem with Java/C# in games is garbage collection - it is not as predictable as manual management, so it is difficult to get constant frame rates.

#12
exicute

exicute

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 398 posts

newn said:

Well, my friend does not have any advanced books. Maybe you know any recommended books after this one? I mean for beginners and intermediates.

I would recommend two books:

C How to Program (5th Edition) by Paul J. Deitel
Great for begining and advanced programmers alike, it starts with C and then transitions to C++. It may cost a pretty penny at upwards of $100, but you'll get your money's worth.

Amazon.com said:

The Deitels' groundbreaking How to Program series offers unparalleled breadth and depth of programming concepts and intermediate-level topics for further study. The books in this series feature hundreds of complete, working programs with thousands of lines of code. Includes strong treatment of structured algorithm and program development in ANSI/ISO C with 150 working C programs. New chapters added for C99 and game programming with the Allegro C Library. Includes rich, 300-page treatment of object-oriented programming in C++. Presents each new concept in the context of a complete, working program, immediately followed by one or more windows showing the program's input/output dialog. Enhances the Live-Code Approach with syntax coloring. Provides Helpful Programming Tips, all marked by icons: Good Programming Practices, Common Programming Errors, Error-Prevention Tips, Performance Tips, Portability Tips, Software Engineering Observations, Look and Feel Observations. A valuable reference for programmers and anyone interested in learning the C programming language.



C++ primer plus by Stephen Prata
One of the best C++ books I have ever seen.

Google Products said:

If you are new to C++ programming, "C++ Primer Plus, Fifth Edition "is a friendly and easy-to-use self-study guide. You will cover the latest and most useful language enhancements, the Standard Template Library and ways to streamline object-oriented programming with C++. This guide also illustrates how to handle input and output, make programs perform repetitive tasks, manipulate data, hide information, use functions and build flexible, easily modifiable programs. With the help of this book, you will: Learn C++ programming from the ground up. Learn through real-world, hands-on examples. Experiment with concepts, including classes, inheritance, templates and exceptions. Reinforce knowledge gained through end-of-chapter review questions and practice programming exercises. "C++ Primer Plus, Fifth Edition" makes learning and using important object-oriented programming concepts understandable. Choose this classic to learn the fundamentals and more of C++ programming.