Hi!
So, I really like Sublime, I like its design and its simplicity. My question is, is it a valid option to use Sublime for C++ OpenGL 2D game development?
Is Sublime Text a valid option for C++ development?
It's just a text editor. So you can't just use Sublime Text; you'll need a compiler at the bare minimum and you'll likely want a mechanism to organize your build (be it makefiles or something more complex) and probably a debugger as well.
But as far as the text-editing aspects of making games? Absolutely.
1 minute ago, jpetrie said:It's just a text editor. So you can't just use Sublime Text; you'll need a compiler at the bare minimum and you'll likely want a mechanism to organize your build (be it makefiles or something more complex) and probably a debugger as well.
But as far as the text-editing aspects of making games? Absolutely.
This might sound silly, but can't I just compile and stuff through terminal or something?
9 minutes ago, SweetestDownfall said:This might sound silly, but can't I just compile and stuff through terminal or something?
Yeah, all the tools people use are eventually just running the compiler one way or another. You can do it via a makefile, or actually invoking the compiler executable by hand if you want.
30 minutes ago, SweetestDownfall said:This might sound silly, but can't I just compile and stuff through terminal or something?
Yes, you can certainly invoke your compiler manually from a command-line interface if you want.
41 minutes ago, SweetestDownfall said:This might sound silly, but can't I just compile and stuff through terminal or something?
In theory, yes, but for anything other than tiny projects, you don't want to have to manually pass all 100+ filepaths to the terminal for your .cpp files, and don't forget proper library linking order, compiler settings, and in some cases conditionally including or excluding files based off of platform you are building the project for.
This is what makefiles are for. But makefiles are terrible to write and maintain, so people use other intermediary formats that are more human-friendly to use, that then get converted to the makefiles that then generate calls to the compiler. CMake is very popular, though I use QMake for my own projects (mostly because I use QtCreator as my IDE - but I also like the QMake system on its own). Boost has its own, and Visual Studio uses their own without using the GCC makefiles.
So yes, Sublime is fine for programming as your IDE, but you'll still want CMake or similar, for your "project" file (which is a plaintext file you can edit from within Sublime), and you'll still need a compiler (MinGW or Clang, for example) to actually do the compiling.
Sublime also costs money, so if you don't want to pay, Programmer's Notepad 2 is free and fairly nice. It might not be as slick as Sublime, but it certainly works well-enough, so you might want to give that a try and see if it suits your needs before deciding to go with Sublime.
I personally did not liked Sublime Text. All what it provides are flashy things not really useful for programming.
As other posters told about alternatives, other editors like geany for example are very good. Geany is also a tiny IDE in the sense that it allows you to build and run your project from within the editor. I personally use it for little projects, editing some shaders or doing little websites.
To go back to the original question, yes you can do it. For a long I was living with vim (and/or gvim) and a console (threw automake makefiles). But as projects grew up, and as entering new projects, IDEs revealed to be a great help (you know you can click on a function and jump to its definition/declaration, you can hoover a variable and see its type, you can push ctrl-space and have completion to work). This saves time, and saves efforts, and saves frustration. This is really important to my opinion.
Also bear in mind that well known IDE's support advanced debug features like setting breakpoints into your code while running, disassembling code if needed and also integrate code versioning by default (even if I not use the build in ones but one might do so)
As said above, easy debugging is the feature that you want to go after. Especially when you are learning. Being able to break the program, see the current state is the No.1 tool that will shorten the learning curve the most. That's why I recommend Visual Studio Community Edition, it has the best debugger integration.
And do not worry about not learning how to call the compiler/linker manually, it is a trivial thing, and when you need if you need it you can always look it up, it's not a big deal.
So again, go after the debugger.
I use Sublime for hobby projects (C-style C++ and shaders mostly) and I find it much more comfortable, fluid and frustration-free than Visual Studio's built-in text editor, that I use at work. For me it was enough to justify having to set up command-line compilation.
6 hours ago, ongamex92 said:As said above, easy debugging is the feature that you want to go after.
Agree 100%, but using an external text editor doesn't really prevent one from debugging in VS - so why not enjoy the benefits of both? One can always edit code in Sublime, compile and Alt-Tab into Visual Studio to do some debugging.