Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 28 Jan 2013
Offline Last Active Apr 22 2015 08:55 PM

Topics I've Started

Vitrual touchscreen joystick

01 July 2013 - 08:50 PM

I am trying to implement a joystick in cocos2d-x. The idea is to allow the user to slide a circle within a larger circle so the direction of the slide controls the direction the character moves. If there is a better way to do this please let me know but so far my code looks something like this:


if(joystick.x < xMin)
         joystick.x = xMin;
     if(joystick.x > xMax)
         joystick.x = xMax;
     if(joystick.x < yMin)
         joystick.x = yMin;
     if(joystick.x > yMax)
        joystick.x = yMax;


The joystick in this code represents a circular sprite that the user can slide around to control the character. But as you can see, the code confines the sprite so that it stays within a box formed by the sides xMin,xMax,yMin and yMax. I don't want that. I want to confine the sprite within a larger circle. How can I do this? Please and thank you.

Implementing beams for space shooter

30 June 2013 - 03:02 PM

-first ten seconds


What is the idea behind both kinds of beams on the player?

Two approaches come to mind. The first one seems like a long, animated sprite that is drawn on top of a ray cast and cropped off at the first collision.

The side beams look like a chain of small images where the each link moves slightly slower than the one behind it.

I am not sure though so any insight will be very much appreciated.

Please and thank you.

Textbook code memory leak

06 March 2013 - 02:22 PM

Character animation with direct3d



If anyone can check out chapter 3.4 I would greatly appreciate it. I've been trying to find the leak for days now and I just can't. I feel that It must be the way he implements the allochierarchy class, but I just can't fix it. I also compared with the animation article on this site and with the sample code from directx, and it's taking nearly the same approach. If anyone can tell me whats causing it I would really appreciate it. Thanks.

No debug output in vs2010 after app close

06 March 2013 - 10:38 AM

I set the debug version in the directx control panel, also the maximum validation and "most" output level. I also included the lib and include files for visaul leak detector. While my app is running the d3d shows the warnings ignoring the redundant state.


When I close the app however, there is no "memfini" output from directx or any output from visual leak detector. It just says exited with code 0.


What am I missing? Thank you.

D3D9 How to: Animated models? (xfiles?)

01 February 2013 - 04:57 PM

How do I get an animated 3D model into a directx application? I know there's this mesh interface, but is it better to hard code it into a .x file or use a modeling program to export the .x file? It seems that the available exporters are either no longer online (panda) or not good for animated meshes. Are xfiles even the best way to go? Im reading otherwise on these forums. Also I'm using maya, but whatever works best is fine with me.


Basically if xfiles are the way to go  (for animation) what is the best way to create one? if not, what is?