Results 1 to 11 of 11

Thread: Conway's Game of life in C - How can I do Graphics

  1. #1

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Cool

    Oo, nice shiny new forum

    Okay, so here's my post:

    I'm writing a simple-ish version of Conway's Game of Life for my first year BSc Programming mosule coursework. I have to write it in C. I can do the basics, because I've already taught myself some of the language, but we haven't learnt much else in C, they've been teaching us Pascal for ages. I'm pretty sure I can do the behind-the-scenes bits and the maths, but I'm not sur ehow to do the graphics. How can I do graphics in a Console app anyone?

    Oh and if you have any advice about this whole application I'd appreciate your thoughts.

    Thanks.
    Harry.

    "From one thing, know ten thousand things."

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Use DDraw

  3. #3

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Wink

    Hmm, I'm not sure Unix ha DirectX support
    Harry.

    "From one thing, know ten thousand things."

  4. #4
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Uhm... well then... *ahem*

    without DirectX... *thinks*
    ...hm


    -> What a nice day, isn't it?

    uhm...

    *hehe*

    !Ihavetogonowseeyoutomorrow


    +++ 10 minutes later +++


    well, I really don't know... never did graphical console apps... sorry

  5. #5

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    hehehe! Who was telling me that I it was important to learn the basics first because C++ was too easy then eh?

    I know there's graphics routines. Even simple ones like line drawing will do because I can make shapes from the lines. Or something to draw dots on the screen, so I can create a grid from that.

    Have you seen Conway's Game of Life Fox? I thnk I gave you a link to it. How would you make that as a console app do you think? I mean how would you want it to be? In that version I showed you they used a dot for each cell. I might have to scale it down a bit and use a character for each cell. What d'ya think?
    Harry.

    "From one thing, know ten thousand things."

  6. #6
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Well... I'd make it DDraw

    I don't like this console apps... they're only good for debugging oct-trees or something - no, log-files are even better for debugging...

    However, Of course it's possible! But I wouldn't know how to do it You have to find some include files containing graphical stuff... Ask someone other, I'm coding VB now *g*

  7. #7

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Err.. oct trees?

    Okay, I'll find someone who knows. Thanks.
    Harry.

    "From one thing, know ten thousand things."

  8. #8
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    Yeah, an OctTree is a method to split up your 3D-level in zones so you later only have to draw what's really on the screen... I had some mistakes in my BuildOctTree function so I had to debug. First I tried in a console app but there wasn't enough space on the screen to display all these numbers ... so I switched to log files - works fine

  9. #9

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Ah right. I've seen people mentoin them before but not really known what they were on about

    Cheers.
    Harry.

    "From one thing, know ten thousand things."

  10. #10
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Use X, or some fancy ASCII graphics.

  11. #11

    Thread Starter
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827

    Cool

    Hey, my thread's still here then

    Thanks for all the advice. I've finished with it now, I used the ASCII character '*' because taht's what my programming lecturer said I should use.

    Been a while since I posted here. Anyway... *Waves*
    Harry.

    "From one thing, know ten thousand things."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width