C++ by itself does not contain any library to access the video, input, and sound hardware, which is what you need for games. So in order to do that, you'd need to use a 3rd party API. SDL, SFML, as people mentioned are good candidates.
Once you familiarized yourself with the API, then you can start working on the core of the game. There isn't any 'de facto' Tetris tutorial, as there's no one correct way of making a Tetris (or anything else really). How you make it is up to you. Other people's source code should be good as points of reference. Here's one: http://code.google.c...e-tetris-clone/
As a beginner, I wouldn't suggest trying too much organizing your code. Your lack of experience will probably backfire -- chose the wrong patterns, premature optimizations, and all that. Do it as best as you can, but the most important thing is to actually complete your game. After you complete your game, your knowledge of project structure will skyrocket, and you'd know how to do it better next time.
I'm currently studying to become a games developer/programmer and have a tattoo sleeve but due to it being around an inch above my wrist I can easily cover it up (long sleeved shirt etc.) if need be. also was thinking of having a flesh tunnel in one of my ears (around 5mm - not like it matters) what are the views upon these things in the games industry (employment wise) anyone who has been in the industry and knows about the policy. All answers are greatly appreciated Thanks.
Depends on the company, but most game developers are pretty open-minded. As long as you don't flash gang tattoos and dress up in wife-beaters, you are fine.
Hmmm. that actually sounds like a good idea, my main goal here is to learn everything thoroughly and properly from the beginning so I can be a good c++ programmer soon. I think forcing myself to do that will help me learn things that I'd usually just happily ignore and let my IDE do it for me. How important and how hard is learning all that? Anyone else think this is a good idea?
A command-line compiler is a great tool to learn. You will use it at some point in your career, and I'd recommend using that over an IDE at this point in time. IDE like VS can spout out error because of IDE config errors, not your code. This can confuse beginners a lot, thinking that their code is wrong while in fact, the IDE is messed up.
Also while I'm here, should I start with c++ 11? I know nothing about the different versions, is it backwards compatible? is it or will it be the standard soon? which version do you recommend I start with and why? The only concern I might have about that is that its new and might not be as well documented, I love have a wealth of resources when learning something new and complicated like c++.
I don't know much about C++ 11, but last time I tried to use it, the compilers have yet fully support all the features of C++ 11. You will get different results depending on which compiler/IDE you use (GNU, VS). I would suggest that you stay away from it for now. It's an extension of the language, not a whole redesign, so you won't miss a thing.
Anyone have any other general suggestions for learning resources or tips? I wanna learn this as thoroughly and as well as possible but I'm also eager to get my hands dirty with some real programming as soon as I can
I would focus on pointers, ctors, and dtors, as that's one of the main differences between Java and C++. When objects are allocated/deallocated in C++ is a whole different thing.
Yes, this is a good example for preprocessors. What preprocessors do basically format your code before passing it on to the compiler. So essentially, you can add/remove certain parts of the source code depending on the flags of the preprocessors you have setup.
For example: you have this code:
Before compiling for iPhone, you set IPHONE variable to true, and WEB to false, and thus the code after being preprocessed will look like this:
Well yes, English. Beyond that, your knowledge in technical aspects is the only ticket to loosen out that tension.
Most frustrating communications I ever encountered with artists, or graphics designers, or UI designers, is that they don't usually understand the enormous task necessary to implement their artwork. Adding just one layer in Photoshop could equal to 10K lines of code with rigorous testing depending on what you are asking for.
This is an example that I run into just recently.
UI Designer created an assets for some product. It is obvious in the spec he created that the locations of every single thing is hardcoded in pixels. 10 pixels between button A and B, 23 pixels between button C and D, font size 12, etc. That's not going to work when you create a product on which the environment can be of any resolutions -- yet somehow he didn't get this and continue to give specs in pixels.
You artists have the benefit of working on a constrained environment. Your canvas has fixed width and height. You can fine tune each pixel or voxels or polygons, and paint brush imperfections. Programmers work on open-ended environments, in which he has to abide to the principle of generality. One code fits all. The code has to run on every single hardware combination with every single resolution on every single machine out there. So, we tend to approach problems as a whole, and fix the whole thing in one shot.
This introduces something that we all programmers hate, special cases. Special cases like "Can we bold the letter R right in the middle of that text, and then have the letter Z flash red every 10 seconds, and have the whole thing spin around, and only to do this when the hero died from the backstab wound, but in every other case, the text must flash blue-green and spin on the z-axis, because I think that'd be cool?" will drive programmers nuts.
Unfortunately there's nothing you can do to understand us except putting yourself in our shoes (learn coding) and see it from our perspectives. I have had the most pleasant experience working with artists who also happen to have done coding themselves.
You want to step away from tutorials at this point. You need reasons why writing clean code is better than messy code. At this point, your brain can't tell the difference, and likely won't make a change unless you are running into situations where clean code is preferable than messy code.
1. Read your own code from a few months back. If you can still read it and understand it, you are in the right direction. 2. Work on a small app or game, and try to make it bug free. It's the hardest thing, and that's where your messy code will hurt you the most. 3. Then try reuse that code you wrote. Are they reusable? Is it easy to reuse them, do you have to strip off a lot of dependencies for using just one small chunk?
Repeat this process infinitely, your code will get cleaner and better, and less buggy.
Both responses where very very helpful. in fact i have experienced this problem with I/O when trying to load geometry. the process of loading geometry hangs up the entire program and the more complex the geometry the longer the wait. So from what i understand threading would allow me to load geometry on the side of my program with out halting the main thread? I am assuming it would still take time but it would not stop one from continuing interaction with the main program being run by the main thread?
Yes. Although it sounds very simple, you would need to design your multi-threaded app very carefully. You now have multiple lines of code running concurrently, which thread access which lines first cannot be controlled. This could introduce a slew of bugs that are hard to debug.
A good practice is to keep the code separated between threads. For example, I/O code only accessible by I/O threads.
PnZjerry, I don't think you understand game development. Your tools is great, but hardly usable for game development. "knock out 50% of your time", "how SVG can increase productivity and interaction with the users" are some pretty wild marketing claims!
There have been vector-art games out there since 1980s, and just the fact it's vector art does not make it easier to develop, or "increase interactions with users."
Btw, judging from your web design, it looks like you haven't been on the web since 1990, there's this thing called Flash games. Look it up. The majority of the games there uses vector art.
You should try saving integers to a binary file using std::ofstream. Then, try adding strings, and see if you can read them back from the file you just saved using std::ifstream.
Once you are successful at that, you should get an idea how to write/read the primitive data types to/from files. Classes are composed of primitives, so saving a class is just a matter of saving and reading primitives in a particular format.
Many IDEs and command line tools I use daily are based on Eclipse (which runs on Java). With large projects, you always run into the default memory limit. You google the error and go change the command line settings or config file to manually specify a larger memory limit.
Eclipse is a crappy IDE. I still have no idea why a lot of people are supporting and using it, as if it's the only Java IDE. I open my project, Eclipse complains 100+ errors. Close project. Close Eclipse. Reopen Eclipse. Reopen project. Errors are gone! wtf?
I have been using IntelliJ, personally and professionally, and I couldn't be any more happier. Intuitive shortcuts (i.e. Ctrl + / to toggle comments!), great refactoring tools, syntax highlighter, seamless versioning integration, even more than what Visual Studio comes with. It has the free community edition too.
I think it was a bad analogy, I'd look at it more like tools in general, a carpenter won't use a hammer to divide a board in 2 parts, he'll use the saw (And if you see a carpenter trying to bang a nail in with a saw, well... either he is a programmer who thinks one tool is all you need or he is insane)
Ultimately, Java or C# or C++ do not matter. You really should consider programming languages as musical instruments, and you use them to play your music. Some instruments work better for certain types of music. But just like any other good musicians, a programmer must learn how to play not just one instrument, but several. Depending on what music he wants to play, what mood he wants to convey, he picks up the right instrument and play it like a maestro.
It seems like musicians have a speciality though like Yo-Yo Ma.
Of course, just as there are programmers who only code in C++, ASM, Cobol, Java and nothing else. It's a matter of preference. But even Yo-Yo Ma, I'm pretty sure, has played other instruments before settling on the cello.
Since you are a beginner, pick one. Java or C# really does not matter. C# has XNA for games. Java, on the other hand, has plenty of 3rd party libraries, but also allows you to make games for Android. Pick your platform (XNA or mobile), then start learning.
Picking one makes sense, but I think the decision matters and depending on the person could see them deciding to focus on C# or Java. If I were forced to pick between those two I think I'd pick C#. The performance of this compression library on different languages is kind of interesting.
At this early stage, any performance benchmark doesn't matter. Why is he going to do now, write an algorithm computing 1 billion data points for secret military operations in Nevada? Think about it in utility sense. Java and C# are probably two languages that are the closest to one another in term of the syntax. The main differences between the two of them are the platforms they are typically used for. Now the question becomes which platform that the OP is most comfortable in. Choosing one does not mean that he's stuck at that for the rest of his life. Choosing C# does not mean "Oh no, Windows forever! Apple is getting popular! I can't switch anymore!" Choosing Java does not make you are a slave to JVMs. He can be learning C# now and switch to Java 2 years later, or vice versa. Can't you see how trivial choosing a language is, especially between C# and Java?