Announcement

Collapse
No announcement yet.

displaying things with G++ ?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • displaying things with G++ ?

    i am using a G++ compiler under cygwin (unix emulation for windows) and Microsoft Visual C++ simply to maintain the code.
    im looking for a simple way to simulate some kind of map where you navigate, move cursor/units, etc...
    a very simple way will be fine. but i have problems with the fact that everything is shown in the original text window and will scroll out of sight when you type anything.
    i have discovered some cursor control functions, so theoretically i could use colored letters to simulate a map. but that is rather limited and unsatisfactory.

    does anyone know of a way to create a new window with displays, pixels, possibly mouse controls.
    or can someone help to use that Visual C++ (6.0) thing ? i used it years ago, but have forgotten what little i knew.
    Baal: "You dare mock me ?"
    O'Neill: "Baal, c'mon, you should know ... Of course I dare mock you."

  • #2
    I guess you could seek out some kind of graphics library...

    Whatever you do, be sure to keep the display component seperate from the unerlying engine to make it easy to rewrite using a different graphics system if you want.

    VC++6 should have several tutorials with it, which aren't terrible.

    Comment


    • #3
      Originally posted by J Bytheway
      I guess you could seek out some kind of graphics library...
      hmm. yeah. i was hoping someone would know one. but for the moment, it doesnt even have to be a real graphics library, rather some commands, standard or not, to control cursor, window, pixels, ...
      simple things. just to get started.

      Originally posted by J Bytheway
      Whatever you do, be sure to keep the display component seperate from the unerlying engine to make it easy to rewrite using a different graphics system if you want.
      you mean i should do all the graphics stuff in an independent module or something, so that the main program simply says something like "graphics.drawThings()" or so ?
      Baal: "You dare mock me ?"
      O'Neill: "Baal, c'mon, you should know ... Of course I dare mock you."

      Comment


      • #4
        Originally posted by Mathemagician
        hmm. yeah. i was hoping someone would know one. but for the moment, it doesnt even have to be a real graphics library, rather some commands, standard or not, to control cursor, window, pixels, ...
        simple things. just to get started.
        All I can offer is http://www.gtk.org/

        you mean i should do all the graphics stuff in an independent module or something, so that the main program simply says something like "graphics.drawThings()" or so ?
        Something like that, yes. Just avoid having code that relates to I/O in the same class as code that checks or executes game logic - that's the benefit of object-oriented programming.

        Comment


        • #5
          thanks for the help. will check it out.
          Baal: "You dare mock me ?"
          O'Neill: "Baal, c'mon, you should know ... Of course I dare mock you."

          Comment


          • #6
            Gtk+ is for interfaces... for pushing pixels to the screen, SDL is probably a good idea.
            This is Shireroth, and Giant Squid will brutally murder me if I ever remove this link from my signature | In the end it won't be love that saves us, it will be mathematics | So many people have this concept of God the Avenger. I see God as the ultimate sense of humor -- SlowwHand

            Comment


            • #7
              thanks.
              will look into all that when i find time.

              any specific experience on how to do it from inside a cygwin shell ?
              Baal: "You dare mock me ?"
              O'Neill: "Baal, c'mon, you should know ... Of course I dare mock you."

              Comment

              Working...
              X