Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About FlawleX

  • Rank
  1. FlawleX

    My first C# game - Feedback

    Thanks alot! And yes indeed my code isn't easy to read. I'll make sure that is split the code more for my next project. Even i have problems navigating in the code But again it's my first project so im not that good at structuring everything correctly.
  2. FlawleX

    My first C# game - Feedback

    Thanks for all the feedback! I'll take a look into it and change stuff around!
  3. Hello! I just completed my first text based C# game! Well i still have to come up with good names for the boss attacks but oh well. Anyways the game is in it's final stage and i hope to get some feedback here if anyone would take their time to even read the code. It's a text based game so it's nothing fancy and its really repetetive. I just want to see if i have made any obvious dumb mistakes The main file: (Note that im using different .cs files to store boss data and such so they are not included simply because they are so simple i don't think they need checking. and to be honest everything is the same after the first boss is dead so if you could give me feedback on the first bit i would be very happy!) http://pastebin.com/vVm0HtEk
  4. FlawleX

    C# - Combat system?

    I just ran in to another few problems! If i use a random number generator to generate the damage for example: Random heavyStrike = new Random(); int heavyDMG = heavyStrike.Next(charStats.attackPower, charStats.attackDamage); I cannot take the damage the player deals - the bosses hp. But when i have a set damage value like lets say heavyDMG = 50; I can just use bossHP -= heavyDMG. But if i have a random number generator it says that i deal 0 damage and obviously the bossHP doesn't go down. And the code doesn't start if i try to loop the random numbers to get different values everytime. I have even tried activating the loop from a bool when the combat is started and then stop it afterwards but it still doesn't work. Any ideas on how i can solve this? This is the important and relevant part of the combat file (im using classes to be able to send variables from file to file that's why it doesn't say int heavyDMG etc): Random heavyStrike = new Random(); Random heroicStrike = new Random(); Random mortalStrike = new Random(); heavyDMG = heavyStrike.Next(charStats.attackPower, charStats.attackDamage); heroicDMG = heroicStrike.Next(charStats.attackPower, charStats.attackDamage); mortalDMG = mortalStrike.Next(charStats.attackPower, charStats.attackDamage); And the combat part in the main file: Console.WriteLine("You hit the boss for: " + combatFunctions.mortalDMG); chroniax.chroniaxHealth -= combatFunctions.mortalDMG; Console.WriteLine("The boss has {0} HP left", chroniax.chroniaxHealth); Console.WriteLine(""); Console.ReadKey();
  5. FlawleX

    C# - Combat system?

    Thanks for all the advice mate! The combat system is in it's very early stages currently and alot will be changed to make it more dynamic. I will for example not have a set damage value, the reason that it has a set damage value currently is only for testing
  6. FlawleX

    C# - Combat system?

    Thanks alot for your help! Indeed the code tag isn't so good but i can still read it so thanks again!
  7. FlawleX

    C# - Combat system?

    Hello! I recently started working on a text based RPG game assignment written in C# and it was going well untill i reached the combat part. I really don't know how to do it and i can't seem to find any solution for it. This is my first C# project aswell and im new to programming in general. I was going for a random number generator for the damage but it didn't work out so good so i scraped that but it still won't work! The issue is that the boss HP won't go down! It becomes like a infinite loop of the same text over and over. The game is in it's VERY early stages and some of the variables are just placeholders! But i need you guy's help to get past this problem! The game files currently being used (Lot's of placeholder names and some unused variables): Program.cs (Main file) : http://pastebin.com/TEQswSyi Combat.cs (Some of the combat features): http://pastebin.com/bs1BUWUL Chroniax.cs (One of the bosses): http://pastebin.com/TaFxgAyV
  • 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!