Home Forums Education, Training and Jobs Going from Java to C/C++

Viewing 19 reply threads
  • Author
    Posts
    • #3321
      Anonymous
      Inactive

      Alright everybody hows it going?

      I’m at Queens University in Belfast and just finished my first year, but having read about the Game industry and seen that C/C++ is pretty high up the list for learning, but we’re doing Java.
      Being a student I’m not gonna go out and buy the first C book I see so I was hoping for some advice. Firstly whats the difference between Visual C, Win32 and DirectX, and which one would be best to get if I want to learn how to program games? Also do any of you know a good book to use to do this.
      My mate gave me the Jamsa C++ programmers bible she got ages ago. It’s about 1500 pages which is a bit of a joke, cause i wanted to teach myself C/C++ now, then quickly make a game or 2 in Java before I go back in September.
      If anyone really wants to help a poor student get his games boots on and laced, you could even check out the NEELB book catalogue (that’s the Antrim library) to see if there is any you’ve used before. Seen they have a few like Mastering C++ by Chapman and C++ how to program by Dietel.

      By the way, I seen Mal post on here, hows it going? This time last year I was on holiday with Oliver, tell him to get some practise in before I play him at snooker again.

      Thanks totally for any help any one can give.

      Cheers
      Michael

    • #13316
      Anonymous
      Inactive

      Being a student I’m not gonna go out and buy the first C book I see so I was hoping for some advice. Firstly whats the difference between Visual C, Win32 and DirectX, and which one would be best to get if I want to learn how to program games? [/quote:03281c253f]

      Win 32 is just a name for any of the 32 bit operating systems released by microsoft – 98, NT, 2000, xp etc. Dont worry about this for the time being.

      Visual C++ (version 6.0 or .NET) is the name of the C++ compiler released by Microsoft. You need either this, or another compiler (such as Borland) to compile programs. Visual C++ is the compiler most often used by games companies dealing with large projects, but for the time being any one should suit.

      DirectX, also by microsoft, is an interface designed to make your life as a coder easier. It hides the task of interfacing with the computers hardware and provides a series of efficient well coded data structures to get you up and off the ground as quickly as possible. It provides support for input (keyboard, joysticks etc), sound, drawing to the screen etc.

      before you buy any books, its well worth surfing the web for some of the free tutorials that are available. cplus.about.com is an excellent introduction to the art of c++ programming, and for graphics and games, try nehe.gamedev.net and http://www.gametutorials.com

      Dave

    • #13317
      Anonymous
      Inactive

      Thats brilliant, gonna check out the links now. I posted the same question on the IGDA forum thinking I was logged onto the Ireland ones,and between the two replies I’ve got, you’ve sorted it for me so thanks.

      Might as well start a tutorial now.

      Cheers
      Mick

    • #13322
      Anonymous
      Inactive

      OpenGL is a much easier to learn graphics library than than DirectX. However from what I’ve heard, opengl is easier to get into, but harder to do more complex and cool stuff, while dx is harder to get into, but then easier to get the cooler stuff once you’ve got the basics. DirectX also gives you graphics, input, sound, networking and video libraries to work with.
      SAMS learn C++ in 21 days isn’t a bad book and anything by Deitel and Deitel is usually pretty good.

    • #13327
      Anonymous
      Inactive

      Win32 is the name of the original C based API for implementing windows (i.e. gui based) applications. VisualC++ is an IDE (integrated development environment) which provides a nifty interface for developing (but is not limited to) gui apps using win32. It’s really just a frontend for the command line compiler,
      linker etc.. Microsoft now favour the .NET APIs over Win32 for gui development. You could check out their new ‘Express’ Visual Studio releases for students and enthusiasts, it contains VisualC++ version 7.

      In my experience, whether you go for OpenGL or Direct3D (the opengl equivilant within DirectX) depends on a number of factors. OpenGL is C based, whereas DirectX has a C++ style interface (emphasis on ‘style’).
      So, coming from Java, object oriented methods are going to be familiar so perhaps C++ and Direct3D would be the logical choice. Unless of course you don’t want to limit yourself to windows. DirectX has better standardisation (and therefore documentation), whereas OpenGL (arguably) has better driver support via extensions.

      Then again, I use OpenGL and gcc on Linux, so don’t listen to me :)

    • #13441
      Anonymous
      Inactive

      If I were you id lash into making a game with java first..
      its easier to code game elements, not going to be wicked fast. but hey whos first game is, also pretty easy to import pictures and play sound etc.. Also you know the language.

      Ty making pong\tetris (the hello world of games).

      That will let you get an appreciation for the amount ofwork that is needed and how to make a game, structure etc…

      Coz if you lash into C++ now, your going to have to do two things; learn how a game is made and also learn how to programCc++. Which is big enough task on its own.

      Ive had no real experience with opengl, but Directx programing is pretty difficult even if you know C++ , so learning that also at the same time is going to be very hard.

      I recommend you learn C++ like you learned Java, from scratch and work up to the same kind of programs you currently can write in Java. Which I presume after a year is probably, a bit of of swing, objects,polymorphism,inheritance, etc..Then tackling Directx should be much easier. Thats how I did it and it work out pretty well for me, I found the transition very easy.. Saying that I coded java for 3 year and C for a year on and off in college.

      Also theres a nice plugin for java called gljava I think which will allow you to experiment with 3d graphics etc in java using opengl, dunno what its like though.

      As for books, that deitel book isnt bad, its used quite a bit in college i think..

      I found “C++ An introduction to computing” was a great book, simple at first, and covers everything.. then strausoups advanced one..

      Another good one is a recent one which probably isnt in libraries but might get cheap off ebay,ebid “Beginning direct3d” by Wendy someone, covers all basic aspects of directx 9.0.

      Also “Tricks of the games programming guru ” by Andre la Mothe, I picked this on up in a book store in Cork for 15 quid.. brand new? doubt its that cheap elsewhere think they screwed up on the price..

      Also, gamedev.net is the best place for information, most tutorials are written well.
      http://www.cplusplus.com/ is also great for C++ related information.

      Also since your a student you should get a student license of visual studios for about 90 euro, which is really cheap considering the normal price is in the hundreds.. not sure if MS offer this still, i heard sometime back it stopped for a while coz of studios .NET. but it may be there again. Also you might pick it up on ebay cheap also. By far the easiest to configure. Open source GCC is pretty difficult to get working, especially with windows gcc and directx lib linking..

      hope that helped.

    • #13450
      Anonymous
      Inactive

      Ok thanks, all good stuff. It might seem like I’m paying no attention but i’ve ordered a book from library- Sams Teach yourself c++ in 24 Hours by J Liberty. I didn’t choose it cause 24hours was the fastest time but it got really good reveiws on amazon by people changing from other languages, and I hope to mix it with the tutorials mentioned above.

      I’ve made reversi, and an animation for a stick man to be used in hangman in Java. They opened my eyes to the lenght of time seemingly small things take.

      The way I see it is C++ is something I would have to have learned anyway at some stage, so doing it now can only help me program better when I go back to Queens, and we do a GUI for something next year, so I’d say anything Graphical now should help next year, even if it is only reversi in another language. It’s just I seen gamedev.net and other game development sites, and there are very few for Java, so thats why I wanted to move over.

      Oh and thanks for the help again, I know I picked a book that nobody even mentioned but really I did read what you all said.;)

      Thanks for the help, and I’ll let you know how I get on.

    • #13500
      Anonymous
      Inactive

      The people in the library still haven’t got me my book, I went down to complain about how long its taking to come from Omagh.

      She told me that you don’t get the CD with it (if it does arrive).

      What’s the best free C/C++ compiler to download, has anyone downloaded it from Borland, seems to be the main one. I know I could use the command line set up but we use JCreator for Java at university and I’m therefore spoiled with a lovely interface, and I don’t have to insert tabs. Has C/C++ got the same sort of deal somewhere?

      Any help’s much appreciated.

    • #13511
      Anonymous
      Inactive

      just shell out for a student license of visual studios. less of a headache in the long run.

      contact your university software dept. and they will tell you how to apply for it. usually means you have to fill out a form and get the registar office to stamp the form, then send it to MS

    • #13514
      Anonymous
      Inactive

      just shell out for a student license of visual studios[/quote:d7d47d6f68]

      *whispers*
      Or just find someone who has a copy of it and get a loan to install on your own machine…..

    • #13515
      Anonymous
      Inactive

      GCC (the gnu compiler) is perhaps one of the best C++ compilers out there; it mightnt be the best optimising compiler, but it’s probably closer to the standard than microsofts, or most other compilers.

      It’s free to download.

      It only provides a command line interface, but the are several IDEs you might want to look at.

      Eclipse is a very good IDE (or IDE platform), originally supporting java (which you might start with, to learn the IDE by using a language you’re familiar with), it now supports C/C++.

      It is also free.

      Regarding learning the language, I’d say the best bet is to start off writing helloworld, and work your way through the usual stuff before moving on the game specific libraries and apis. C++ has a lot of subtety to it, and takes a lot longer to learn and understand than java, so to avoid frustration, start at the basics.

      C++ is a really cool language in a lot of ways, and it’s definitely still the language of choice for game programming (and probably will be for a while yet).

      On books, while a particular “teach yourself x in 24 hours” book may be good, in general they aren’t very useful. (although if the C++ one is good, then fair enough)

      I read Dietel and Dietals C++ book – i found it alright, not wonderful.

      I’ve been told that Core C++ is a very good book, perhaps you might look at it?

      There’s a lot of resources to learn c++ with – the main advice I could give is to make sure to start at the beginning, and read everything – a lot is subtley different from java, and you have to be careful or things won’t work, and it’ll be very hard to understand why.

    • #13519
      Anonymous
      Inactive

      For a compiler, I reccommend Dev-C++ : http://www.bloodshed.net/devcpp.html
      It’s completely free (open source), got a nice interface, well organized and gives you all you’d need for developing C++ programs.

      For reference, on top of internet stuff, I reccommend “Sam’s teach it youself C++ in 21 days”. It’s easy to go through it faster if you want and I hear that generally the “21 days” series is better then the “24 hours” series. Could be wrong for your case though.

    • #13522
      Anonymous
      Inactive

      ah the piracy. ya cant be doin dat!

      wont someone please think of the children! hehe

    • #13528
      Anonymous
      Inactive

      I downloaded the Dev-C++ one mentioned above. I seen it recommended on GameDev.net forums after I’d asked on here. For anyone else in the same shoe’s it is a very similar interface to JCreator if you’ve used it before.

      Yeah still haven’t got the book, but I’m gonna use the C/C++ tutorials from cplus.about mentioned earlier, when I get home from work, while I wait on the book.

      Good stuff

    • #13533
      Anonymous
      Inactive

      There’s also Visual Studio .NET Express (link) available for free download. It’s missing some of the Microsoft libraries (like MFC and ATL), but the compiler is the same as in all the other versions of VS. Not sure how big a chunk of normal .NET IDE they left there, though, but it should have all you need.

    • #13539
      Anonymous
      Inactive

      DevC++ isn’t a compiler, it’s an IDE using gcc as it’s compiler.

    • #13540
      Anonymous
      Inactive

      That kind of helps in that when i put in a program

      THE DAMN HELLO WORLD PROGRAM – 4 LINES FOR GOD SAKE

      It doesn’t do anything. So I’ve decided to take a complete U-turn on the DevC++ cause it is just annoying me.

      The thing is it comes over like your best friend, nice and friendly like XP and exactly like an IDE I used before, but then just makes you pull all your hair out as nothing happens. The “funny” thing is the hello world program is on all the websites and in the help file on the DevC++ program I downloaded. Yet it still doesn’t work, so I’m just laughing about the past hour or so I’ve wasted on it.

      I’ve got a Borland Lite CD with the reference book I mentioned earlier. It means writing in a text editor and using the command line but sure it help the blood pressure.

      Hopefully.

    • #13562
      Anonymous
      Inactive

      finally got it sorted. Didn’t download all the compiler stuff when getting DevC++ first time round.

      It compiles and runs at last. Note to self, next time you try to be smart, be true to yourself and stay dumb.

      Thanks everybody, can finally get started.

      PS library lady has now decided to tell me that it’s only a reference book in the other 3 librarys and cant be borrowed. As are all the computer books apparently. Except the ones in our library, they can be given to other librarys, and borrowed by people.
      The question then is, why put them on the internet for booking if you can’t borrow them. It’s brilliant too, I made an arse of myself infront of every1 in the place. I demanded by 40p back for requesting it, its an automatic charge made online that I gave her last day. So since she was annoying me, apparently she told me it was a reference book first time round and it’s all my fault:confused:. So I decided that in principle then I should get my 40p back.
      But at least I can start some work now that I’ve got something I can use.

    • #13791
      Anonymous
      Inactive

      Thats the spirit Mick – don’t let that WOMAN scam you!

      :)

    • #13812
      Anonymous
      Inactive
Viewing 19 reply threads
  • The forum ‘Education, Training and Jobs’ is closed to new topics and replies.