[ GAME ] C RPG GAME
After many segmentation faults, stack smashes, floating-point errors, and some more errors, I am proud to announce...
C RPG Game
Fight monsters, level up, buy stats to become the most powerful, and defeat the enemy that has been pillaging innocent cities for years!
This is also an entry to this jam... POG
Included inside the game, but you just have to type in the number corresponding to it.
You can also save your game, just be aware that we won't save your pet species and name :(
The save code is in binary so it shouldn't be too hard to crack locally but on repl.it, it would be quite hard. Because of the nature of how repl.it works, make sure to fork this repl to play.
Because there are 7 levels, and they get increasingly hard, don't level up too early! Try to go over a little bit. Also, I think having more health than attack is more important... idk send strats
- Special thanks to @objectme12 for suggestions and helping me with saving the game!
Have a great day! Remember to fork this repl if you want to save your game and beat the final boss! (I don't think you can do this in one sitting...)
Nice game! Is there an issue with saving strings or something so that you can't save name?
@Coder100 If you're storing a score of 0 as
'\0' (the char with integer value 0), then a score of 1 would be the ascii character
SOH (start of heading) and a score of 2 would be ascii character
STX (start of text). If that isn't what you're doing, then congrats you're doing it correctly. If it is what you're doing, then you have a bigger issue at hand — no player could get a score greater than 255.
To store a digit as a char, just do
my_digit + '0' — that's adding an offset of
my_digit to the char
'0', and since chars
'9' are contiguous that will create a number char from 0 to 9. It's pretty simple. (So for each digit in the number, just do that.)
Think a good idea would be to make a bulk buying system, because manually inputting '2' 100 times takes too long, and even longer to finish the 'Your pet gain +1 attack!'.
I can see how this would be heard though, so sorry if this isn't possible