Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2] 3

Author Topic: Starting out in C++  (Read 4107 times)

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Starting out in C++
« Reply #15 on: August 16, 2012, 07:46:58 am »

Is there a particular reason you avoid IDEs? I don't see how it would harm your development speed ...
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Eduan

  • Bay Watcher
  • A genius born genius
    • View Profile
    • EduanTech
Re: Starting out in C++
« Reply #16 on: August 16, 2012, 08:43:33 am »

I'm a recent convert to Agile Development and Test Driven Development after where I work knocked me out and brainwashed me showed me how flexible and effective they are as a methodology.
Oh dear D:

Personally, Visual Studio actually works for me. I think the devs did a good job on it. Of course, I'm no professional developer, so don't ask me for a reliable review.

I don't like Eclipse, just because. >.> The ever-changing GUI is way too customizible (Not a word, I know D:) for me. I hated it while trying to use it for Java, and I thereafter don't like it.

I heard that one problem with C++ is that the specs don't define "how to do certain stuff", so the machine code from one compiler/IDE probably will be different from another compiler's; especially compared to C. This is hearsay, though, so again don't take my word for it.
Thanks for the feedback! Yes I have also heard that even the same compiler may compile the same code in different ways. All depends on the code though, of course.

I have used Dev-C++ (horrible horrible thing to use; for some reason had to use it in a college C-Programming class) and Visual Studio C++. I like VS-C++ for the most part. It is pretty easy to use, and even on my badly out of date laptop (1.5GHz dual core w/ 2GB RAM) it speeds along quite nicely.
I would like to ask you, is it the newer version? VS 2012? Or what version is it, just to know which one is speedy.

Visual Studio is a fantastic IDE, and the debugger is awesome. In 2010 onwards you can even integrate other compilers (other languages, platforms, or just other compilers for windows) directly into it. It runs well on old hardware too, I've got it on my eeepc, and it runs well.

The compiler's support for the newer C++ standards is a bit lacking, however. GCC (MinGW on Windows) is much better for that.
I see... thanks for the compiler feedback! I'll try to change it to the GNU compiler, and if that doesn't work well, then GCC. :)

Hi, I'm new too.

I use Linux and this year I have started coding a game with C++ too.  I am using the C++ SDL library for graphics which is pretty easy to use, it also has a pretty good history and seems to have a big following which makes it stable, it is cross platform so you can make programs that run on different operating systems, and it supports 2D, 3D and all types of keyboard, mouse, joystick, sound, etc, etc, etc.

I have heard raves about Visual Studio, even from people who don't like using Windows, apparently it is a very well done software.

I personally try to stay as far away from IDE's as I can.  I just like good editors with hot keys and syntax highlighting.  The less time my hands have to move to the mouse the better.

Vim is a good editor, also Emacs, but I'm not sure if this is the type of thing that everyone can get used to.  It takes a little time to learn them, but after you do your coding speed will definitely increase and you'll find it a lot more comfortable.
Yes I have heard of Vim and Emacs, I don't like them cause I really have to get used to them, and most of it is controlled through text options, and when I tried using the mouse... long story short, didn't work out well.

You might be interested in EditPad Pro, it is a good text editor, that has a lot of options, but it doesn't get in your way, and it's not an IDE.

Randos

  • Bay Watcher
  • The Earth Strikes You!
    • View Profile
    • Comic Wolf
Re: Starting out in C++
« Reply #17 on: August 16, 2012, 08:47:50 am »

Is there a particular reason you avoid IDEs? I don't see how it would harm your development speed ...

You might have mixed a couple of my meanings into one, creating a new meaning, which I didn't intend :)

1 - I don't like IDE's.  TRUE.

2 - I like editors like Vim and Emacs.  TRUE.

3 - If you learn a good editor it will increase your development speed.  TRUE.

4 - I said that IDE's harm development speed.  FALSE.

The reason I don't like IDE's is because they are often more visual and "mousy".  I just want to see the code and see it clearly.  If you've seen good syntax highlighting with Vim you know what I mean. 

Also with Vim my hands never need to leave the keyboard.  All copy/paste, replace, searching, macros, etc, etc can be done with hotkeys or keyboard commands.  And you can go into command mode and do all kinds of tricks, browse files, merge things, execute command line commands, all kinds of stuff.

Granted I have never tried Visual Studio because they probably don't provide it for Linux, but it sounds like this would be an IDE worth using.
Logged

Eduan

  • Bay Watcher
  • A genius born genius
    • View Profile
    • EduanTech
Re: Starting out in C++
« Reply #18 on: August 16, 2012, 10:40:19 am »

Also with Vim my hands never need to leave the keyboard.  All copy/paste, replace, searching, macros, etc, etc can be done with hotkeys or keyboard commands.  And you can go into command mode and do all kinds of tricks, browse files, merge things, execute command line commands, all kinds of stuff.
Yes that is something I heard in every review I read, too complicated for me though, I like it when it at least has a list of things you can do but I couldn't find any, and I also wanted to get started fast so...

Also, I am NOT a hotkey genius, kinda getting used to Dwarf Fortress, and I only really use hotkeys with Minecraft, just cause I gotta defend with my sword every time I hear a sizzle. :P

Eduan

  • Bay Watcher
  • A genius born genius
    • View Profile
    • EduanTech
Re: Starting out in C++
« Reply #19 on: August 16, 2012, 12:46:26 pm »

Hey guys, so I downloaded Eclipse, my bad, it doesn't install any trojans or anything, I confused it with another similar software, it has a download count on it's homepage, anybody know which one it is?

I'll be sure to check out those websites you guys sent me. :)

Eduan

  • Bay Watcher
  • A genius born genius
    • View Profile
    • EduanTech
Re: Starting out in C++
« Reply #20 on: August 16, 2012, 02:30:16 pm »

Visual Studio is a fantastic IDE, and the debugger is awesome. In 2010 onwards you can even integrate other compilers (other languages, platforms, or just other compilers for windows) directly into it. It runs well on old hardware too, I've got it on my eeepc, and it runs well.

The compiler's support for the newer C++ standards is a bit lacking, however. GCC (MinGW on Windows) is much better for that.
BTW, Thief^, I am using MinGW, only thing that works with C++11 anyway. ;)

MorleyDev

  • Bay Watcher
  • "It is not enough for it to just work."
    • View Profile
    • MorleyDev
Re: Starting out in C++
« Reply #21 on: August 16, 2012, 06:31:06 pm »

My main defence of IDEs comes from the built-in refactoring and autocomplete tools. Especially when you add things like Resharper or Visual Assist X which aid so very much in code refactoring and maintenance that any extra "complexity" they introduce (like command line is simple -_-) is nullified by their versatility :) Indeed, I could not code in C# without Resharper because Resharper is so powerful it makes TDD such a breeze...and Eclipse, Code Lite and Visual Assist X provide some decent Refactoring tools for C++ which, for me, are so very worth it :D
« Last Edit: August 16, 2012, 06:35:27 pm by MorleyDev »
Logged

Eduan

  • Bay Watcher
  • A genius born genius
    • View Profile
    • EduanTech
Re: Starting out in C++
« Reply #22 on: August 16, 2012, 07:09:32 pm »

My main defence of IDEs comes from the built-in refactoring and autocomplete tools. Especially when you add things like Resharper or Visual Assist X which aid so very much in code refactoring and maintenance that any extra "complexity" they introduce (like command line is simple -_-) is nullified by their versatility :) Indeed, I could not code in C# without Resharper because Resharper is so powerful it makes TDD such a breeze...and Eclipse, Code Lite and Visual Assist X provide some decent Refactoring tools for C++ which, for me, are so very worth it :D
Yeah I totally understand you, PHPStorm and ReSharper are from JetBrains, and I know the quality of their products, it's awesome. Also, I will check on Code lite and Visual Assist X, thanks for the tip. :)

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games
Re: Starting out in C++
« Reply #23 on: August 16, 2012, 09:23:22 pm »

I am using VS2010, haven't upgraded to '12 to see how it runs yet. Everything I 'need' it to do so far is accessible in the '10 version.
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

malloc

  • Bay Watcher
    • View Profile
Re: Starting out in C++
« Reply #24 on: August 17, 2012, 04:48:46 am »

I am using VS2010, haven't upgraded to '12 to see how it runs yet. Everything I 'need' it to do so far is accessible in the '10 version.

To be quite honest, VS2012 is only worth upgrading to if you want more c++11 functionality, (The foreach, the threading, and anonymous functions are actually very nice)
Problem with VS2012 is they changed the whole GUI and color scheme, not just that, things start blending together if you try and program for too long. They also seriously downgraded the functionality of the express version.

Logged

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: Starting out in C++
« Reply #25 on: August 17, 2012, 05:07:00 am »

...Please elaborate on the threading part? :-0
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Thief^

  • Bay Watcher
  • Official crazy person
    • View Profile
Re: Starting out in C++
« Reply #26 on: August 17, 2012, 05:10:11 am »

Actually they are going to be releasing 2012 Express "for Desktop" later, which as far as I can tell is at least as capable as 2010 Express.

The main C++11 features I've seen missing in VC++'s compiler (even 2012) are:
Variadic templates
Chaining constructors (calling other constructors of the same class from another constructor like C# can)
Non-static member variable initializers (putting int a = 10; in a class and having it work instead of throw a compiler error, again like C# can)

It does support:
auto variables*
foreach
lambdas** (aka anonymous functions)
nullptr*
enum class (I think)

EDIT: * = supported in VC++10
EDIT: ** = partially supported in VC++10

If anyone has any questions about any of these I've studied them pretty closely.
« Last Edit: August 17, 2012, 08:39:18 am by Thief^ »
Logged
Dwarven blood types are not A, B, AB, O but Ale, Wine, Beer, Rum, Whisky and so forth.
It's not an embark so much as seven dwarves having a simultaneous strange mood and going off to build an artifact fortress that menaces with spikes of awesome and hanging rings of death.

malloc

  • Bay Watcher
    • View Profile
Re: Starting out in C++
« Reply #27 on: August 17, 2012, 05:37:04 am »

...Please elaborate on the threading part? :-0
It's a little complicated. But basically there are std::thread, which spawns a new thread, and std::async which gets handled by a threadpool as far as I understand.
But as far as I know std::async is not actually enforced to be threaded by the specs, but having played a little with it, it seems to assign new threads to async tasks when it deems it unnecessary.

But yeah, c++ is becoming a lot more like c#. It's like a c# version where you are free to make all the unsafe code you want, and you have greater control of memory management.

Oh and Theif^, VC++10 also supported autos. I use them greatly when iterating through containers. Typing out a 40+ letter iterator class gets old really quick. Especially when you have something insane like:
Code: [Select]
std::map<std::string, std::vector<math::vector3D>> StupidContainerClass();

//Iteration would be something like
for(std::map<std::string, std::vector<math::vector3D>>::iterator i = StupidContainerClass.begin() ; i  != StupidContainerClass.end() ; i ++){
}
//This is where auto makes life MUCH easier
for(auto i = StupidContainerClass.begin() ; i  != StupidContainerClass.end() ; i ++){
}
« Last Edit: August 17, 2012, 05:44:21 am by malloc »
Logged

Eduan

  • Bay Watcher
  • A genius born genius
    • View Profile
    • EduanTech
Re: Starting out in C++
« Reply #28 on: August 17, 2012, 08:31:28 am »

I didn't think of the idea for more support for C++11 when I thought of Visual Studio 2012, but I can't use it anyway, the minimum operating system is Windows 7, and I am using Windows XP. Of course I can reinstall the OS no problem, but I don't like Windows 7. :/

I will upgrade though when I have a new computer, this one isn't able to handle it, but the new one is gonna be for gaming so no problems there.

BTW, try http://www.equation.com/ for a compiler, you will find a working C++11 compiler there, known as MinGW (the Windows version).

Eduan

  • Bay Watcher
  • A genius born genius
    • View Profile
    • EduanTech
Re: Starting out in C++
« Reply #29 on: August 17, 2012, 08:40:02 am »

Also, it seems most of the activity happens while I'm asleep. lol
Pages: 1 [2] 3