Jump to content
  • Advertisement

Thiatsii

Member
  • Content Count

    25
  • Joined

  • Last visited

Everything posted by Thiatsii

  1. Thiatsii

    C++ starter

    This has kept my sanity intact as well.   I too came from console code to the windows side and was damn near overwhelmed at how to make the transition. About 3.5 months ago I decided to take the hard route by not going with SFML or such. I went with DirectX alone. What I learned was that everything done in windows is through the Message Procedure. I think it took me two weeks to correctly separate the DirectX calls into their own class with a pointer to the MsgProc using a callback. This, so that I can pump key or mouse events directly back to my graphics code. My difficulty lay in that many tutorials had everything on a single page, or they separated the directX but, kept handling key and time events by passing them to functions to call other functions: not because it was performing input handling, but simply because of the way the classes were related. Frustrating at the time. Yet, this to me signaled that I needed to understand what was going on.   Start with 2D and learn it fully. I say this for two reason: first, most everything will carry over into 3D and the 2D is what you'll use for a GUI or HUD; and second, it really helps you play around with concepts as you learn. I started with just getting a sprite to move and rotate from a top down perspective. Now, add linear interpolation to your movement and SLERP for your rotations so that they have smooth acceleration/ deceleration. Build on it by setting a point to move to when you click the mouse. Also have the object start to move with a keyboard press, and on the next press have it decelerate to 0. By breaking these concepts into simple chunks, it kept my sanity intact because I could directly see the results of my learning progress. Also, it helps me to work on two or three separate problems and switch between them when I start getting frustrated with the current one.   Keep a separate journal and write about your problems. For me, it was amusing to look back and see what I was having such difficulty over then. It was also a great boost to my spirit as I saw how I kept tackling, what at the time, seemed insurmountable.
  2. Thiatsii

    Problem Solving Using Vectors

    Thank you for the concise explanation with clear code examples.
  3. Greetings All.   After a few months of searching the web and this site, I wanted to share my observation as a beginner to graphics programming. So, without further ado, here I go: FYI: This is not meant with any animosity. It is offered more as a report on the current state as seen, offered in the dry 'Dragnet' voice of, "Just the facts, Ma'am."   There should be concrete examples in the 'Beginner's Resources.' Like the human genome, I don't believe 'Best Implementation Examples' should be patented or relegated to super-secrecy. Yes, you're not going to learn anything if all you do is cut-and-paste; but, if you're like me, who takes a piece of code and breaks it apart to fully grasp it, then us 'Noobs' would not be filling the forum with so many questions. A case in point would be Input. When I began a few months back, I was trying to tackle Direct Input. I should have been spending my time on RAW Input instead. I realized my mistake recently while reading through these forums. Here's an example which should be in the beginner's resource Designing a Robust Input Handling System for Games, by ApochPiQ. At least, it should be there if the off-site source code was explained a bit more clearly. I understand enough to know that, following this example would vastly improve my knowledge of how a game engine interacts with different aspects of my game, simply through the Input system.   There is a vast amount of code going on under the hood just to get the graphics up and running. I keep seeing people referred back to the DirectX SDK for examples which is fine if dealing with anything other than DirectX itself. These examples can be confusing because they're bare bones and don't fully implement error-checking. I started learning with the Rastertek DirectX 10 tutorials. Finally, when I started onto DirectX 11, I stumbled on Chuck Walbourn's blog which gave references to the new dxerror files you need to download and use. Although I might not have found it yet, there should be source code available in the beginner's resources or DirectX, for a solid implementation that includes feature checks, device capability, error-handling, lost-device, and properly switching between windowed and full-screen modes. Once all this stuff is in place, everything then comes down to the actual graphics programming. And, when the beginning programmer has the ability to get input from the user, any further questions would then be on dealing with specific graphics related items.   Of course, I'd love to see a good implementation for handling and or creating entities such as sprites with different AI, etc.   My whole point, really, is that a few solid source examples in these areas, would save a great deal of time searching for articles that may or may not supply code that actually works. Beginners need a solid foundation, and good coding practices. Example code that can be built upon is extremely valuable. I know that on multiple occasions, I've followed along with book code examples only to learn after 4 hours that it doesn't compile. What did I learn from that? I'm sure much of it was workable, but in the end, I had to throw it all out and start over.   Peace!     If there is sufficient feedback to this post with useful suggestions, I will put them all together into an article to cover those topics. I, for one, am still trying to get all this together myself. I'll make the time to offer both DirectX 9 and DirectX 11 full implementations (I mean the checking, error-handling, etc,.. not the installer portion).
  4.   I knew immediately that I needed to learn this no matter how difficult [to me]. Your comment reminded me of an Indian saying, "Do not seek for enlightenment unless you seek it like a man whose hair is on fire seeks water."
  5. I'm running on Win7 pro using MSVS 2010 Pro. I've started with DX10 and C++, but have come across multiple references to using DX11 or DX9. In essence... I've already spent 2 months learning DX10; I don't want to waste time on this version if I should migrate (I'm not worried about supporting Win8).   I appreciate any feedback.
  6. Thiatsii

    Which DirectX Version?

    Just found a new forum topic related so I'll add here:   DX12 - Documentation / Tutorials?
  7. Thiatsii

    Which DirectX Version?

      It seems like Microsoft made things more difficult to work with DirectX from version 10 on. Is this the reason so many people are still programming for version 9.0c?
  8. Thank you Álvaro, BHXSpecter.   I agree that pseudo-code is an invaluable asset to learning. In fact, I write up a lot of my own conceptualizations as pseudo-code. There are many great articles where I find all I need is the the idea of the code expressed in order to grasp it.   Where solid examples would be appreciated though, is getting the initialization (DirectX) code worked out, and grabbing raw input in a tiered approach. As far as the raw input, I'm not saying you have to go crazy in implementation, but a working example that can be understood so the beginner can see how it all fits together would be a great boon. The link on RAW input (from this site in the developer's journal "The Bag of Holding") was explained well for the concept, but when I open the example source code I feel an absolute Noob. If I didn't see it's immediate value, I wouldn't be banging my head against the wall as I try to figure out concepts which I have not delved into before.
  9. Thiatsii

    Which DirectX Version?

    This was an excellent clarification. Thank you.
  10. Exactly!     I'm coming into this from the Animation side where I want to insure proper 'tweening' and set those ease-in and ease-out of keyframes in a coded environment. Coding is a lot more difficult than I anticipated... but I refuse to give up. Once I can get them working like a proof of concept, I can then delve into the coding needed to make it all fit together. Hardest part is keeping a clear and ordered path to learning.
  11.   I just put a caveat at the top of my post to explain that it's more of a Dragnet style voice for the report... no animosity intended.   In this topic I was speaking more in the general sense which applies to all versions of DirectX.   C++, Direct3D 11, and RAW input since MSDN does not recommend Direct Input for mouse and keyboard. Also, before I even attempt it, I need to decipher ApochPiQ's source code for robust input handling. I had started out with DirectX 10 and 9.0c and had the Direct Input working, but I realized that since DX11 supports windows 7, there was no reason I shouldn't take full advantage of all the new features, math included, by learning version 11. I own a copy of VS2010 pro, but to fully take advantage of the new items, I grabbed a copy of VS2013 Express Update 3 for Desktop. Yes, I am using the DirectXTK.
  12. Onto figuring out Input mapping.
  13. Question on How to Proceed?   Should I start an Article and have a massive amount of updates/revisions to be referred to?    Or... Should I start another Forum Topic with the code that needs to be revised through collaboration?
  14. Oh, sad but true.  Why should knowledge that benefits all of mankind be secreted away? I agree with paying an instructor for his time, but I don't believe I should have to pay for courses at a college/ university if I've already learned the subject. I should be able to challenge it and if need-be, pay the accreditation cost. The same thing applies to school text books teaching the same stuff that is open-source. Somebody is making money here and it sure isn't the student, and rarely the teacher.   I will freely share what I learn after I get it into a more cohesive form. Now, if only we can find some more open-minded professionals.
  15. I understand about the property rights, I just disagree about its usage. In my case, if I uploaded a 'Metallica' mpeg onto a secret computer, then only until a Security Officer verified that this was not indeed 'Secret' and reclassified it, that mpeg would be considered 'Secret'. Stupid-right?       I'd love to collaborate on some of the examples. The only reason I didn't start with an article at first, was that I haven't solved some of these issues... like the switching between windowed and full-screen that properly resizes the buffers. I didn't want to fill this up with a bunch of code that wasn't worked out yet.
  16. Thiatsii

    Designing a Robust Input Handling System for Games

    First, I thought I was sending a comment until that horrible moment when I realized I PM'd instead. My apologies ApochPiQ.   Second, I realize that this is exactly what I have been looking for and the post was well done. However, I am unable to follow the off-site code example. Some 'Stupid Action' gets mapped where? I'd love to follow a 'chain-of-custody', for lack of better words, through the different pages of code.
  17. Thiatsii

    Which DirectX Version?

    Thank you, Buckeye. I'll keep that in mind once I get DX11 working smoothly.    A big reason for my migration was hearing of all sorts of stuff from earlier versions disappearing into obscure regions of DX11; such as  searching for tutorials on sprites and learning that now its best to use the XTK.  I want sprites for UI because they always face the camera... unless they've changed that too.
  18.  hmmm... I wonder where the cat got off too?   What I just learned by doing things the hard way: 1.)  I needed to target version 8.0 and not 8.1 of the Win SDK. [After deleting and reinstalling VS and Win SDK]. Now Matt Guerrettes tutorials compile and run just fine. 2.)  That I still have issues with the new samples. But, I figure if I stick to the first working thing, I can move the sample code into that. 3.)  That I still don't know which version of the Win SDK/ DirectX I really should be concerned with getting under my belt. I know I want DX11.   So, my revised question would be: What version of the Windows SDK should I concentrate on learning when it comes to DirectX?   And where is my cat?   * Right!  Install the Win 8 SDK, then VS 2013 for Desktop and the includes will be automatically set.
  19. I've been coding DirectX 9 and 10 just fine using VS 2010 pro and decided to bite the bullet and make the migration to DirectX 11. The trick is that I'm running windows 7 x64 and want VS 2013 Express Update 3 so I can access all the wonderful new math.   So... I deleted every SDK and VS 2010 pro and installed VS 2013 Express update 3 for desktop. I've tried using it alone, as well as after installing Win 8.1 SDK so that the includes would be correct. What I've read said 2013 doesn't need the win SDK. I've read the boards for linking for the legacy dx, but I'm only concerned with getting files to run on win 7 using dx11. Either way, I've tried following tutorials using VS 2013 for DirectX 11 and can't seem to get the darn thing to work.     I know I'm not asking for the impossible. But if anyone out there has had to figure this mess out and found a solution, please help.  
  20. Thiatsii

    Which DirectX Version?

    Okay... DirectX 11, here I come. I removed the DirectX SDK (June 2010), as well as all other SDKs and VS2010 Pro for a clean environment. I've installed the Windows 8.1 SDK and VS2013 Express onto my Win 7/x64 machine.   However, I am unsure of proper linking in project properties. Which path should I link to if I don't want to worry about legacy, but can still run my program on my win 7 machine?
  21. I hate to admit defeat at finding an answer to my problem, but after 6 hours of searching... I realize I better bite the bullet and ask those who know.   Background: I'm on Win7 64 using MSVS 2010 pro trying to compile Open GL source from Jorge Rodriquez' Math for Game Developers. Project compiles, windows pop up, disappear, and then spits out...   ERROR: 0:2: '' : Declaration must include a precision qualifier or the default precision must have been previously declared.  ERROR:  compilation errors.  No code generated.     Any help at all would be greatly appreciated. 
  22. Thiatsii

    Help with Compilation Error: 0:2

      Nada. Zip. Kaput. Thank you though. Aside: I am in contact with the author and will post up what the result ends up being.
  23. Thiatsii

    Help with Compilation Error: 0:2

    Thanks again for all the help. All I keep seeing is a ridiculous amount of  f  ra   g me  nt ed  fr ag  men ts... and after 13 hours on this I'm just going to give up. Does code REALLY need to be diced into to so many pieces?   This isn't even my code!
  24. Thiatsii

    Help with Compilation Error: 0:2

    Thankyou Ohforf sake, haegarr and BitMaster. I actually managed to get to that page on khronos before I posted here, yet I was still baffled on where to look in the code. Your explanation though, got me right to the model.fs. This Open GL is an entirely different animal which I will have to acquaint myself with. I have to say that the last 2 months has been devoted entirely to DirectX. Yep... noob when it comes to graphics programming. I'm only redeemed in the realms of modeling and animation. Anyhow... this is the file, but I don't have a clue where to fix it. If it wasn't for the awesome video tutorials on math related to graphics programming, I would have thrown in the towel long ago. [source] uniform bool bDiffuse = false; uniform sampler2D iDiffuse; uniform vec4 vecColor = vec4(1.0, 1.0, 1.0, 1.0);   uniform vec3 vecSunlight;   uniform float flAlpha;   in vec3 vecFragmentPosition; in vec2 vecFragmentTexCoord0; in vec3 vecFragmentNormal; in vec3 vecFragmentColor;   uniform mat4 mView; uniform mat4 mGlobal;   void main() { // This 3x3 matrix should have the rotation components only. We need it to transform the fragment normals into world space. mat3 mGlobal3x3 = mat3(mGlobal);   // Dot product of the sunlight vector and the normal vector of this surface float flLightDot = dot(vecSunlight, normalize(mGlobal3x3*vecFragmentNormal));   // Remap the light values so that the negative result becomes positive float flLight = RemapVal(flLightDot, -1.0, 0.0, 0.9, 0.4);   // Multiply that by the color to make a shadow vec4 vecDiffuse = vecColor * flLight;   // Add in a diffuse if there is one if (bDiffuse) vecDiffuse *= texture(iDiffuse, vecFragmentTexCoord0);   // Use that as our output color vecOutputColor = vecDiffuse;   if (vecDiffuse.a < 0.01) discard; }[/source]
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!