Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Kirbypowered

Pages: [1]
1
Quote from: Kirbypowered
What would I be missing?
Code: [Select]
g++ bearlibtest.cpp -o bearlibtest -Iinclude -Llib
You missed to mention the library: -lBearLibTerminal. The -I and -L switches are only telling where to look, not what to look for.
Ah, makes sense. I figured it was something like libtcod's -ltcod-mingw, but I didn't realize what it was doing.


What would I be missing?

Common sense of not using IDE while it's easier than command line.
Yeah yeah, you're probably right. I tend to be unreasonably opposed to common sense with a lot of things. XP But to be fair, I've only done small, basic programs up to this point where the command line was enough to easily get things running. I'm slowly making the transition to IDE, but I still like knowing how to set things up manually.

Anyhow, that should pretty much wrap up this thread. Never really did what I originally planned on, but BearLibTerminal seems good, especially since I actually got it working. =p Thanks a bunch for helping me people, especially Cfyz for putting up with my dumb questions the most.

2
Okay, seems I don't know crap about general library usage. How do I use BearLibTerminal? I tried testing the example code  from your site and I had strange issues relating to undefined references. I tried telling the compiler where the C header file was, and the linker where the .lib file was, but I'm not sure if that's enough. Also have the .dll in the directory. Might just be me missing important compiler commands (trying it with the console).

Edit: Okay yeah, definitely me doing something wrong with the compilation options. Got the program running through Code::Blocks. What would I be missing?
Code: [Select]
g++ bearlibtest.cpp -o bearlibtest -Iinclude -Llib(I put BearLibTerminal.c in /include and BearLibTerminal.lib in /lib)

3
Programming / Re: Getting C++ working with libtcod
« on: July 22, 2014, 01:29:24 PM »
Quote from: Cfyz
Quote from: Krice
Then, if some crappy library doesn't work, don't use it.
Yeah, use BearLibTerminal: linking is trivial, supports both MinGW and Visual C++ and does not require any recompiling :-P.
You know, why not? libtcod's just been problem after problem, and I'm starting to wonder why I was so set on using it. It's a shame I didn't get it working, but I'm not too disappointed. I'd like to think I've learned quite a bit from all of this. =P

I'll take a shot at using BearLibTerminal with mingw and Code::Blocks. I've been more interested in figuring out how things actually work than just having them work, which is sort of why I do most things through the console. Once I get a proper project running, I'll probably do so with an IDE for their ability to make life simpler.

Don't worry though, I'll have some more questions and problems ready before you know it. XP

4
Classic Roguelikes / Re: Atheism in Crawl
« on: July 21, 2014, 11:07:36 PM »
One final note: Do we have to complete the key captcha every single time we post, for the duration of our membership? Or is there some cut off limit where the system goes, "OK. This guy's for real." Thank you.
I believe it's just temporary. Just coming back to the forms, I had to complete a captcha for a couple of my posts, but it has stopped showing up. Perhaps it stops at the 20 post limit?

Edit: Oh yeah, definitely 20 posts. You know, considering I'm only at 13. -_- Probably stops at 10 posts.

I'd say it's a shame to hear you died in the game despite taking the time to make a careful choice, but it's really how most of my characters go as well. =P I'll get a bit comfortable and think I have a chance, then I'm dead. You just have to keep at it, learn from your hundreds of deaths, and maybe get a couple runes some day.

5
Programming / Re: Getting C++ working with libtcod
« on: July 21, 2014, 09:51:04 PM »
I've tried to link that tutorial against libraries included in 1.5.2 release archive using several of MinGW builds (somehow I've collected quite a number of them). All of the attempts (mingw-builds or TDM, 32 bit or cross-64 bit, sjlj or dw2) gave the same result as your first one: segfault on TCODConsole::clear. Linking against manually compiled libtcod works fine though.
Ah, thanks for checking that out for me. Good to know it's not just me. =)

So I guess my next (and perhaps last) problem is figuring out how mingw-builds works. Does my choice between 32 and 64 bit make a significant difference? I'm always tempted to choose 64-bit options, but sometimes that seems to cause issues. Will the installation from that alone be enough for a fully functional mingw? I tried using it with MSYS grabbed from the older mingw folder, but it seemed to be missing important things.

Sorry for the constant, likely obvious questions I keep having. Everything at this point is seemingly new and unfamiliar to me.

6
Programming / Re: Getting C++ working with libtcod
« on: July 21, 2014, 05:21:23 PM »
First try to update MinGW and simply link against the regular 1.5.2 libtcod. I recommend mingw-builds releases.
Mind explaining some of the installation options for mingw-builds? In Threads there are the options posix and win32, and in Exception there are dwarf and sjlj. Anything important I should know about these settings?

7
Programming / Re: Getting C++ working with libtcod
« on: July 21, 2014, 01:39:16 PM »
Did you try to understand why this "root" thing is not initialized properly? That's where you should start from, because the code is apparently calling a method through a null pointer as Cfyz already pointed out. (By the way, this also indicates that the tutorial you're using may not be that good.)
I tried for a little while, but I think I need to learn a bit more about classes and objects in C++, as I only had a vague idea of where things were coming from...TCODConsole::root appears to be given an address to point to, but I only slightly recognize what's going on there. Heh, might just be I need to learn more general C++ before going much further with this.

Indeed this was a bug in MinGW. First try to update MinGW and simply link against the regular 1.5.2 libtcod. I recommend mingw-builds releases.

That might not work though. The point about recompiling libtcod is that with C++ it is often important to use same compiler version and build for both application and libraries it is linking against. Usually it is easier to just recompile everything with your own compiler than keep matching library builds. Note that recompiling libtcod from the code repository (because regular release archives do not include makefiles) will get you the 'trunk' version, not 1.5.2 (but should not matter).
So, recompiling libtcod myself is unlikely to fix my problem, but I should update mingw to deal with that bug either way? Also, are you saying that having a library that's compiled with a different version of the same compiler that you're using will often cause problems? That really sounds like it could be a hassle...

8
Programming / Re: Getting C++ working with libtcod
« on: July 21, 2014, 04:43:14 AM »
I suggest you delete your current libtcod (and all traces of it) and try to unpack a clean 1.5.2 release. If that will not help, try to build the library as described here:
http://doryen.eptalys.net/data/libtcod/doc/1.5.2/html2/compile_libtcod_mingw.html
Note that you do not have to use the exact MinGW version mentioned on that page. When you're compiling library yourself you are fine as long as you're using the same version for everything.
Okay, removed all traces of my version 1.5.1 of libtcod and downloaded 1.5.2. Recreated the tutorial directories and main.cpp, tried compiling it, got the same problems. Tried following the tutorial on compiling libtcod on windows...and got more errors. I'm starting to think that this is maybe a mingw thing? Here's the bit that went wrong:

Code: [Select]
Compiling zlib src/zlib/trees.c
Compiling zlib src/zlib/zutil.c
In files included from c:\mingw\include\fcntl.h:37:0,
                          from src/zlib/gzguts.h:28,
                          from src/zlib/zutil.c:10:
c:\mingw\include\io.h:301:1: error: unknown type name 'off64_t'
 __CRT_INLINE off64_t lseek64 (int, off64_t, int);
 ^
c:\mingw\include\io.h:301:36: error: unknown type name 'off64_t'
 __CRT_INLINE off64_t lseek64 (int, off64_t, int);
 ^
c:\mingw\include\io.h:302:1: error: unknown type name 'off64_t'
 __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence);
 ^
c:\mingw\include\io.h:302:39: error: unknown type name 'off64_t'
 __CRT_INLINE off64_t lseek64 (int fd, off64_t offset, int whence);
 ^
make: *** [/tmp/libtcod/zlib/zutil.o] Error 1

Any idea what's causing the problem here?

Edit: Took a peek at BearLibTerminal and it seems like it could be interesting. I've been more interested in doing most of the game-y coding myself, and I was honestly looking to libtcod for the simple ability to move characters around on the screen. I continue to have very little knowledge of how to work with libraries, but yours sounds like it might suit my interests better.

I still would like to figure out my problem with libtcod though. =p

9
Programming / Re: Getting C++ working with libtcod
« on: July 20, 2014, 03:15:37 PM »
Try this: http://codeumbra.eu/complete-roguelike-tutorial-using-c-and-libtcod-part-1-setting-up
That's the tutorial I've been following...I linked to that exact page, thought the link is admittedly hidden away nicely in my post.  There's perhaps a good chance that I missed something crucial from it, but I can't seem to figure out what that is. It feels like I might just not have some files where they should be.

10
Sorry if I'm doing something wrong with this thread, I haven't done much on these forums as of yet and am vaguely tired, and thus likely to do things without much thought. Anyhow:

To begin, I have slightly above minimal knowledge in programming. I've gone through a year long class on Java, and have been learning C++ on my own since before then. Running on Windows 7 (64-bit, if that's important).

After convincing myself that I have enough knowledge to make some form of a game, I've began my trek to try and make a roguelike. This has led me to the idea of external libraries, and libtcod in particular. I want to do it in C++ because I've always had an unexplainable interest in the language. Serendipitously, there is a tutorial on the internet for making roguelikes in C++ using libtcod (here).

The first bit of code on there does not run properly for me.

Comiling this:

Code: [Select]
#include "libtcod.hpp"
int main() {
    TCODConsole::initRoot(80,50,"libtcod C++ tutorial",false);
    while ( !TCODConsole::isWindowClosed() ) {
        TCODSystem::checkForEvent(TCOD_EVENT_KEY_PRESS,NULL,NULL);
        TCODConsole::root->clear();
        TCODConsole::root->putChar(40,25,'@');
        TCODConsole::flush();
    }
    return 0;
}

using this in the console:

Code: [Select]
g++ src\*.cpp -o tuto -Iinclude -Llib -ltcod-mingw-de
bug -static-libgcc -static-libstdc++ -Wall -g

and running it with gdb tells me this:

Code: [Select]
Starting program: C:\Users\Soulusk\gameplace\tuto.exe
[New Thread 3440.0xfac]
[New Thread 3440.0x12e8]
24 bits font.
key color : 0 0 0
character for ascii code 255 is colored
Using SDL renderer...

Program received signal SIGSEGV, Segmentation fault.
0x65e70d9f in TCODConsole::clear (this=0x1) at src/console.cpp:196
196     src/console.cpp: No such file or directory.

The last three lines are the important bit, I'm guessing.

So...I really don't know what this is telling me. Is the program unable to find src/console.cpp? I've been able to run some other programs using libtcod without the clear and putChar functions in it, and they worked fine, confusing me even more.

Anyone with actually experience willing to help me figure this nonsense out so I can get back to the roguelike thing?

11
Hello everypeople, might as well make a new person post while I'm here.

Dwarf Fortress, as I hear is common, was my first "sorta roguelike depending on your view" experience. Things that drew me in: extreme complexity and awesome visual representation, which I hadn't seen done before. Not sure exactly when, why, or how the choice to start playing DCSS came about, but that was my next delve into roguelikes. I'm beginning to try to expand into other large roguelikes, but I'm finding it difficult to adapt to new interfaces and layouts and such.

In terms of making roguelikes...well, I'll probably be more on the player side of things. For a good while, at least. I can guarantee that if I ever decide to create a game, it'll be something of a roguelike, though. ASCII for sure. ;)

Other than that, thought I'd join because talking about roguelikes is awesome, and I don't have much in terms of friends who play them. I did actually get one friend playing DCSS  just yesterday (they find it fairly straightforward and fun, even), so I'm proud of that. :P

12
I've only played a few rounds of this, but I quite enjoyed it, more so after switching to ASCII. I didn't mind the tiles too much (to be honest it's my first time playing a roguelike in tiles besides a sad attempt at ToME), but I couldn't seem do very well with them for some reason...

I suppose I should actually play Doom itself, too. I don't recall having ever played it.

13
The thing is, a lot more games these days have graphics, many people avoid ASCII/character graphics now, and sure there's bad games with graphics, but there's also quite a lot of good ones. Avoiding graphics really cuts off some good games.
This is true. I can't say I just dislike graphics in general, because I do in fact love well done graphical video games. I just have a preference for ASCII over tiles in roguelikes I guess. If I must, I will give a graphical game a chance. As an example, I tried DoomRL graphically at first, and it wasn't too bad. I found that when I decided to switch over to the console version, interestingly, I literally became 10x better at the game (According to my score, anyhow).

And sheesh, I couldn't imagine such a slow internet connection x.x I may hate being in bigger cities, but service is definitely something I enjoy having.
I'm actually extremely used to it, since I've lived with it since I ever knew the internet existed. I just recognize that it has a lot of frustrating limitations. I'll be moving to a city this year for university though, so I'll get to experience the wonders of high speed internet soon. :D

14
My connection is 30 kb/s, sometimes higher. It also stalls and drops a lot.
He he, if that's in kilobits, then it's awfully close to the speed of my internet connection, if kilobytes, that's like high speed internet to me. =P

On the poll, kind of surprised that I'm the only one turned off (so far, of course) by not having an ASCII option...maybe I should give tiles more of a chance? I just love the simplicity of ASCII compared to graphics.

Pages: [1]