Skip to content
← Back to Community
[ GAME ] C RPG GAME
Profile icon
hacker
has Hacker Plan
Coder100

C RPG Game

After many segmentation faults, stack smashes, floating-point errors, and some more errors, I am proud to announce...
C RPG Game

About

Fight monsters, level up, buy stats to become the most powerful, and defeat the enemy that has been pillaging innocent cities for years!

Jam

This is also an entry to this jam... POG

How to play

Included inside the game, but you just have to type in the number corresponding to it.

Extra features

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.

Strategy

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

Credits

  • Special thanks to
    @objectme12
    for suggestions and helping me with saving the game!

Closing

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...)

Send speedruns

Voters
Profile icon
PixiGem
Profile icon
Newchair2644
Profile icon
Spotandjake
Profile icon
Wilke000
Profile icon
HermioneGrange2
Profile icon
MatthewMadriaga
Profile icon
parkerslv
Profile icon
BCP
Profile icon
forceofyoda
Profile icon
chillcafe
Comments
hotnewtop
Profile icon
badst

Nice! :D

Profile icon
Coder100

Thanks! :D

@pepelaugh

Profile icon
Whippingdot

Add a kill option when clicking on pet Only 7 upvotes? You lost a lot of fan followers.

@DynamicSquid
is blowing up right now

Profile icon
ThisUserTaken

You should make a post soon called T h e R o a d T o 10000 u p v o t e s once you reach 10000 upvotes (which according to my calculations is in around 1 week! Congrats in advanced! .-.)

Profile icon
TANMAYBAGADIA

Nice one!!!! and wanna do a collab on html,css and [email protected]

Profile icon
Coder100

Thanks! Also sure, what's your collab idea?

@TANMAYBAGADIA

Profile icon
TANMAYBAGADIA

@Coder100
lets create a game with spaceship

Profile icon
fuzzyastrocat

Nice! Funny we both decided to share C projects at the same time.

Profile icon
Coder100

xD send link to yours

@fuzzyastrocat

Profile icon
fuzzyastrocat
Profile icon
mintbookworm

Nice Game!

Profile icon
Coder100
Profile icon
mintbookworm

@Coder100
your VERY very welcome :)

Profile icon
JBloves27

Nice job!

Profile icon
Coder100

Thank you!! :D

@JBYT27

Profile icon
JBloves27
Profile icon
19wintersp

Nice game! Is there an issue with saving strings or something so that you can't save name?

Profile icon
Coder100

@19wintersp
Yeah, I don't know the length of the string, and strings aren't a single character long, so I don't know how long I would want to read the file (if at all)

Profile icon
19wintersp

@Coder100
I suggest using null-terminated strings: read until you get to a byte with value 0x00. (or some other arbitrary value)

Profile icon
Coder100

well the thing is, I use the property that all chars are ints, and it isn't uncommon that people have a score of 0.

@19wintersp

Profile icon
fuzzyastrocat

@Coder100
Save 0 as the char '0', not the null char '\0'

Profile icon
Coder100

@fuzzyastrocat
seems like a lot of work...
ok I'll try

Profile icon
19wintersp

@Coder100
You shouldn't need to distinguish: if you know there is only one string, and that it is at the start of the file, as soon as you get to a NULL you can just stop expecting them.

Profile icon
19wintersp

@Coder100
@fuzzyastrocat
I've implemented it now; it's not an efficient implementation, but it (sort of) works. REPL: Coder100: C RPG savegames

Profile icon
fuzzyastrocat

@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 '0'-'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.)

Profile icon
19wintersp

@fuzzyastrocat
I agree, the format is a bit messed up. I'm working on a binary formatter library (in C++ tho) which could be used in the game.

Profile icon
fuzzyastrocat

@19wintersp
I wasn't responding to your saving mechanism, I was responding to coder100 saying that "saving a score of 0 as the string 0 is a lot of work".

Profile icon
SquidSan

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

Profile icon
HTMLJSCSS

This game seems broken. At first, the monsters were easy to beat, but after a while, they were impossible to beat.

Profile icon
Coder100

@HTMLJSCSS
the balancing is a bit like that, ig

Profile icon
SharkCoding

This is awesome, but I would love if there were some graphics!!!

Profile icon
TonyYin1

@Coder100
This is an absolutely amazing game, thank you for this contribution to repl.it :)

Profile icon
Soccer135246

uhh what?
Screen Shot 2020-11-10 at 18.03.19
why can't i level up?!

Profile icon
Coder100

oh that's in number 3 level

@Soccer135246

Profile icon
Soccer135246

@Coder100
but it says level 1 iguana...

Profile icon
Soccer135246

@Soccer135246
and i have more than full xp

Profile icon
Coder100

wait you don't appear to have leveled up

@Soccer135246

Profile icon
Coder100

@Soccer135246

image
you appear to be in shop, but we are in pet to level up

Profile icon
Soccer135246

@Coder100
oh thanks

Profile icon
Soccer135246

i found a glitch, even when you kill an enemy it can still attack you one more time

Profile icon
Asherbraeden

that cool man! like it a lot!

Profile icon
peternielsen112

Very very very pog

Good job man

Profile icon
Coder100
Profile icon
peternielsen112

@Coder100
no need to thank me keep doing this stuff

Profile icon
[deleted]

Noice

Profile icon
qcm

Very cool, thanks for sharing.