Author Topic: Starting with creating roguelike-something (C++)  (Read 9573 times)

FreeQ

  • Newcomer
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Starting with creating roguelike-something (C++)
« on: May 23, 2015, 11:37:30 PM »
Hi.

I want to write my first roguelike-somethink but have encourted some big (for me) problems.

First I tried to write something in Qt Creator but can't set up libtcod in it. Next I've moved to Code::Blocks and there again setting up libtcod was to difficult for me so I've looked for another library which i could use. So I've found pdcurses. Somehow i managed to include this library to my Code::block (with help of youtube). But no so much later there i problem within programming (some commands just don't work).

So I'm asking you - can you help me by showing me how to set up IDE (no matter which one) or showing some libraries which you are using?

Thanks for reading this and sorry for my english.

Brokenkingpin

  • Newcomer
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: Starting with creating roguelike-something (C++)
« Reply #1 on: May 25, 2015, 02:39:14 PM »
I am confused by this statement:

"But no so much later there i problem within programming (some commands just don't work)."

Are you having issues with the IDE at this point, or are you having issues using the actual library at this point (pdcurses)? If the code just won't compile, please post the code sample and the compile output.

What platform are you developing on? I assume Linux if you tried QTCreator. I tried Code::Blocks under Linux a few years ago, and at the time I actually has some issues linking to libs. I then switched to Eclipse and had no issues. Anjuta looks pretty sweet as well, if you are using a GTK Desktop Environment.

How new are you to C++? If you are just starting out in programming, Python + libtcod would be a much easier.

FreeQ

  • Newcomer
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Starting with creating roguelike-something (C++)
« Reply #2 on: May 25, 2015, 04:43:37 PM »
What platform are you developing on? I assume Linux if you tried QTCreator. I tried Code::Blocks under Linux a few years ago, and at the time I actually has some issues linking to libs. I then switched to Eclipse and had no issues. Anjuta looks pretty sweet as well, if you are using a GTK Desktop Environment.

I'm writting in Windows 7 x64. Tried using Qt becouse of friend who told me that it is better than C::B but i've returned to C::B. I don't know what GTK Desktop Environment is:/

How new are you to C++? If you are just starting out in programming, Python + libtcod would be a much easier.

Quite new. Have few programs written but weren't so advanced (only console application). I don't have any informatics education - I'm biotechnologist :)

About

Are you having issues with the IDE at this point, or are you having issues using the actual library at this point (pdcurses)? If the code just won't compile, please post the code sample and the compile output.

have problems with commands like mvaddch(), mvaddstr() (curses lib) and std::cout.

In terms of learning Python - I don't really want to learn new language before "mastering" first one.

Cfyz

  • Rogueliker
  • ***
  • Posts: 194
  • Karma: +0/-0
    • View Profile
    • Email
Re: Starting with creating roguelike-something (C++)
« Reply #3 on: May 26, 2015, 12:18:43 PM »
Quote from: FreeQ
I tried to write something in Qt Creator but can't set up libtcod in it. Next I've moved to Code::Blocks and there again setting up libtcod was to difficult for me so I've looked for another library which i could use. So I've found pdcurses.
Quote from: FreeQ
can you help me by showing <...> some libraries which you are using
Setting libtcod up with arbitrary compiler is generally not easy, so do not blame yourself for that. And PDCurses has an arguably esoteric API. I suggest you look at BearLibTerminal, I specificly designed it to have a cleaner set of functions and to be simple to link against.

Quote from: FreeQ
I'm writting in Windows 7 x64.
Microsoft Visual Studio is free and it is one of the best IDEs. Probably, the best one under Windows.

Quote from: FreeQ
Quote from: Brokenkingpin
If you are just starting out in programming, Python + libtcod would be a much easier.
I don't really want to learn new language before "mastering" first one.
I think trying to start with python is a good advice. C++ is not a best choice for starting out unless you have some kind of aptitude to it or thorough IT education. Python might easily become a better time investment.
« Last Edit: May 26, 2015, 12:21:21 PM by Cfyz »

FreeQ

  • Newcomer
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: Starting with creating roguelike-something (C++)
« Reply #4 on: May 26, 2015, 04:58:38 PM »
I suggest you look at BearLibTerminal, I specificly designed it to have a cleaner set of functions and to be simple to link against.
I will try this library. Thanks :) But linking is something i can not understand. Can you tell me how to do it?

Microsoft Visual Studio is free and it is one of the best IDEs. Probably, the best one under Windows.
Will try too:)

I think trying to start with python is a good advice. C++ is not a best choice for starting out unless you have some kind of aptitude to it or thorough IT education. Python might easily become a better time investment.
I will consider this. I'm simple afraid of too many things that must remember in two languages.

P.S. Tried to add BearLibTerminal.h in visual studio with #include "BearLibTerminal.h" (before i copied this lib do folder header files in visual studio. But have error:

1>c:\users\nevermind\documents\visual studio 2015\projects\unlimited\unlimited\bearlibterminal.h(394): error C4996: '_vsnwprintf': This function or variable may be unsafe. Consider using _vsnwprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

P.S. 2 I've decided to learn Python. For now I'm wrinting in cmd as shown in this tutorial: https://docs.python.org/2/contents.html
For now it's ok :) Later I'm gonna add libtcod (again :/) to this language as shown in: http://www.roguebasin.com/index.php?title=Complete_Roguelike_Tutorial,_using_python%2Blibtcod Maybe I'll acquire some skills.
« Last Edit: May 26, 2015, 09:59:16 PM by FreeQ »