Deciding on a starting point

Started by
4 comments, last by Spoonbender 18 years, 9 months ago
I'm sure this has been asked a thousand times, but search engines (particularly on forums) are a pain in the ass. :P Anyhow. I'd just made this decision to start programming games, directX and C++ were my first choice, no questions about it. I know C++ to some extent. . . but now that i'm actually getting down to the dirty work of programming an engine, I'm starting to think I'm still not ready for it. The 2nd reason im starting to think again about what I start using to make games is that I'm supposed to be learning java for my Computer Science degree - and I feel like learning two different things (at least in this early stage) will just make things worse. SO: I am wondering what the limitations of java are in terms of game programming - as it would be much less hassle, and also probably beneficial to my grades if I started off making games in it. And also more importantly - is java a good choice for a beginner game programmer - in terms of complexity, etc? So far i've only really worked with console apps but from what i've seen graphics are fairly straightforward.
Advertisement
Java vs. c++ arguments are everywhere.

Java this...c++ that...

it all boils down to the basics.

Java is NATURALLY slower, and c++ is NATURALLY faster. Granted, an excellent java programmer can make a way faster game than some shitty 7 year old kid in c++, and visa versa.

c++ is the current game development language because it's the most reliable, it's the most useful (in terms of flexability), and it's the most complex (good thing).

Java is more internet based, like console apps in the browser itself. It's more of like a c# type of thing... c# is for the web, but it can be used for other things as well.

However, Java and c++ code is similar. It's not like going from c++ to basic, my god no. It's mostly the same with structs and stuff, just the layout is different.


But, back to your original point, I would learn c++. If you start out learning Java, they'll turn you into thinking that Java is the best language out there for games programming, which it is entirely not true. You'll never switch to c++. So, I'd say start out with c++, know it in and out, and then switch to java and see how crummy it is.

And, on the topic of game design... I'm sure you already know this, but games just don't happen. I was the same way as many others, thinking that if I learned c++, the master of all computer languages, I'd easily be able to make games. WRONG! I've been studying c++ for almost a year now, and even though I feel comfortable programming in the language, I'm still stuck on game making.

Do you know why? Because there isn't a real way to make a game, it's what you want and how you make it. There are numerous books on how to make games, but it all boils down to how creative you are (with your code, not your game design/story mode/what have you).

For instance, if you knew all of the words in the English language, but didn't know how to form sentences with them, what good are they to you?


Google a crap load, see if any of your friends game program, and find as many books as you can.

IF SOMEONE CAN WALK YOU THROUGH HOW TO DO BASIC GAME SEQUENCES, you'll learn a lot more than trying to make something up as you go along. Try to see it done first, then understand it. I, personally, hated going blind into a topic such as making a game, and needed someone to show me how to do certain things.

I'm not copier, but once I see how something is done, I remember how to do that forever... it's just the way I am. I could read all the books I want that tell you how to make a game, but if they don't show me how to make a game then I'm completely lost.

If you're still reading this... good luck! Go with c++, especially if you haven't programmed before. It'll be a joke when you go and look at some code from something like basic, rather than starting on something lower and realizing that c++ is a ton harder!

Gardon
hey, I'm not sure if I explained myself well enough in my first post -

I know some C++, and some java.

I initially planned on starting out learning game programming in C++, however,

I'm currently studying computer science at uni, which REQUIRES me to learn java (thats their chosen language)

So I thought if java has enough scope to keep me interested in game programming for at least another year or so, then I should use it, since that way I wont be trying to learn both java (for my uni course) and C++ (as a hobby).

Also like you said, they're similar, moving on to C++ later shouldnt be hard if i've already learnt java.
Id go for C++ too, i learnt java in my first year of uni, and now im in my final year and wanting to make a demo to send off to games companies i realised i really need to do it in C++, and now ive got to cram learning C++ into the same time as actually writing the game. Think of it as if you learn C++, java will be dead easy cause its pretty much the same but you dont have to worry about memory and pointers as much.
learning java is worth it for mobile phone gaming, plus by the very nature of the platform games concentrate on gameplay rather then pretties.

In C++ land its very easy to get bogged down in creating an "engine", I would avoid thinking about programming an engine for your first games - instead concentrate on creating good code that is reusuable in nature... thus building on your own library of code and gaining experience along the way. That way an engine will kind of evolve naturally.

I would also consider using an engine thats already out there like Ogre3d... it's very easy to get caught into rolling you own everything. Fine for an academic exercise - but will take your focus away from making games and to creating tools for making those games.

Do not discount other languages such as C# too... C# is more then capable of making games, as are tons of other languages.

As you are learning Java at university I would def say start off game programming in Java, it will all help you get a better grade at the end of the day, and you should be able to apply the stuff you learn at university back to your game programming and visa-versa. Once you know one language well and concentrate on getting the architecture of your programs - picking up a different language is much easier.

For extra brownie points I would think about looking into unit test frameworks and test lead development... your lecturers would probably like that.

Take care around here, there are a few that will say everything not C++ is rubbish - don't pay any attention to these C++ fanboys - a language is just another tool choice. They'll spout performance stats etc, but depending on what you want to achieve then all that stuff really doesn't matter, true or not. Granted at the moment C++ is standard in the games industry, so in the long term you'll probably have to learn it - but in the long term we are all dead anyway. Just concentrate what you want to get done here and now, and what will help you with your coming academic year.
Anything posted is personal opinion which does not in anyway reflect or represent my employer. Any code and opinion is expressed “as is” and used at your own risk – it does not constitute a legal relationship of any kind.
Quote:Original post by Gardon
Java is NATURALLY slower, and c++ is NATURALLY faster.

Not true. Depends 100% on the specific compiler (and possibly VM, if the Java code is only compiled to byte-code).
But trust me, it is entirely possibly to make a C++ compiler that generates slower code than Java. ;)
If you want to boil it down to basics, you'd say talking about the "speed" of a language is meaningless. Languages have no concept of execution speed. That's a property of the compiler.

Quote:c++ is the current game development language because it's the most reliable, it's the most useful (in terms of flexability), and it's the most complex (good thing).

Most likely simply because it's the standard. That means everyone knows it, every library or API works with it, and so on.
It's not actually a very good language to work in.

Quote:
Java is more internet based, like console apps in the browser itself. It's more of like a c# type of thing... c# is for the web, but it can be used for other things as well.

Err, no?
C# and Java are just programming languages, plain and simple. They're not particularly made for web/browser stuff. Maybe you're thinking of &#106avascript?
Both languages have huge standard libraries, which, yes, contains functions to handle networking, but so what? They also contain functions for graphics, or for complex data structures or just about anything else you might need.

Quote:
But, back to your original point, I would learn c++. If you start out learning Java, they'll turn you into thinking that Java is the best language out there for games programming, which it is entirely not true. You'll never switch to c++.

Wooow, that's some claim.
I think they'll turn you into a serial killer!
No, Comp Sci classes tend to teach you comp. sci stuff, which means they really don't give a damn about the language. They just need something that's easy to pick up, and powerful enough to demonstrate all the important stuff (which is language-independant).
Most people manage to understand this, and see the language as one among many tools, and become quite capable of looking at different languages and weighing their pros and cons.

Quote:
So, I'd say start out with c++, know it in and out, and then switch to java and see how crummy it is.

So you'd rather turn him into thinking that C++ is the best language out, and keep him from trying other languages? How exactly is that better?

Quote:Do you know why? Because there isn't a real way to make a game, it's what you want and how you make it. There are numerous books on how to make games, but it all boils down to how creative you are (with your code, not your game design/story mode/what have you).

Which, funnily enough, is language-independant. This issue is the exact same, whether you use Java, C++ or something else entirely. The language doesn't actually matter.

Quote:
If you're still reading this... good luck! Go with c++, especially if you haven't programmed before. It'll be a joke when you go and look at some code from something like basic, rather than starting on something lower and realizing that c++ is a ton harder!

I disagree. And this is coming from someone who knows several other languages.
If you haven't programmed before, you should definitely focus on a language that allows you to focus on learning *programming*, not dealing with the language's odd quirks.
That's the main problem with C++. It forces you to deal with all those messy details that just distract you from learning actual programming (which is the ability to break down and structure a problem into code, and not the ability to deal with pointers and memory allocation)

Anyway, back to the OP.
Yes, Java is a quite good beginners language. There's a reason so many colleges use it. It's simple enough to pick up, easier to work with, but powerful enough to do what you want.

That doesn't mean it's the perfect language for games. But it's a good language for starting programming (and you can make games in it, as long as your ambitions aren't at Quake 4 levels)
It's up to you, really. You're going to learn Java no matter what. Later on, you're very likely going to learn C++ no matter what as well.
So in the end, it'll be all the same.
Until then, it really depends on what you feel like. You might want to start with making games with Java. It makes it easy to do relatively simple 2d graphics, which is a good starting point. And it means you can focus on the language you're supposed to be learning at college anyway.
Or you can learn C++ on the side. Learning multiple languages is always good, and tends to give you a better insight into both languages.

This topic is closed to new replies.

Advertisement