Пікірлер
@adam-zo4bs
@adam-zo4bs Ай бұрын
Hi, really nice project, but I have a suggestion. You might want to change the levelUp function by removing "experience = 0" at the end and instead adding "experience -= maxExperience." Right after if that way any exp that is over the max will not be lost during the level up.
@DZL69420
@DZL69420 Ай бұрын
You are so right! Thank you so much for telling me this!
@Bossnificent
@Bossnificent Ай бұрын
@@DZL69420 Just to add on to this(and this may be nitpicking/overengineering by this point), you may want to store experience as a total value rather than a current value. This will allow you to tune the exp/level curve while still reflecting the effort that the previous players put in pre-tune. For example, say it takes 5000 exp to get to level 5, but you find that it is way too slow, so you decide that 5000 exp should get you to level 12. Storing experience as a total value would allow the engine to automatically detect you to be at level 12 if you've accumulated 5000 exp instead of those players feeling cheated out of their time due to new players having it easier than the exp curve that they had to level on.
@DZL69420
@DZL69420 Ай бұрын
Awesome idea! What I ended up doing what something like this. void GUI::calculateLevel() { int requiredXp = 0; int tempLevel = 1; while (requiredXp <= experience) { // requiredXp += std::floor(tempLevel + 300 * std::pow(2.0, tempLevel / 7.0)) / 4; if (requiredXp < experience) { ++tempLevel; } if (tempLevel > level) { level = tempLevel; } } Idk how this will structure in my reply but theres a formula that will increment the required experience based on the level then an if statement to level the character up based on a placeholder temp level. I wanted to use a formula rather than writing the required xp for each level and inputting xp and returning level.
@adam-zo4bs
@adam-zo4bs Ай бұрын
@@DZL69420 Nice idea That way the currentExperience won't have to be reset after every level up. With that, in the future you could add some milestones that give rewards based on combined experience from all skills.
@p0wn4l1f3
@p0wn4l1f3 Ай бұрын
this shit pissed me off mf
@yorozuyagin3507
@yorozuyagin3507 3 ай бұрын
Im interested in how you did this
@DZL69420
@DZL69420 2 ай бұрын
Sorry it took so long to reply. I used the Pygame library and I got a lot of help from chatgpt here. The code is a big mess but it kind of works. I suggest to look for a free python course on youtube and follow it 1 hour a day for 5 days a week. You should follow it until you get an introduction to classes in python. The skills I used were, web scraping, if/else statements, while and for loops, classes, and tesseract. It has been a while since I made this project so I think that was all I used.
@nitroslam
@nitroslam 5 ай бұрын
@DirtyZeusLover can you show the whole code :) ? would be awesome. love this idea
@DZL69420
@DZL69420 2 ай бұрын
Absolutely! Here is the github link. github.com/GoopSoftware/Pygame-Bomberman. You can find all of my projects under this github account. I am currently working on a fighting game using C++!