Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

140 Neutral

About hanhau

  • Rank

Personal Information

  • Interests


  • Github
  • Twitch
  1. I know this makes no sense to get, but how many LOC are in this engine ? Could you post me the number ? :)
  2. That is what I also found now. Using Raw Informations seems to be more performant and efficient, altough I dont know yet how to manage multiple connected gamepads or joysticks. But it just needs some reading go get comfortable with it I guess. That shouldnt be now a problem. This helped me a LOT ! Also with designing the whole thing a little bit more future proof for other projects. Thanks !
  3. hanhau

    Gamepad gesture recognition

    a function for this could look like this: #define QUADRANT_TOP_LEFT 0x01 #define QUADRANT_TOP_RIGHT 0x02 #define QUADRANT_BOTTOM_LEFT 0x03 #define QUADRANT_BOTTOM_LEFT 0x04 char getQuadrant(vec2f actual_stick_pos) { if(actual_stick_pos.x < 0 && actual_stick_pos.y > 0 ) return QUADRANT_TOP_LEFT; if(actual_stick_pos.x > 0 && actual_stick_pos.y > 0 ) return QUADRANT_TOP_RIGHT; if(actual_stick_pos.x < 0 && actual_stick_pos.y < 0 ) return QUADRANT_BOTTOM_LEFT; if(actual_stick_pos.x > 0 && actual_stick_pos.y < 0 ) return QUADRANT_BOTTOM_RIGHT; } the you would have to create something like an array with 4 values. So when the quadrant changes, the old quadrant gets in first place, the rest is shifting back. Then you have to do a simple check of the array.  
  4. hanhau

    Gamepad gesture recognition

    If you wanna detect if a stick is rotated (for example in clockwise order), you have to map the two axes in a vector. Then you look if a x or y value changes his presymbol (my bad english, presymbol means "+" or "-" for me). This will result in a change of the actual quadrant of the circle. And if you now detect this row of quadrant-changes .... you have your move. You can add maybe a inner radius, so the player has to make a "big rotation" with the joystick. I hope that wasnt too fast.
  5. Hey Guys, I am currently working on an InputManager, wich should be able to track activities and process Input Events. I would like to support Mouse, Keyboard and Joystick/Gamepad Input. This is how it works (prototype):     -> check for input devices states and events     -> add them into a stack     -> check for registered actions with the events     -> execute this actions So I could create the Action "JUMP" wich will be bound on the "space" key and another key like "e". Then it checks for inputs and when the input is "space", it will look up in the actions and execute "JUMP". So far soo good, now I wanna get the Messages from my window (winapi window). I saw that you can create WindowHooks, but I saw just ones for Mouse and Keyboard. So I thought just putting the message handling in the Main-Window-Procedure (LRESULT CALLBACK WndProc(....)), so I can have the support for all Input Device Types. Is that the way it should be made ? I wanna achieve a fast Input handling, or at least as fast as possible without too much effort, maybe more, when it is worth it. I dont ask for code, hell no. But some tips or maybe own thoughts and stories how you did it would be nice to get. Thank you very much !  
  6. Thank you guys, ?this was the only thing that was keeping me away from moving deeper in ogl :) ?for(;;) std::cout << "thx :3 <3"; // ^^
  7. Yeah, so in modern OpenGL nothing will appear without them (3.2+ or?). ?Thanks for the fast response !
  8. Hey guys, I am confused about shaders and for wich version of OpenGL they are needed. ?I created a context with OpenGL 3.2+ with GLEW and I can only clear the screen without doing any drawings. ?So the question: ?When do I need shaders ? Does this "hang together" with the context version ? ?I hope you can understand what I mean, my english is not the best on the planet and describing? isn´t my biggest strength. Thx !
  • 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!