• Create Account

Calling all IT Pros from Canada and Australia.. we need your help! Support our site by taking a quick sponsored surveyand win a chance at a \$50 Amazon gift card. Click here to get started!

# XwingVmanX

Member Since 14 Jul 2009
Offline Last Active Jan 24 2013 12:20 PM

### Magnet Physic's Problem

23 January 2013 - 01:40 PM

I have an issue with a mechanic in a game I am working on. I attached a crude diagram I made in paint to help me explain my issue.

Blue Box - Dynamic Box

Black Box - Static Box

Red Arrow - Gravity

Yellow Arrow - Force from black box

Green Circle - Rang of Yellow Arrow

First diagram shows the blue box at rest being pushed down by gravity.

The second diagram shows what happens when the black box turns on it's opposing force.

The third diagram shows where I want the blue box to eventually come to a rest.

What currently happens is when the opposing force is kept on, the blue box goes to the highest point possible then falls all the way back down to black box and will continue doing that until the opposing force is turned off. I want the box to slowly level out and hover (like diagram three).

I am just looking for ideas on how you might handle it. Nothing I have come up with has worked.

P.S. - I am doing this in XNA using BEPUphysics engine.

### How to have a Sprite follow the player?

07 August 2012 - 11:53 AM

I was trying to figure out how to make a sprite always look at the players current position. My problem is I am not sure how to check which way the sprite is facing in relation to the players position and adjust him accordingly. I would be grateful if I could get any suggestions as to how to start approaching this.

### Research Paper - Creative Director

05 August 2012 - 10:32 PM

I was wondering if anyone is or knows a creative director (game director), that wouldn't mind being interviewed for a college research paper?

How you got into the game industry?

What lead you to becoming a creative director?

What is your daily routine as a creative director?

If you can help me out please personal message me or email me at kjlambert@email.neit.edu
Thanks

### XML Assistance

01 August 2012 - 04:35 PM

Can anyone point me in the right direction to learn about reading XML files using C++. I was able to find and learn how to write onto/create an xml document, but I am having trouble find information on accessing the xml document.

This is currently what I have

patientList.open("Patients.xml", ios::in);

while(!patientList.fail() && strcmp(user, name))

{
getline(patientList, str);
posOpen = str.find("<name>");
newStr = str.substr(posOpen + 1);
posClose = newStr.find("</name>");
newStr = str.substr(posOpen + 1, posClose);

strcpy(name, newStr.c_str());
}

patientList.close();

Right now I have it going through the XML file, line by line trying to find a name. Now that works fine, but what I want to do next is once the name I am looking for is found I want to grab the line after it.

The XML looks like this

<patient>
<name>Ken</name>
<mood>Happy</mood>
</patient>
<patient>
<name>Bob</name>
</patient>
<patient>
<name>Mike</name>
<mood>Scared</mood>
</patient>

So I want to find the name I am looking for then grab the mood associated with that name.

### Trying to get any controller button press

19 June 2012 - 02:06 PM

I am trying to figure out if there is a way to find out if any button on the xbox control has been pressed. Similar to how you can use GetPressedKeys() to find out if any key on the key board has been pressed. From Google searches there doesn't seem to be, but I figured I'd ask anyway.

For more context, basically I want to trigger something if any button on the controller is pressed.

PARTNERS