envy3d

Members
  • Content count

    105
  • Joined

  • Last visited

Community Reputation

186 Neutral

About envy3d

  • Rank
    Member
  1. I/O with files,

    try putting ignore() before: cout << "Enter the name \n"; getline (cin, name); cout << "Enter the phone number\n "; getline (cin, number); chances are that you left the \n escape character in the input buffer. and again with your file reader getline (phonebook, list); stops reading at a \n (hence the name getline) put it in a loop to read all of the numbers
  2. Mouse only player input / crashes

    The game crashed for me right after I entered a ballerina's name.
  3. Turn and face the strange, ch ch changes

    *crosses fingers*
  4. Flickering Problem with SDL

    Maybe try drawing the background before drawing the inactive sprites. I don't know if that'll do anything but you might give it a shot.
  5. OK, I came up with this in my mind so it might not work :p but I feel like I'm cheating myself if I were to not think it through without the internet. 1.First get all 4 of the rectangles corners. 2.Find the corner that is closest to the circle's center. 3.Now take the two corners that are connected to the previous one. Corner A is from step 2 The two B corners are from step 3 And I'll call the point that we don't care about right now "O" B-------A | | | | O-------B Now there are two versions of whats next that I devised. One is quick and easy and has a really tiny area where it is incorrect. The other involves a bit more math and typing but is a tiny bit more accurate. I'll just write the easy one unless you ask for the other one. 4.Add the value of the radius on both axis for point A and in only one (displayed below) for the B points. (I'll let you figure out how to generalize my example) M are the radius modified points in step 4 M-------------M | | | | B-------A | | | | | | | O-------B-----M 5.Now check to see if the center of the circle lies within the rectangle OMMM. Hopefully that works ^_^ EDIT: WOW I'm bad at those tags T_T
  6. <_< >_> isn't a pound sign one of the characters the calc can output? If not, then choose another one ^_^
  7. Quick question: Is the bounding box always "axis aligned" or is it "oriented"? EDIT: Also, do you need to know the exact location of the collision? or is just knowing that it happened good enough for you?
  8. Hopefully my thoughts on the subject can help you to decide on a method for this. So, besides equipment, you have a combat strategy which is comprised of 7 (or more if you can think of any more simple combat movements) individual strategies or movements. 1.Stance: The way the character is standing ie. offensive, defensive, casting, sneaky etc. Basically these give the character large bonuses or minuses to stats. (an offensive stance would boost atk power and stamina but hurt defense and mag power etc.) 2.Defensive Strategy: What your character will do if given the chance to defend ie. raise shield, block with arms, dodge, roll with blow, block with weapon etc. Depending on which def. strat. is used, it will get a bonus from a different character stat and/or equipment stat. 3.Prim Attack Strategy: The attack your character prefers to use ie. Fierce slashes, Slashes, Pinpoint piercings for sword attacks. Precise fire, Rapid fire, Special fire (shot that checks against enemy mag. def.) for bow attacks. Powerful magics, Lesser magics, Physical magics for black magic attacks. Powerful heals, Lesser heals, stuff <_< >_> for heal attacks (not really "attacks" but w/e). 4.Sec Attack Strategy: Same attack move pool as above, however, these are the attacks your character tries to perform less often. 5.Prim Attack Target: Who your character's Primary Attack Strat is aimed at ie. Any Enemy, All Enemies (of course doing less dmg to each), Most threatening enemy (highest atk/mag pow), Weakest Enemy, Any Ally, All Allies (again with the penalty), Ally in Need, Strongest Ally (highest atk/mag pow). 6.Sec Attack Target: Same, but for the Secondary Attack Strat. 7.Move of Opportunity: A special move that your character might pull of in combat. Here is where buffs, stat dmg/boost moves, or just plain awesome attack is executed. ie. (far from complete list) Increase atk buff, Decrease mag def curse, War cry, running lunge, meteor storm, frost wind, headshot, poisoned arrow, pickpocket, backstab etc. The instantanious battle will internally take place as multiple rounds until all enemies or players are dead. Fight begins Calc total equipment bonus of each stat for each player. Calc stance bonus to each stat. Round begins 1.Move of Opportunity for each participant (1 on d20 needed)- this the only place stat modifiers should be to decrease the complexity of the rest of the round. Also Moves of Opportunity (esp. really damaging ones) would drain lots of stamina/mana. 2.Calc bonus to def strat, prim atk, and sec atk based on current stats. 3.Participant attacks with leftover stamina/mana in this fashion, currentStam/primAttackCost = number of primary attacks Determine who the opponent(s) is/are. If the opponent is a group, divide prim attack power by the number of opponents +1. For each primary attack, the opponent has a chance (1 on d6 needed) to lessen the damage inflicted by primAttackPwr/DefenceStratPwr (currentStam/3)/secAttackCost = number of secondary attacks The same defense rules apply as above. If the attack is a heal on allies, then dont calc resistance to being healed :P but the +1 to number of allies stays. 4. Reset Stamina but keep stats boosted from the move of opportunity (they can add up over rounds) 5. Kick dead participants from being in next round. 6. Start next round. After some iterations, the fight will end with those surviving being victorious! So now display the results of that semi-complicated to the players! Hope that helps =D
  9. Can you pick up arrowkey presses with Getkey()?
  10. My guess (haven't owned an 83 in years) is that it executes the current label (lbl) from the beginning.
  11. Shouldn't the second Getkey() have a variable that it stores to? Also "or" does not separate values, it separates expressions. So your line of code should look more like: if A=24 or A=25 or A=26...
  12. First fix the typo, then if that doesnt work see what my other comment ... ... delta.x = 0.0f; } Point2D temp; temp.x = centre.x + delta.x; temp.y = centre.y + delta.x; //TYPO return temp; } maybe flip the inequality from if (fabs(delta.x) < fabs(delta.y)) to if (fabs(delta.x) > fabs(delta.y))
  13. New character skins!

    Everything looks great, but it looks like the majority of your characters have just finished a 2 hours session of horseback riding :/ Maybe you could tweak the models a bit.