Jump to content

  • Log In with Google      Sign In   
  • Create Account

Rafael_Treiber

Member Since 30 Apr 2007
Offline Last Active Jul 18 2013 10:38 AM

Posts I've Made

In Topic: My First Text Based RPG help

16 May 2013 - 12:49 PM

I hope that by now you should have figured out what your problem is but just to add a few comments, you would greatly improve your code if you learned functions, as Servant of the Lord said. Using that structure you can find where your problem is much easily.

Also, learn how to use the debugger from your compiler to see the values of your variables and to see why you are not getting the results that you expect.

And lastly, as Chad Smith also said, use the code tags to post your code here. It makes the code much more readable for us here. I also don't know if you used indentation on your code or not but it is another tip to make it more readable.

Don't be frightened if you are just starting to code. It seems a lot to grasp just to make a text based rpg but if you follow these tips you will notice how much faster you will find errors in your code.


In Topic: My First Text Based RPG help

15 May 2013 - 08:04 PM

I am not sure on your problem but one thing that caught my attention was the line

 eHealth - attack;

Did you mean...

 

eHealth -= attack;

 

I believe this is your problem.


In Topic: SDL access violation

08 May 2013 - 07:11 PM

The weird thing is that I got SDL_Rwops to work on MinGW compiler but it always crashes on Visual Studio.

My interest in SDL_Rwops is because I was trying to create a packfile to put all my images, sounds, fonts, etc. And for that I was following the code from an old game called I have no Tomatoes and, as I said, it works on MinGW. The problem is that Visual Studio is much faster to write code and much easier to debug. The only little detail is that it does not work tongue.png .

Besides, to use Visual Studio I had to change some things in the code like fopen() to fopen_s(), sprintf() to sprintf_s() and I believe that these comands don't work on MinGW.

Anyway, enough of punching on a rock...

Could you recomend anything to look up to create my own packfile? I think zlib does that but I am not sure if it is not a little too old. And I know that it is impossible to avoid people from hacking your resources but I wanted a packfile that could not be opened in a simple Winrar or Winzip. If you could recomend any library in C++ to do that, it would be great.

Thank you very much for your time and interest.


In Topic: tile based games

21 December 2007 - 05:56 AM

Quote:
Original post by Chad Smith
Quote:
Original post by Rafael_Treiber
Quote:
Original post by godsenddeath
www.lazyfoo.net is the best C++ /SDL resource i've seen, its a very good site with alot of very useful tutorials



Oh yeah! It is very good indeed. I have all those tutorials on my computer. But none of them seem to cover tile based games.



This LazyFoo tutorial covers tiling.

There is also this, which has helped me.

I wish you the best of luck!

Chad


Thank you very much Chad. I didnt remember that lazyfoo link. And the second link seemed quite interesting to me. I'll take a look.


In Topic: tile based games

21 December 2007 - 04:44 AM

Quote:
Original post by godsenddeath
www.lazyfoo.net is the best C++ /SDL resource i've seen, its a very good site with alot of very useful tutorials



Oh yeah! It is very good indeed. I have all those tutorials on my computer. But none of them seem to cover tile based games.

PARTNERS