Difference between revisions of "Talk:Complete roguelike tutorial using C++ and libtcod - part 1: setting up"

From RogueBasin
Jump to navigation Jump to search
(go ahead)
 
(8 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{talkpagetool}}
== Modernizing the tutorial ==
Should we update the tutorial to use modern C++ (C++11 and on)? I have some experience with modern C++ and would like to take a crack at it, unless there's a good reason not to go with the modern standards. - Phyrexus, 21-10-2018
Should we update the tutorial to use modern C++ (C++11 and on)? I have some experience with modern C++ and would like to take a crack at it, unless there's a good reason not to go with the modern standards. - Phyrexus, 21-10-2018
:Go ahead, I don't know how technically this affects it and aren't competent enough to give you any reasons not to. But one good reason is the entire guide/code will get rechecked by you. The last time that happened was when I was on it and then moved it here from original author's website choice after asking him [[User:Joel Pera|Joel Pera]] ([[User talk:Joel Pera|talk]]) 22:15, 21 October 2018 (CEST)
:Go ahead, I don't know how technically this affects it and aren't competent enough to give you any reasons not to. But one good reason is the entire guide/code will get rechecked by you. The last time that happened was when I was on it and then moved it here from original author's website choice after asking him [[User:Joel Pera|Joel Pera]] ([[User talk:Joel Pera|talk]]) 22:15, 21 October 2018 (CEST)
== Problems with libtcod ==
I`m trying to make a roguelike game for Windows OS on C++, and I got a problem with libtcod. I was following this guide, but I got ''"undefined reference to `__imp__ZN11TCODConsole8initRootEiiPKcb15TCOD_renderer_t'"'' and simular errors for every line with libtcod functions and code don`t compile. What is wrong?
:The same problem. Anyone know how to fix it? [[User:S0ZDATEL|S0ZDATEL]] ([[User talk:S0ZDATEL|talk]]) 10:52, 27 May 2019 (CEST)
:Link errors like this imply that you included the headers correctly but did not link with the libtcod library.  It's a common beginner issue with C/C++ projects. --[[User:HexDecimal|HexDecimal]] ([[User talk:HexDecimal|talk]]) 00:37, 9 April 2022 (UTC)
:It could also mean that the compiler to used to link the library does not match the compiler used to originally compile it. Such as using MSVC to link a MinGW library. --[[User:HexDecimal|HexDecimal]] ([[User talk:HexDecimal|talk]]) 16:59, 9 April 2022 (UTC)
== Somewhat up to date? ==
I'm new around these parts so it's unclear to me how up to date this tutorial is.
While following along on my M1/arm64 mac (doubtful it's arch related though), I had to install the SDL sdk via the official SDL website then add an additional `-I/Library/Frameworks/SDL2.framework/Headers` to my Makefile.  (Also, why isn't this project teaching / using Make?!)
:The tutorial is ancient and doesn't use proper C++11, there are owning raw pointers all over, it uses a faulty and broken version of std::vector (TCODList), it uses a serialization API that breaks across platforms (TCODZip), and it generally uses parts of libtcod that are no longer recommended like libtcod's event system and anything related to its root console. --[[User:HexDecimal|HexDecimal]] ([[User talk:HexDecimal|talk]]) 03:02, 2 May 2022 (UTC)
== Domain for external links has expired ==
At some point in the past, roguecentral.org expired, breaking many external links throughout these tutorial pages. They will all need to be edited to remove the dead links.
: The best I can find for roguecentral.org is [https://web.archive.org/web/20200407125421/http://roguecentral.org/doryen/ this Wayback link]. The older libtcod docs are also hosted [https://libtcod.github.io/docs/index2.html?c=true&cpp=true on this GitHub page] but these are the 1.6.4 docs, not 1.5.2. Most older libtcod binaries can be found on the [https://github.com/libtcod/libtcod/releases GitHub releases for libtcod] which [https://github.com/libtcod/libtcod/releases?q=legacy has up to 1.5.0 but not 1.5.2]. The tutorial could be updated to work with the latest release of libtcod by following the [https://libtcod.readthedocs.io/en/latest/upgrading.html#porting-to-1-6 porting to 1.6.x guide], mostly some minor changes to event handing.  --[[User:HexDecimal|HexDecimal]] ([[User talk:HexDecimal|talk]]) 01:54, 31 May 2024 (UTC)

Latest revision as of 02:13, 31 May 2024

· Click here to add a new message ·


Modernizing the tutorial

Should we update the tutorial to use modern C++ (C++11 and on)? I have some experience with modern C++ and would like to take a crack at it, unless there's a good reason not to go with the modern standards. - Phyrexus, 21-10-2018

Go ahead, I don't know how technically this affects it and aren't competent enough to give you any reasons not to. But one good reason is the entire guide/code will get rechecked by you. The last time that happened was when I was on it and then moved it here from original author's website choice after asking him Joel Pera (talk) 22:15, 21 October 2018 (CEST)

Problems with libtcod

I`m trying to make a roguelike game for Windows OS on C++, and I got a problem with libtcod. I was following this guide, but I got "undefined reference to `__imp__ZN11TCODConsole8initRootEiiPKcb15TCOD_renderer_t'" and simular errors for every line with libtcod functions and code don`t compile. What is wrong?

The same problem. Anyone know how to fix it? S0ZDATEL (talk) 10:52, 27 May 2019 (CEST)
Link errors like this imply that you included the headers correctly but did not link with the libtcod library. It's a common beginner issue with C/C++ projects. --HexDecimal (talk) 00:37, 9 April 2022 (UTC)
It could also mean that the compiler to used to link the library does not match the compiler used to originally compile it. Such as using MSVC to link a MinGW library. --HexDecimal (talk) 16:59, 9 April 2022 (UTC)

Somewhat up to date?

I'm new around these parts so it's unclear to me how up to date this tutorial is.

While following along on my M1/arm64 mac (doubtful it's arch related though), I had to install the SDL sdk via the official SDL website then add an additional `-I/Library/Frameworks/SDL2.framework/Headers` to my Makefile. (Also, why isn't this project teaching / using Make?!)

The tutorial is ancient and doesn't use proper C++11, there are owning raw pointers all over, it uses a faulty and broken version of std::vector (TCODList), it uses a serialization API that breaks across platforms (TCODZip), and it generally uses parts of libtcod that are no longer recommended like libtcod's event system and anything related to its root console. --HexDecimal (talk) 03:02, 2 May 2022 (UTC)

Domain for external links has expired

At some point in the past, roguecentral.org expired, breaking many external links throughout these tutorial pages. They will all need to be edited to remove the dead links.

The best I can find for roguecentral.org is this Wayback link. The older libtcod docs are also hosted on this GitHub page but these are the 1.6.4 docs, not 1.5.2. Most older libtcod binaries can be found on the GitHub releases for libtcod which has up to 1.5.0 but not 1.5.2. The tutorial could be updated to work with the latest release of libtcod by following the porting to 1.6.x guide, mostly some minor changes to event handing. --HexDecimal (talk) 01:54, 31 May 2024 (UTC)