Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

187 Neutral

About DaveMS

  • Rank

Personal Information

  • Interests
  1. DaveMS

    Combat System for First Person RPG

    The combat system from Mount & blade or chivalry could work quite well. Left mouse button attacks - the swing direction depends on the direction of the enemy from the center of the player's screen. Right mouse blocks, which uses the same directional system.   I was thinking of building this combat system into a first person fantasy rpg myself when I get around to starting it. 
  2. DaveMS

    Python Help

    I'm not a python man, but I done a bit of reading around your problem. Look like Input() expects a python expression to be entered as input to be evaluated. I think the function you want to use for general input from a user is raw_input(). Input() : http://docs.python.org/library/functions.html#input raw_input(): http://docs.python.org/library/functions.html#raw_input
  3. DaveMS

    SDL Co-ordinates

    [/quote] lol
  4. DaveMS

    Is my Design "Too much inheritance?"

    Just going to pick out one of the questions in your OP. "Should I make separate classes for weapon / power-up types?" I would make separate classes for objects which require different behaviour. If the only difference between then is different properties, then no seperate classes are required. I wouldn't make separate classes for weapons - what is the difference between weapons? Fire rate, max ammo, bullet type? These should be fields in the weapon class, and the values of these should be different for each weapon. The class can have the methods your would expect from a weapon class eg. Fire() - Check if enough ammo, create a bullet of the type specified in the bullet_type field at the players position, reduce ammo by 1. Power-ups - I would go for separate classes for these - A base powerup class, with a virtual OnPickup() method. A derived class for each powerup could implement the OnPickup() method where the effects of the powerup are implemented. Bullets - I think the same as powerups, a separate class for each type. Base bullet class, with virtual methods such as Update(), OnHit(). Maybe one type of bullet follows a straight line when fired, another follows a sine wave type movement. These can be implemented in the update function of each specific bullet class. The OnHit() method could be different for each type of bullet. Maybe one type of bullet makes a small explosion when it hits on enemy. Another type splits into several smaller bullets when it hits an enemy. Only my initial ideas - as always, there is more than one way to approach the problem.
  5. DaveMS

    Help with jumping

    Your going to have to help us to help you - your not making it easy for the people trying to help you. Rather than posting your code in a zip file, post it directly on the forum, most people are not going to be bothered to download and compile your source - they will just move onto the next post. Second, you need to tell us why it isn't working. give us a walk through of what you think should be happening, then tell us what is actually happening. give us error messages. Third, programming isn't about writing code - that is the end product, the job of a programmer is problem solving. Tell me in english how you would make the character jump. If you can't do that, then your not going to be able to tell the computer how to do it in code.
  6. DaveMS

    Help with jumping

    For jumping / falling, try adding a downwards acceleration to your character when it is not on top of a platform. Jumping can be done by adding an upwards force when the jump button is pressed. If you post your errors, we can help you with them.
  7. Your names could be saved in the file as Dire_Wolf. Then simply remove any "_" in strings you find as you are parsing your text file, and insert a space. Do the opposite when saving to file.
  8. DaveMS

    How to Plan? What to code first?

    I programmed a poker bot for one of my university projects. It could hook onto an online poker client, read the state of the game through a combination of pixel matching and OCR, and then used ANNs and targeted simulations to decide on the best action to take, and then click the appropriate button on screen. It took me about 3 months of programming to get it done. Once I finished university, I decided to create a newer better poker bot. It was going to be amazing. This version would have a database to store previous hand histories, which could be used to create an individual ANN for each opponent it met, improving the accuracy of the opponent modelling. It would have a bot simulator, where bots could play each other at 500 hands a second, producing a nice graph and all the statistics you could need to see where their weaknesses / strengths were. I spent the next 3 months designing it all. Classes, databases, all perfectly designed adhering to OO principles. Then I started coding. Despite all my planning, problems popped up that I hadn't foreseen. No problem though, I'll just do a bit of a redesign. Designs were changed, classes removed, added, amended. Carry on coding. More problems. More redesigns. In the end I spent more time designing than I did coding. It has been more than a year now, and my poker bot has less than half the functionality that my 3 month uni project had. I don't spend a huge amount of time programming - I have other responsibilities nowadays that I didn't have when I was a student - job, baby etc, but I think the real problem isn't lack of time, it is lack of motivation. I have spent so much time on the project, but have barely anything to show for it. My advise - don't worry about design very much at all. Have a quick think about how the main parts will work together, and start coding. Dont worry about needing to rewrite code when things go wrong. The most important thing is to get coding and get something working to keep you motivated. Better a working program with terrible source code, than a great design and no program.
  9. DaveMS

    What games would you most like a clone of?

    And dungeon keeper 3 - what happened to that? Why do all the games I love get cancelled? Still - lots to look forward to. Battlefield 3, Counterstrike: GO, Elder Scrolls V. Going to be a good 6 months me thinks.
  10. DaveMS

    What games would you most like a clone of?

    +1 for an ultima online sequel. Was not impressed when they cancelled development of UO2. Although if it is to be done, it needs to be like the early days of UO - with PvP everywhere and full loot, not the terrible game that it has become today.
  11. DaveMS

    A planet made of diamonds!

    Isn't the value of diamond based on it's (or supposed) rarity? Surely mining and dragging the whole thing back to earth would provide an abundance of diamond, thereby reducing it's value? It would probably cost more money to make the trip, than profit you would generate from it.
  12. DaveMS

    What do you think about the Revelation?

    I think about it no more than I think about any other religious text that has been written in the last few thousand years - I don't give it much thought at all. If there is a god up there, which I highly doubt, I'm sure he doesn't give a toss about organised man made religions. If he has created the billions of galaxies in the universe, hundreds of billions of planets -I can't imagine him hovering over us insignificant humans screaming "no.. no.. NOO!... No red meat on Fridays!" If he really is sat up there waiting to judge - who is he going to let in to heaven - someone like me who has lived (up until now anyway) a relatively good life, compassionate and caring, but doesn't believe in him. Or will it be the militant christian - firebombed an abortion clinic in his name, but believes in him without question. If it is the latter, I would rather be elsewhere anyway.
  13. DaveMS

    C# Calcuator Help

    I should also point out in the above code, there is a possible problem - if the user clicks the equals button without choosing an operation to perform - op will be unassigned. But hey, I did warn you it was untested
  14. DaveMS

    C# Calcuator Help

    One thing i've learnt in the few years i'v been programming - there are always more efficient ways of doing it. The most important thing is that it works. If you want to try it though - you can use a delegate as a function pointer, ie - the function to be called can be set at runtime. Code incoming - not tested. namespace Calculator { public class OperatorFunctions { public delegate double OperatorDelegate(double n1, double n2); // here we declare a delegate function, which has a return type of double, and requires 2 doubles as parameters. We will use it to reference one of the functions below. public static double Addition(double num1, double num2) { return num1 + num2; } public static double Subtraction(double num1, double num2) { return num1 - num2; } public static double Multiplication(double num1, double num2) { return num1 * num2; } public static double Division(double num1, double num2) { return num1 / num2; } } public partial class Calculator : Form { double variableOne, variableTwo, answer; OperatorFunctions.OperatorDelegate op; // here is our delegate object. it will hold a reference to one of the operator methods, although we don't know which one yet. public Calculator() { InitializeComponent(); } private void ClearAndFocus() { fieldOne.Clear(); fieldOne.Focus(); } private void Clear_Click(object sender, EventArgs e) { ClearAndFocus(); } private void Addition_Click(object sender, EventArgs e) { double.TryParse(fieldOne.Text, out variableOne); ClearAndFocus(); op = OperatorFunctions.Addition; // the delegate object op now stores a reference to the addition method } private void Subtraction_Click(object sender, EventArgs e) { double.TryParse(fieldOne.Text, out variableOne); ClearAndFocus(); op = OperatorFunctions.Subtraction; // the delegate object op now stores a reference to the subtraction method } private void Multiplication_Click(object sender, EventArgs e) { double.TryParse(fieldOne.Text, out variableOne); ClearAndFocus(); op = OperatorFunctions.Multiplication; // the delegate object op now stores a reference to the multiplication method } private void Division_Click(object sender, EventArgs e) { double.TryParse(fieldOne.Text, out variableOne); ClearAndFocus(); op = OperatorFunctions.Division; // the delegate object op now stores a reference to the division method } private void Equals_Click(object sender, EventArgs e) { double.TryParse(fieldOne.Text, out variableTwo); ClearAndFocus(); answer = op(variableOne, variableTwo); // we are now going to invoke the method referenced by this delegate object. But which method is it? Beats me, but we know it takes 2 doubles as parameters, and returns a double. fieldOne.Text = answer.ToString(); } } }
  15. DaveMS

    C# Calcuator Help

    And to add to my previous post I'm not too clear on your logic. When do you expect variableOne to be read from the text box? The way I would do it: User insert value into fieldOne. User clicks addition button program reads value from fieldOne, puts into variableOne, clears fieldOne User inserts second value into fieldOne User clicks Equals button program reads value from fieldOne, puts into variableTwo, clears fieldOne program calculates answer program inserts answer into fieldOne
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!