Here is a Screenshot of my GUI for my RPG

This is a discussion on Here is a Screenshot of my GUI for my RPG within the Game Programming forums, part of the General Programming Boards category; Btw, itoa is not standard so it's best to steer away from it....

  1. #31
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,791
    Btw, itoa is not standard so it's best to steer away from it.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  2. #32
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    ...you'll have what the vast majority of amateur programmers don't: an actual playable game.
    Hehe. That includes us does it not Bob? I have more of what I would call really fancy tech demos. I get so caught up on new algorithms or wanting to try this or that I totally lose the whole 'finished game' concept. Oh and I'm a 'professional' programmer now but I'm still an 'amateur' game/tech demo programmer.

    @ the OP:
    I say this GUI is a great start to a very doable (if that's a word) and playable game. Keep up the work and let us know how it's progressing. And kudos to you for realizing what is really important in a game. If you learn the underlying fundamental concepts the sky is the limit.

  3. #33
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Quote Originally Posted by eaane74 View Post
    dwks:

    By "cache" do you mean:
    Code:
    COORD SetPosition(COORD Position, int x, int y)
    {
         COORD old_Position = Position;
         
         Position.X = x;
         Position.Y = y;
         SetConsoleCursorPosition(m_Screen, Position);
    
         return old_Position;
    }
    I know some Window functions do do something like that, most notably SetTextColor
    I was thinking of something more like this:
    Code:
    static int last_x_pos = 0, last_y_pos = 0;
    
    void SetPosition(int x, int y)
    {
         COORD Position;
         
         Position.X = x;
         Position.Y = y;
         SetConsoleCursorPosition(m_Screen, Position);
    
         last_x_pos = x;
         last_y_pos = y;
    }
    
    void SetXPosition(int x) {
        SetPosition(x, last_y_pos);
    }
    
    void SetYPosition(int y) {
        SetPosition(last_x_pos, y);
    }
    It doesn't matter too much, though.

    Though you'd probably use a class instead of global variables in C++ . . . .
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  4. #34
    Absent Minded Programmer
    Join Date
    May 2005
    Posts
    964
    dude thats badass


    I'd love to see some of your code, I'm really interested in what you are doing. I have an IO system here I'm trying to make capable of outputting LOTS of data onto the screen. We should talk, pm me .
    Sometimes I forget what I am doing when I enter a room, actually, quite often.

Page 3 of 3 FirstFirst 123
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. problem
    By ExDHaos in forum C++ Programming
    Replies: 12
    Last Post: 05-22-2009, 04:50 AM
  2. Clockwork screenshot - GUI
    By psychopath in forum Game Programming
    Replies: 17
    Last Post: 03-20-2006, 04:40 PM
  3. .NET And GUI Programming :: C++
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 01-27-2002, 03:22 PM
  4. GUI Programming :: C++ Exclusive
    By kuphryn in forum C++ Programming
    Replies: 5
    Last Post: 01-25-2002, 02:22 PM
  5. C++: Reference Book, GUI, Networking & Beyond
    By kuphryn in forum C++ Programming
    Replies: 4
    Last Post: 11-10-2001, 07:03 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21