Advice on Programming

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4

47 Replies - 3945 Views - Last Post: 29 June 2013 - 02:31 AM

#31 Dilshad1  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 14-June 13

Re: Advice on Programming

Posted 19 June 2013 - 01:26 PM

View Postmacosxnerd101, on 19 June 2013 - 07:38 AM, said:

C++ is the industry standard. XNA can be used for PS4. You're quite a ways off from writing a game of significant complexity though. Start small and work your way up.


Oh most definitly! I am going to start way smaller for now, and slowly with pace work my way up. Just wanted to get as many resources as possible so I can be prepared in advance.

How many hours of study should a beginner do in this case? Any preference how one should study in the new programming field?
Was This Post Helpful? 0
  • +
  • -

#32 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9579
  • View blog
  • Posts: 36,298
  • Joined: 12-June 08

Re: Advice on Programming

Posted 19 June 2013 - 01:28 PM

Quote

How many hours of study should a beginner do in this case?

Until you understand the concepts.

Quote

Any preference how one should study in the new programming field?

Work through examples, and then branch off and make up a project or two of your own.
Was This Post Helpful? 0
  • +
  • -

#33 Dilshad1  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 14-June 13

Re: Advice on Programming

Posted 19 June 2013 - 01:29 PM

View Postmodi123_1, on 19 June 2013 - 07:40 AM, said:

View PostDilshad1, on 19 June 2013 - 08:29 AM, said:

Can Visual C++ be used for video game programming as well? Such as xbox, PS4, etc? Or only C++ is considered for video game programming?


It would be more C++ and less of the 'Visual' part. C++ with DirectX.. or C++ with OpenGL.. etc.



How about Python? OpenGL sounds interesting
Was This Post Helpful? 0
  • +
  • -

#34 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9579
  • View blog
  • Posts: 36,298
  • Joined: 12-June 08

Re: Advice on Programming

Posted 19 June 2013 - 01:31 PM

What about Python?
Was This Post Helpful? 0
  • +
  • -

#35 Dilshad1  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 14-June 13

Re: Advice on Programming

Posted 19 June 2013 - 01:34 PM

View Postmodi123_1, on 19 June 2013 - 01:28 PM, said:

Quote

How many hours of study should a beginner do in this case?

Until you understand the concepts.

Quote

Any preference how one should study in the new programming field?

Work through examples, and then branch off and make up a project or two of your own.



Sounds good, will give update in a week of how it's going :)

View Postmodi123_1, on 19 June 2013 - 01:31 PM, said:

What about Python?


Can you use C++ with Python for video game programming?
Was This Post Helpful? 0
  • +
  • -

#36 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 9579
  • View blog
  • Posts: 36,298
  • Joined: 12-June 08

Re: Advice on Programming

Posted 19 June 2013 - 01:35 PM

Yeah.. it's an option.

Example:
http://www.boost.org.../doc/index.html
Was This Post Helpful? 0
  • +
  • -

#37 Dilshad1  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 21
  • Joined: 14-June 13

Re: Advice on Programming

Posted 19 June 2013 - 01:38 PM

View Postmodi123_1, on 19 June 2013 - 01:35 PM, said:

Yeah.. it's an option.

Example:
http://www.boost.org.../doc/index.html


Thanks, will keep in touch and let you know how I'm doing :D hopefully if I get it ....
Was This Post Helpful? 0
  • +
  • -

#38 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10819
  • View blog
  • Posts: 40,334
  • Joined: 27-December 08

Re: Advice on Programming

Posted 19 June 2013 - 02:00 PM

If you said that this is your first attempt at learning programming, better to learn one language for now rather than two.
Was This Post Helpful? 1
  • +
  • -

#39 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 1
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Advice on Programming

Posted 19 June 2013 - 05:25 PM

I feel you have absolutely no direction on how you wish to learn how to make games. The way that I learned, as has already been pointed out, is to actually learn to program first. I can see already that you are not going in the right direction at all in your quest to make games. Why? Because you are very heavily relying on others to direct your path, and if you can't even direct your own learning you have no chance of making games.

Think for yourself, work out what you need to do, do it!
Was This Post Helpful? 1
  • +
  • -

#40 MarkDev  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 17-June 13

Re: Advice on Programming

Posted 20 June 2013 - 08:31 AM

View PostButchDean, on 20 June 2013 - 01:25 AM, said:

I feel you have absolutely no direction on how you wish to learn how to make games. The way that I learned, as has already been pointed out, is to actually learn to program first. I can see already that you are not going in the right direction at all in your quest to make games. Why? Because you are very heavily relying on others to direct your path, and if you can't even direct your own learning you have no chance of making games.

Think for yourself, work out what you need to do, do it!


Exactly.. He wants to learn programming instantly without spending much time and effort to understand the basics. You're thinking more about what the language can do than what you really need or what you need to do.

Programming is process of learning, you have to work your sucks off as they said and it would definitely take time, that's why it is important to have some goal that is achievable even just a simple such as i.e print a text on the screen, changing the colour background, clearing clipboard, switching text places etc. something that is very basic even if it's seems to be stupid and doesn't have logic at all, and then progress to something more complex (not talking about games yet) by using different statements of the language of your choice. It is also important to focus to only one specific language and to note that you won't learn by just reading online books & resources and posting on forums without properly digesting them.
Was This Post Helpful? 0
  • +
  • -

#41 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 592
  • View blog
  • Posts: 1,322
  • Joined: 24-April 12

Re: Advice on Programming

Posted 20 June 2013 - 11:09 AM

You asked about C++ and DirectX in the Game Forum, but the thread was closed and I believe that this is the "duplicate post".

I'm actually doing this right now. I've done a little C++ with DirectX before, but it was a long time ago and fairly simple stuff.

I tried OpenGL recently, but I didn't find hardly anything in the way of instructional books or even tutorials. The best tutorial I found left a whole lot to be desired. I think I've decided to abandon OpenGL for a time and get good with DirectX. Either way I'm looking at learning C++11 (Again, I've done C++ before but that was years ago and 11 is the new standard.) I'm currently reading a C++11 book, an OpenGL book (which I'll probably back away from for awhile), and a DirectX 11 book (or two...).

I would prefer to do OpenGL just because I'm mad at Microsoft right now (in general but largely over XNA) and would like to support Linux and especially Linux game programming.

Keep in mind, I'm arguably "experienced". I've got a pretty good idea of what I'm doing. I know a whole lot about game programming, especially in 3D. I know C++, even though I don't know the new C++11 or STL. I've at least done some basic 2D graphics programming in DirectX 9 before (back when it was a fixed function pipeline). I've written a few shadders in HLSL apart from just following tutorials, and actually understand the vector math behind them as well as the underlying techniques. I've done some Windows (Win32) programming in C++ before. I know basically how Windows memory management works (although I'm questioning whether I have to get into that immediately, but its kind of an advanced topic that can be necessary when dealing with large quantities of data - such as typically found in big video games). And so on and so forth...

I'm a bit aprehensive about approaching DirectX with C++. If that tells you anything. I know this is going to be difficult, but I have a fair idea of what I'm getting into and I'm not afraid of the journey.

And that's the key. You have to realize it is a journey. If I could tell you how much work, practice, and time its going to take, you would almost certainly abandon the idea of game programming and never look back. Fortunately, ignorance is bliss and not knowing how long and arduous the journey is makes it a lot easier to travel. But my point is that you will have to learn to enjoy the journey itself or you will never have a chance of success. I approach the whole thing as learning "techniques" rather than building the uber-super-ultra-game. The more you learn, the more you can do. And with some guidance, you can do quite a bit just starting out.

So first, I'll answer your question and then I'll give you my suggestion. If you want to join me in this journey to learn DirectX 11, I've got a reasonably good tutorial for you.

http://www.rastertek.com/tutdx11.html

There are probably other tutorials but I've compiled his basic triangle tutorial and it works. This can at least let you know you are on the correct path. I downloaded the latest free copy of Visual C++ 2012 Express edition to do this since I could not get DirectX SDK for Visual C++ 2010 to actually work on my Windows 7 64 bit machine. 2012 has DirectX built into it and so you don't need a seperate download. (I fought 2010 and the June 2010 SDK for a couple days before giving up and downloading 2012 - I went from VS Ultimate to Express, which is part of the reason I hesitated. My MSDN subscription is expired and I didn't want to wait to get started.)

His tutorial is good, but I suspect he is over complicating things. I'm also going through the book Beginning DirectX 11 Programming which gives me a second tutorial to work through.

http://www.amazon.co...ords=DirectX+11

Also keep in mind that there was a huge jump between OpenGL 2.0 and 4.0 and the same jump between DirectX 9 and DirectX 10. Both got rid of the fixed function pipeline and my understanding is that that means you can't do ANYTHING without learning HLSL/GLSL, which is a very advanced game programming topic that is equivilent to throwing beginners into the deep end of the pool with lead weights on their feet.

The main problem with OpenGL is you need additional libraries or SDKs to do sound, input, and everything else other than graphics and DirectX11 has that built in. I plan on going back to OpenGL once I know what I'm doing in DirectX.

I hope to eventually write the tutorials that you are asking about where I explain how to do video game programming (or get started anyway) in OpenGL (and I may give in and also do DirectX as well). But that's quite a ways off.

You can download Visual Studio 2012 for free and have everything you need to do these tutorials and doing them (even just copying and pasting the code) will give you some idea of what you're up against. If you feel completely lost, don't be surprised as I'm lost and trying to find my way through these tutorials as well. I know I'll find my way eventually, but I may have to read every line of code in the examples 4 or 5 times in addition to reading 4 or 5 books before it will really make sense. I just expect that. That's par for the course.

Now that I've answered your question, I'm going to give you my opinion on what you should do. I would put this off for now unless you feel like you're roughly at my level. I would go download the free copy of VS 2010 Express and download the XNA framework. I would go through RB Whitiker's tutorials and go through a C# book (he has an excelent C# book for sell on Amazon). And then I would go buy an XNA book and start playing around in XNA. It will be 1,000 times easier and most of what you learn will transfer over to C++ and DirectX when you are truely ready. In other words, its not wasted time as long as you are learning about object oriented programming and game programming techiques. A sprite is a sprite is a sprite regardless of which language and framework you learn what a sprite is. Likewise 3D vector multiplication is the same regardless of what language you learn it in. XNA just provides "training wheels" to get in there and start having fun while at the same time actually learning the basics of how to actually do it. It's the whole reason that I feel confident in grabbing the DirectX "bull by the horns" and shouting "bring it on!"

If you spend a couple years with XNA, I think you'll be ready for C++ with DirectX (assuming that you make good use of that time by learning every technique you can).

Now XNA is largely dead, but you can still find books, tutorials, and the software needed to do it. It's more a question of not having a commercial future. However, there's a bit of buzz around MonoGame right now which allows you to write "commercial" games with XNA 4.0.

Anyway, that's my 2 centavos.

This post has been edited by BBeck: 20 June 2013 - 12:17 PM

Was This Post Helpful? 0
  • +
  • -

#42 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 1
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Advice on Programming

Posted 20 June 2013 - 11:20 AM

View PostBBeck, on 20 June 2013 - 03:09 PM, said:

I'm a bit aprehensive about approaching DirectX with C++. If that tells you anything. I know this is going to be difficult, but I have a fair idea of what I'm getting into and I'm not afraid of the journey.

I'm having a problem working out whereby if you are experienced you are apprehensive approaching DX with C++? Surely if you know your stuff the only minor problem would be learning some DX API calls (along with the C++ quirks of course).

When I 'knew my stuff' I just dived right in!
Was This Post Helpful? 0
  • +
  • -

#43 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 592
  • View blog
  • Posts: 1,322
  • Joined: 24-April 12

Re: Advice on Programming

Posted 20 June 2013 - 11:31 AM

OH! I almost forgot. When going through those tutorials in Visual C++ 2012, I had to fix about 60 lines of code. Most of it was changing to explicit conversions on the (LPCSTR) datatype (I believe it was). That was most of the it, but then I also had some path problems with the HLSL files I had to resolve. I DID get it to work in the end though. It was written for VS 2010 and I guess there were a few changes in 2012 that breaks the code a bit, but nothing I wasn't able to work through in a few hours of debugging.

Worse comes to worse, I might be able to post the altered code.

OH! I almost forgot. When going through those tutorials in Visual C++ 2012, I had to fix about 60 lines of code. Most of it was changing to explicit conversions on the (LPCSTR) datatype (I believe it was). That was most of the it, but then I also had some path problems with the HLSL files I had to resolve. I DID get it to work in the end though. It was written for VS 2010 and I guess there were a few changes in 2012 that breaks the code a bit, but nothing I wasn't able to work through in a few hours of debugging.

Worse comes to worse, I might be able to post the altered code.
Was This Post Helpful? 0
  • +
  • -

#44 BBeck  Icon User is offline

  • Here to help.
  • member icon


Reputation: 592
  • View blog
  • Posts: 1,322
  • Joined: 24-April 12

Re: Advice on Programming

Posted 20 June 2013 - 12:16 PM

View PostButchDean, on 20 June 2013 - 12:20 PM, said:

View PostBBeck, on 20 June 2013 - 03:09 PM, said:

I'm a bit aprehensive about approaching DirectX with C++. If that tells you anything. I know this is going to be difficult, but I have a fair idea of what I'm getting into and I'm not afraid of the journey.

I'm having a problem working out whereby if you are experienced you are apprehensive approaching DX with C++? Surely if you know your stuff the only minor problem would be learning some DX API calls (along with the C++ quirks of course).

When I 'knew my stuff' I just dived right in!



Fair question. First of all, I don't claim to be an expert in DX or C++. I have a whole lot to learn in DX. And I'm totally new to the new C++11 standard (not much to fear there other than hard to track memory bugs and massively time consuming code writing with little results).

Second, I've been working in C# for awhile and its been awhile since I've had to write unmanaged code. I'm not looking forward to trying to find difficult memory leaks, but I'm re-studying C++ in learning C++11 and hopefully I will learn to deallocate my memory properly. There's also a little bit of uncertainty around losing the power of the .Net library.

I still remember how it took months to do in C++ what it take hours to do in C#/XNA. (But that was largely because I was still learning.)

Third, I'm headed off to "kick the butt" of the "giant that almost killed me". I fought with DirectX (even back in the DX9 days) for years quite unsuccessfully. I've probably read at least 7 DX books either in whole or in part and was left more confused than having learned anything. I never could get past the starting gate (probably largely because I wanted to skip 2D and go straight into 3D). (I finally had a little success with DirectX 9 when I abandoned 3D and started trying to work in 2D but did not go very far before I discovered XNA and went that direction.) A few years of experience in XNA and I'm confident that I've gotten those critical problems worked out and could handle them in really any language environment. But I still remember how bloody the first round with this giant left me even if I think I can take him with one hand tied behind my back now. The last time I fought this fight I was totally unprepared and comparitively unexperienced. Still, I remember getting my butt handed to me. And they say the giant has gotten tougher between DX9 and DX11 and I'm going straight into DX11 (but again, I think I'm ready for him now).

Fourth, I say I'm "aprehensive" because there is a part of me that wants to quit before I get my butt handed to me again (though I know I'm 1,000 times more ready than I was the last time). I always have a sense of dread come over me when I face something too large to comprehend and overwhelming, in other words - the unknown.

But at the same time, I'm also full of excitement! I'm on my way to "kick the butt" of the "giant that almost killed me" and I'm confident that I've "got him" this time. I'm looking forward to spending my entire weekend this weekend hanging out with my dog and learning DirectX by experimentation and reading.

So fifth, by "aprehensive" I don't mean that I'm going to let my fear get the better of me. I only mention it because I think other people who want to program games might experience the same thing and I want to let them know that that's "normal" (or at least that they are not alone); just fight through it.

I've compiled the code example which accomplishes 98% of what I'm worried about. If I can draw a triangle to the screen, the rest should be easy. But I have to actually understand and be able to write that code myself before I can really claim success. And I also worry a bit that there will be something that takes me by surprise after that.

(I spent a couple days going through the OpenGL "draw a triangle code" and was a little overwhelmed at the shear volume of code. But I started noticing that half the code might have been completely unnecessary. Why do you need a full camera class to draw a triangle on the screen? You need a hardcoded view matrix, is what you need; that's like a couple lines of code. Why is there 10 pages of code for that? Well, there's 10 pages of code because this is a full blown camera class, not just the "basics" of drawing a triangle on the screen. I'm starting to think 90% of this code isn't even used in the tutorial program we have running.)

I've only been working on this for a couple of weeks and have already had enormous hurdles to overcome. I started with OpenGL and realized there would be better instruction available in DirectX. I decided to switch to DX to learn more and come back to OpenGL later. Oh. And then when I did switch over to DX, I couldn't get DX to function. Not at all. After literally a week of just trying to get DX to function (even the example code that came with DX would not function), I finally gave up and went around the problem by installing VS2012 rather than working though the problem by making it work in 2010. (My DX June 2010 SDK installation is obviously completely hosed. It was time to call MS tech support on how to manually extract it from the registry, do a manual uninstallation, and reinstall, but I might as well just do VS2012 since that's the new standard. Which worked immediatly after installation.)


I'm sure I could get back to where I was, doing simple 2D game programming in DirectX. It's been many years and there's a little fear that it will "somehow" be more difficult than it was before. But this time, I'm going to do what I've never been able to do before, which is figure out how to do simple 3D game programming with nothing but C++, HLSL, and DirectX. And so while I'm a bit "aprehensive" and feel a nagging call to "quit while I'm ahead", I'm excited and can't wait to get in there and start tackling it this weekend.

Oh, and part of the aprehension and loathing is because I would rather be studying game programming than learning about a new C++ standard and figuring out how to initialize a graphics card. I'm not really looking forward spending 40 hours studying things I don't want to study in order to be ready to study the things I do want to study. Not to mention that its downright painful to spend hours reading about things you already know about in your sleep like loops and conditional branching, but you're afraid to skip pages for fear that you will miss something that tells you that something important changed in the new standard. Everytime I learn something new with computers I spend 60% of the time going through things I already know in order to find that hand full of things that I don't already know. There's a part of me that wants to be lazy about that, but it has to be done.

Ultimately, I am diving straight end. I meant aprehensive in terms of how I feel. I won't let it slow me down. :-)

Oh. And I did say that I was "arguably experienced", acknowledging that "experienced" was kind of a relative thing. I didn't know we were actually going to argue about my experience level. ;-) (Oh. Wait. Yes I did, that's why I wrote that. LOL) ;-)

This post has been edited by BBeck: 20 June 2013 - 12:39 PM

Was This Post Helpful? 0
  • +
  • -

#45 anonymous26  Icon User is offline

  • D.I.C Lover

Reputation: 1
  • View blog
  • Posts: 3,638
  • Joined: 26-November 10

Re: Advice on Programming

Posted 20 June 2013 - 12:58 PM

If I may offer you a little bit of advice here BBeck, don't make learning C++11 a priority, you're just giving yourself much more of a headache. Here is why:

1. Existing tools do not require the latest C++ standard, so you can do everything you want without knowing the specifics of C++11. I'm only going to learn the new stuff as and when I need it for instance. No point knowing standards if you can't actually code in the language.

2. In game programming the level of experience is determined by the complexity of the games that you can create - not the variety of tools you have used. That is just programming experience in those tools.

3. Do not hold back learning any technology in terms of what already exists to make the games you want to make. It's very simple, if you cannot learn enough to create a game, or you are otherwise fearful of the tech used to create games then game development is not for anyone with such fears. Why? Because learning new and difficult to learn tools is actually part of the requirement(s) to develop games. You have to go in with a level of confidence and arrogance that makes you believe you can move the earth.

:)

This post has been edited by ButchDean: 20 June 2013 - 12:59 PM

Was This Post Helpful? 0
  • +
  • -

  • (4 Pages)
  • +
  • 1
  • 2
  • 3
  • 4