Thread: "drawing pictures" in C++ programs

  1. #1
    Registered User
    Join Date
    Sep 2001

    Thumbs up "drawing pictures" in C++ programs

    how do you code images into output statements with using a ton of cout statements?...i want to write a jeopardy game and "Draw" the characters of the game onto the screen but i am not sure how to do this without having a thousand cout statements for each symbol which will make up the images...any suggestions?

  2. #2
    Registered User
    Join Date
    Oct 2003
    i assume you mean ascii style pictures, as opposed to .bmp's or the like.

    that being true, you could use long strings and just change the parts of the string that actually change each move. you have the choice of just assigning new chars when just a single/few pieces move, or using strcpy when a lot of adjacent chars change.

    if your feeling brave, you could even make a string table and then just have one cout statement coded into a loop.

    (if you are talking about bmp's, then i don't think cout can help you! )

  3. #3
    Registered User
    Join Date
    Feb 2002
    i wrote this a while back and i dont know if anyone has made good use of it. i quite like it.

    its basically a graphics engine for ascii console graphics. it makes ascii graphics not only easy, but extremely fast and smooth. it doesnt use cout or anything like that, instead it writes to a buffer and uses a function called WriteConsoleOutput to display it to the screen all at once. it also is paired with an animation class that allows you to load frames of an animation and play them contiguously.

    the zip includes a readme and some example programs i wrote.
    I came up with a cool phrase to put down here, but i forgot it...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Starting programs
    By Molokai in forum C Programming
    Replies: 1
    Last Post: 04-16-2009, 10:10 AM
  2. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  3. Problem using java programs within C code
    By lemania in forum Linux Programming
    Replies: 1
    Last Post: 05-08-2005, 02:02 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:12 AM