Search:

Type: Posts; User: 20,000leeks

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Now imagine that the bulk of my coding looks...

    Now imagine that the bulk of my coding looks remarkably like that (especially when it's the result of 2AM sessions), and you see my problem in figuring out what's going wrong :P
  2. A few problems with basic text graphics...

    At the moment, I'm having a bit of trouble with the screen refresher for my very poor Roguelike attempt. Essentially, rather than reprint the entire screen anytime anything changes, I'd like to check...
  3. Replies
    15
    Views
    3,682

    Try getting your display system up and running...

    Try getting your display system up and running first, and then start dealing with map generating... that's how I'm doing it. Instead of randomly generating a map, I load a map file which allows me to...
  4. Replies
    32
    Views
    4,055

    Hm, dwks told me about vectors in another thread,...

    Hm, dwks told me about vectors in another thread, but I haven't seriously looked into them yet. Perhaps that would be a good idea.... My code is going to get very gluggy for multiple checks. I've...
  5. Replies
    32
    Views
    4,055

    ...well, in just a few short lines you've pretty...

    ...well, in just a few short lines you've pretty much done what it's taken me nearly 500 to do. Currently, all my location-relevant things are tied up in one class - like so


    class location
    {...
  6. Replies
    32
    Views
    4,055

    Well, you know, it pays to make sure with these...

    Well, you know, it pays to make sure with these things. I really doubt my basic little roguelike will ever be a commercial success (if it got *that* big, I'd release the source so other, less lazy,...
  7. Replies
    32
    Views
    4,055

    Hm, that seems like a much more efficient way of...

    Hm, that seems like a much more efficient way of defining colours... at the moment, I'm using the textcolor() function from the conio headers, but that means if I want to change background colour, I...
  8. Replies
    13
    Views
    1,769

    Hmm, in that case, a vector may be what I'm...

    Hmm, in that case, a vector may be what I'm looking for. At the moment, I'm limiting the number of items in a position to five, but the check for items depends on the first slot being empty.

    I'm...
  9. Replies
    32
    Views
    4,055

    Well, from the manual and from the guide on this...

    Well, from the manual and from the guide on this site, curses can only specify eight colours (admittedly it can specify 8 background colours too, so really you've got 56 different colours,...
  10. Replies
    32
    Views
    4,055

    Well, I'm using the curses header, and now I have...

    Well, I'm using the curses header, and now I have to go through my code and remove any conio or windows header references :P.

    Still, at least this gives it a poor semblance of portability. And...
  11. Replies
    32
    Views
    4,055

    Hmmm, I had reset the window to 100x40 (I just...

    Hmmm, I had reset the window to 100x40 (I just checked), because the default was too small... is there any way to set that from within the program?
  12. Replies
    32
    Views
    4,055

    The window is 100x30...I think. Everything so far...

    The window is 100x30...I think. Everything so far has been using those numbers, and they seem to work just fine. While I was using the single-column file-reader, I managed to get a clean display, so...
  13. Replies
    32
    Views
    4,055

    True. The bigger this thing gets, the more...

    True. The bigger this thing gets, the more trouble I have finding out what exactly the problem is. I think soon I will have to split it into multiple files...

    Still, at the moment I can read a map...
  14. Replies
    32
    Views
    4,055

    Ah, yes, I noticed that one about five minutes...

    Ah, yes, I noticed that one about five minutes after posting it.... I guess there's an upside to uncomplicated applications, you catch typos faster.
  15. Replies
    32
    Views
    4,055

    Aha! Problem solved! Thanks a lot, I'd probably...

    Aha! Problem solved! Thanks a lot, I'd probably have resorted to using a single-column file otherwise....
  16. Replies
    32
    Views
    4,055

    Hmm, I tried for ( int i = 0; i < mapy; i++...

    Hmm, I tried


    for ( int i = 0; i < mapy; i++ ) {
    for ( int j = 0; j < mapx; j++ )
    if (a_file.get()!='\n'){
    terrain[j][i] = a_file.get() - '0';
    }
    else
    ...
  17. Replies
    32
    Views
    4,055

    Hmm, it *almost* works. I think because there's a...

    Hmm, it *almost* works. I think because there's a white space on the end of each line, that makes things a little more complex, so I tried:


    for ( int i = 0; i < mapy; i++ ) {
    for ( int j...
  18. Replies
    32
    Views
    4,055

    Hmm, thanks for the advice Salem, but it's still...

    Hmm, thanks for the advice Salem, but it's still not loading correctly :( . Maybe I should figure out how the C commands work rather than mess around with the C++ commands... although the C version...
  19. Replies
    32
    Views
    4,055

    To be honest, I just prefer it that way.... the...

    To be honest, I just prefer it that way.... the main() setup goes something like so:


    int main()
    {
    char mapf[10];
    cout<<"Enter map file:\n";
    cin>>mapf;
    if...
  20. Replies
    32
    Views
    4,055

    File I/O with arrays

    Yet another newbie-ish problem.... this time slightly more advanced.

    I'm having a bit of trouble reading information as text from a file.... The information involves three different sets of...
  21. Replies
    13
    Views
    1,769

    It works! There's a little character that moves...

    It works! There's a little character that moves around the screen! (only in cardinal directions at the moment, but that's easy to change).

    ...all that at only 1.24 mb -.-

    Efficient, it is not....
  22. Replies
    13
    Views
    1,769

    Hmm, this is starting to get a bit heavy-going -...

    Hmm, this is starting to get a bit heavy-going - like I said, I'm not too confident with classes. I understand the basic ideas behind inheritance though, and it sounds like a perfect way to add types...
  23. Replies
    13
    Views
    1,769

    I like the idea of having types, that sounds much...

    I like the idea of having types, that sounds much more efficient (and easier for me to figure out exactly what I was thinking when I need to debug). To be honest, I've never seen the enum declaration...
  24. Replies
    13
    Views
    1,769

    Wow, thanks for your help! I can't say I...

    Wow, thanks for your help! I can't say I understand half of your tmaze program, but it's nice to know that it *can* be done.

    As to my own efforts, I've tried setting up an overlaying 'object...
  25. Replies
    13
    Views
    1,769

    Ahhh, that seems to have fixed it! Thanks for...

    Ahhh, that seems to have fixed it! Thanks for your help!

    Revised code:


    char movedir;
    field[charx][chary]='1';
    while ((movedir = getch()) != EOF
    && movedir != 'q')...
Results 1 to 25 of 27
Page 1 of 2 1 2