- Home /
how do you make a C# experience leveling system?
I am attempting to make an RPG where you are able to level up your character and upon levelling up your character you level up your armour, weapon and movement
for example if you move from level one to level two your weapons damage would increase by 2 points, armour would defend you from 1 additional point of damage and the player is then able to move slightly faster and jump slightly higher.
i have no idea where to start, nor can i find a tutorial that would explain the code to a newb in the programming world any help would be greatly appreciated
As Lovrenc stated, this is a huge question and not one for someone who has no program$$anonymous$$g experience. Start small and learn the basics.
The most basic mechanism is to use experience point to compute level, then use the level to compute attack, defense, speed, jump height, health etc. It is all just formula and calculations.
Learn some basic program$$anonymous$$g and gain some experience before you do this.
Thank you for the feedback but I do know the basics by newb I ment the more complicated codes all I need is a starter I have been able to create a coin system that adds one point to your score I've been told that the experience system will be alot like it I can give the player a set amount of lives, as well a kill enemies
Answer by perchik · Jul 29, 2013 at 11:36 PM
The reason you haven't been able to find a tutorial is because this is a big open ended problem. Different people would do it very different ways and it all depends on your game. Your best bet is to figure it out on paper. Break it into a bunch of very small, approachable, problems.
In this case, your problems are probably something like :
How do I change armor ratings?
How do I increase weapon damage?
How do I move faster?
How do I jump higher?
Then, break down those even further:
How do I change armor ratings?
1.a. What is the base value of the armor?
1.a.i How do I store that? ---Probably in an integer 1.b What other properties does the armor have? 1.b.i Extra defense against something?
... etc
I'd recommend starting very basic. Create a simple player object that has a name and a level. Then add HP, then add an armor object that just has one parameter (how much defense does it provide). Then figure out what happens when the user levels up. Then figure out how to change it.
Here's an example. My player object just has a string
name , an integer
level, and an integer
hitPoints. When I decide to level up the user, I would add 1 to the level (`level = level +1;//or level +=1 or level++`) and maybe add 10 to the HP. (`hitPoints +=10`). Then once that works in my game, I'd add some defense. For now, we let the player just have a shield object that has is represented by a int shield = 5;
If the user uses the shield we say hitPoints = hitPoints + shield
. Now, when the player levels up, we want to increase hit hitpoints by 10, and maybe increase his shield by 1pt ( hitPoints +=10; shield++;
).
You just have to keep building incrementally like this. Your first game that works isn't going to be Final Fantasy right off the bat and there's no shame to that. At every step, keep it simple, just increase the complexity on one little part at a time.
Good luck
Thanks perchik I have uni today so I'll try to get a little something going if I run into any major problems I'll add to this thred and see if anyone can help thanks again perchik
Your answer
Follow this Question
Related Questions
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Distribute terrain in zones 3 Answers
Multiple Cars not working 1 Answer
Player lives script help 1 Answer