Quote Originally Posted by Salem View Post
I notice that rayscont only ever increases. It would seem to me that the game would just get slower and slower as it worked it's way up to 500000 stored rays, and then crash.

Some of your #defines should be enum's, like GOOD/EVIL and your direction constants.

> for(;c<79;c++)printf("%c",219);
You do this (or slight variations of it) a lot. Perhaps it needs it's own function.
219 should be a #define'd constant (along with any other DOS graphics chars (eg, #define PLAYER_CHAR 2).
Consider using putchar instead - using printf to output just one char is quite heavy.

> printf("HP: %d%c",goodhp,37);
You can simplify your if/else this with
printf("HP: %2d%%",goodhp);

> printf("%cYou are the only hope
Do you know that " can be used to print double quotes inside double-quoted strings?

> while(1)
This should be say while(alive), and hopefully you can factor out your goto in the process.
This loop is 200 or so lines long, so it needs to be split up somewhat.

> int ps=0;
Everywhere you use this, it's an if/else copy/paste code block.
You ought to be able to handle this in a more generic way.



We're missing
#include "rlutil.h"
and your audio file.
Oh thanks for the advices on how to make proper code for my programs. I really appreciate it!.

I think i will be more careful the next time.

Uhmmm...you can find rlutil here:
GitHub - tapio/rlutil: C and C++ utilities for cross-platform console roguelike game creation.

And about the audio file just delete that part in the code and it will compile with no problems.