wisey

Members
  • Content count

    22
  • Joined

  • Last visited

Community Reputation

144 Neutral

1 Follower

About wisey

  • Rank
    Member

Personal Information

  • Interests
    Art
    Design
    Programming

Social

  • Twitter
    @stevenwiseguy
  1. Hello there I need a good text book containing exercises for (Maya and Unreal Engine) so that I can create some new and original content. For programming I have been using C++ Primer which satisfies my need to write code but I also like art and design. Please can you give some advice about which text books I should buy. I already know the basics of both (Maya and Unreal Engine) since I have created stills in Maya and designed a level in Unreal Engine. For example, character art would be about (modelling, shading, rigging, animating) and importing into Unreal to hook up some gameplay code. I just wanted you to know that I don’t need to learn these tools from the ground up because I already know them quite well. But rather I need some constructive guidance in the form of exercises that will enable me to create some new and original content using these apps. — Wisey
  2. learning vc++/directx

    Thanks for your replies so far. I also sent a message to somebody working for Ubisoft but he seems to be ignoring every attempt I have made to contact him. Obviously, I would prefer to get advice from a professional so special thanks goes out to Jason Z.    I am going to wait a little longer before I decide how to spend the next year of my life.    -- Steve
  3. I need some advice about reading material for learning vc++/directx programming. I am working on some prototypes in visual studio using DirectX. I am trying to demonstrate simple things like how to use c++ to do sprite animation in interesting ways. Specifically, I am working on a graph editor for building nav meshs for bots to use A* pathfinding to find a users own ship (simple sprite). The app checks for user input and re-draws the new position based upon the result. And the bots calculate the shortest path each time through the loop and the language moves the bot closer to the user’s ship.   Anyhoo. I am getting into difficulty with the language and specifically how to implement design patterns. The problem is obviously that I have never read any official tutorial style book about c++ before. I have Stroustrup’s book for reference. And I have followed tutorials, just clearly not enough of them to be able to turn concepts into code. I have also watched a lot of video tutorials.   What I have been told to do by the guru’s on freenode’s #c++ and here (GameDev.net) is to read a book. The guy’s on #c++ have a list of books (some of them are very dated). And one of my thoughts was since I am using vc++ to interact with DirectX that I should buy a book centred around that specifically. Rather than just command line c++ stuff. I am at a loss as to what I should read. And by read, I mean that I want something that I can read cover to cover, word for word. Just to absorb as many skills as I can.   At least if I do this then the guy’s on the forums and in chat can’t fob me off by telling me to go and read a book. I really don’t want to jump back into the code base I have been working on until I have completed a thorough treatment of a decent text book.   So my question is this. Can you recommend a book? I feel at this stage that just one book should be enough. The reason I am coming to you is that you are a professional vc++/DirectX coder amongst other things.     -- Steve Wiseman    
  4. Input

    Somebody in irc said that there's no replies because this is a boring topic field. But i'm quite stuck with this problem. Please help. I understand that it might be my c++ skills that are lacking. -- Wisey
  5. Input

    I’m trying to port some C#/xna code into vc++/direct. I’m struggling with keyboard and mouse input yet again. I hope you can offer some suggestions. I’m not going to write a test case because the problem pertains to how input is handled in WinAPI etc. My problem is the way the C# code handles keyboard and mouse input. As you can see by the C# code below, KeyboardInput provides the functionality for handling key releases and mouse down, mouse up and mouse move. [url="http://ideone.com/TO4rl"]http://ideone.com/TO4rl[/url] It uses syntax like this: MouseInput.MouseDown += new MouseClickHandler(MouseInput_MouseDown); I’m not sure what’s happening with this code but I assume that when somebody clicks the Mouse Down then the MouseInput_MouseDown() function is being called. If you compare this to how I’ve been laying it out in c++. [url="http://ideone.com/Cbjw5"]http://ideone.com/Cbjw5[/url] [url="http://ideone.com/VMGHd"]http://ideone.com/VMGHd[/url] As you can see, each down and up of a key or mouse button has its own bool. And then I’m performing logic depending on the state of these bools. But i’m finding that there is too many of them, and I never know where to reset the state of them. I’m posting the state of these bools from main here: [url="http://ideone.com/g3Q1B"]http://ideone.com/g3Q1B[/url] My main issue is that my update method is going to become too cluttered. And using this method is very slow progress. One thing i’ve considered is separating out the triggering of each event into different methods but update is being called repeatedly and I only want certain functions to be called if a given set of conditions is met (if a key is pressed or released). So where do you think i’m going wrong and how can I change it for the better. Oh, I realise that Logans XNA code has types for handling input (MouseInput and KeyboardInput). These are built into xna. I’m assuming it has overrides for the += but i’m reaching the limit of my understanding just saying that and have no idea what I’m doing. So is there a library of code built into vc++/directx to help me handle this. Is there a lib I can install and use, or do I have to write something to handle this myself. I’m kind of answering my own questions as I write this which is why it is good to post questions on forums. It helps you understand your own problem better. -- Wisey
  6. Keyboard and Mouse Input

    Oh thanks Washu I didn't know you could google the error's like that, thanks. So the first link told me to add some braces which solved the error but now I have more errors. [url="http://ideone.com/bRN80"]http://ideone.com/bRN80[/url] So this time I tried googling [color=#000066][size=3][background=rgb(240, 240, 240)]error C2146[/background][/size][/color] and [color=#000066][size=3][background=rgb(240, 240, 240)]error C4430[/background][/size][/color] and it didn't really help. There is nothing wrong with the code asaik but i'm probably missing something. Without showing you my entire code base I realize you may struggle to help me. But I know that some of you guys are very good at reading the output from a compiler. For instance, I used to just copy and paste entire lines from the output. When just the error code will suffice. So I don't know, maybe you can help. Thanks -- Wisey
  7. [url="http://ideone.com/gO3wy"]http://ideone.com/gO3wy[/url] I'm trying to extend how my app handles input and I don't know why I'm getting trouble with WM_LBUTTONDOWN. The compiler says this: [url="http://ideone.com/r3joy"]http://ideone.com/r3joy[/url] Obviously I can't write a test case for a directx app so where do you think i'm going wrong with this? Please let me know if you need more help, and I do appreciate that you don't have the ide with my project running to test things. Do you think it could be problems elsewhere because i've updated code in other files too. -- Wisey
  8. WM_KEYDOWN and WM_KEYUP

    [quote name='tomalak' timestamp='1337544629' post='4941706'] You forgot a [font=courier new,courier,monospace]break[/font]. [/quote] Thanks tomalak It works with the break. -- Wisey
  9. WM_KEYDOWN and WM_KEYUP

    It looks like in main that WM_KEYUP is being fired off and the values changed even though the key hasn't been released. I working this out by commenting out the lines where the bool's are being set on a key press. If I do this the mode doesn't change. Any idea's why WM_KEYUP is being fired as soon as the key is pressed inwards? -- Wisey
  10. I have some code that is supposed to detect when a key has been pressed and then released before it displays the correct text: [url="http://ideone.com/1j2Gk"]http://ideone.com/1j2Gk[/url] I want both actions to be completed before it changes the text around. [url="http://ideone.com/XEulf"]http://ideone.com/XEulf[/url] As you can see, i'm waiting for pressed and released bools to be set before it changes the text around. The problem is, is that it is changing the text as I press the key in, and not waiting until it has popped back out. Its probably something really simple that i'm missing here so I thought I'd ask you guys. -- Wisey
  11. So I need to experiment with mouse and keyboard input and i'm using DirectX to render sprites in this pathfinding app that i'm building. I checked out the latest DirectX SDK documentation and they say this: "The use of DirectInput for keyboard and mouse input is not recommended, Windows messages should be used instead" It links off to a doc on how to use Windows messages. Specifically it describes WM_MOUSEMOVE and this links to the msdn documentation. I also read about the same stuff here: [url="http://www.toymaker.info/Games/html/input.html"]http://www.toymaker....html/input.html[/url] tbh, the raw input stuff looks more complicated than just straight keyboard input and mouse input. Am I right in thinking that Keyboard Input done with Windows Messages in this way is based off the Windows API. Because I don't think it is part of DirectX. XInput and DirectInput are part of DirectX. I suppose the reason for my post is to ask if Windows messages is the usual way of tackling keyboard and mouseinput? And also, what is the best way of getting this information over to the rendering part of my code base. I have already started using Windows messages to pass x, y screen co-ordinates of the mouse over to some rendering code like this: [url="http://ideone.com/4Ho4F"]http://ideone.com/4Ho4F[/url] But I imagine that with all of the input I need to process for my project, the [color=#000066][size=3][background=rgb(240, 240, 240)]WndProc() [/background][/size][/color] function is going to become quite crowded. -- Wisey
  12. Mouse State in DirectX

    For some reason my app miraculously started to work with the code I was talking about earlier. [url="http://ideone.com/LRW8d"]http://ideone.com/LRW8d[/url] I had other issues elsewhere in my engine that were causing problems. And when I finally got it working as I wanted, I had issues with memory leaks. I tracked the issue down by commenting out various code until the memory leak was isolated. I've talked to people on irc that say I need to learn and implement autopointers. They say that i'm not using my systems memory properly. Part of my mission is to understand more about memory management and I must admit, my current understanding of c++ is limiting the speed at which I code. Right. Back to the drawing board. -- Wisey
  13. Mouse State in DirectX

    I've almost cracked it [url="http://ideone.com/PUM7l"]http://ideone.com/PUM7l[/url] My problem is in the case WM_MOUSEMOVE: section xPos and yPos are giving integer values for the screen position, but I don't know how to pass this information onto the objects that require this information in their rendering code. As you can see, I have tried creating a function called SetMousePosition that resides in another class which sets the value of xPos and yPos. But i've checked in the debugger and this information is not being set properly. Also, if the mouse pointer is outside of where the app resides on startup, then this causes a runtime error before xPos and yPos are even set. Any ideas on how I might solve this? -- Wisey
  14. Mouse State in DirectX

    Please let me know if you know of a tutorial that explains how to do it. I'm going to have another crack at it right now. -- Wisey
  15. Mouse State in DirectX

    Hi Tispe I have this code in my main function: [url="http://ideone.com/nIHIv"]http://ideone.com/nIHIv[/url] I suppose you are talking about the WndProc() function. I don't know what you mean really. Can you elaborate on what you said. -- Wisey