PDA

Click to See Complete Forum and Search --> : Conway's Game of life in C - How can I do Graphics


HarryW
Apr 24th, 2000, 07:25 AM
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.

Fox
Apr 25th, 2000, 11:57 AM
Use DDraw :cool:

HarryW
Apr 25th, 2000, 06:41 PM
Hmm, I'm not sure Unix ha DirectX support :)

Fox
Apr 25th, 2000, 06:45 PM
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

HarryW
Apr 25th, 2000, 06:53 PM
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?

Fox
Apr 25th, 2000, 07:07 PM
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*

HarryW
Apr 25th, 2000, 07:44 PM
Err.. oct trees?

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

Fox
Apr 25th, 2000, 07:54 PM
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 :)

HarryW
Apr 25th, 2000, 08:21 PM
Ah right. I've seen people mentoin them before but not really known what they were on about ;)

Cheers.

parksie
May 29th, 2000, 08:09 PM
Use X, or some fancy ASCII graphics.

HarryW
Jun 20th, 2000, 12:35 AM
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*