Thread: turbo? clean? basic? Is C still a contender?

  1. #1
    Registered User
    Join Date
    Mar 2002
    Posts
    18

    Unhappy turbo? clean? basic? Is C still a contender?

    I'm new to C.
    Read part of one book (it was mis-printed and was missing a chunk), picked up a book on Turbo C (seems to have some of the basics at least), plan to read other books, have a copy of FreeBSD to put on the computer I'm borrowing...
    I think I want to stay with C and not learn C+ right now.
    I'm working on the development of a prototype of an interactive game/planning tool (my own design).
    Think I'll go read some other posts now...
    Alex

  2. #2
    Registered User
    Join Date
    Mar 2002
    Posts
    42
    Is C still a contender?

    *watches dead programmers turn in thier graves*

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    18

    rolling dead programmers

    Hmmm.
    Is C still a contender when compared to C+.
    I.E.: Can serious interactive graphic programs be turned out with just C.
    Whew...

  4. #4
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >Can serious interactive graphic programs be turned out with just C.
    No, nor can serious graphic programs be written with just C++ either. Both languages require the use of outside libraries for graphics.

    -Prelude
    My best code is written with the delete key.

  5. #5
    The Artful Lurker Deckard's Avatar
    Join Date
    Jan 2002
    Posts
    633

    Re: rolling dead programmers

    Originally posted by amzolt
    I.E.: Can serious interactive graphic programs be turned out with just C.
    I can't find a link to back this up, but I understand that Diablo 2 was written in C, and not C++.
    Jason Deckard

  6. #6
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793

    Re: Re: rolling dead programmers

    Originally posted by Deckard
    I can't find a link to back this up, but I understand that Diablo 2 was written in C, and not C++.

    As was Quake ...I think......there's a link posted by no-one here somewhere......that showed part of the quake code....

  7. #7
    Mayor of Awesometown Govtcheez's Avatar
    Join Date
    Aug 2001
    Location
    MI
    Posts
    8,823
    >As was Quake ...I think......there's a link posted by no-one here somewhere......that showed part of the quake code....

    Not just part - all of the source for Wolfenstein 3d, Doom, Quake, and (I think) Quake 2 are available from ID's site for free.

  8. #8
    Registered User
    Join Date
    Mar 2002
    Posts
    18

    See? C is a sea of potentiality!

    Thank you!!!
    /* Govtchez, Fordy, Deckard, Prelude & Nit */
    I have no more doubts and much more drive. I may be an ol' dog but I'm gonna learn me some real pretty tricks!
    Alex
    C_Newbie

  9. #9
    Registered User
    Join Date
    Mar 2002
    Posts
    18

    Graphics Libraries

    Prelude indicated graphics libraries have to be "imported".
    Where are good places to find graphics libraries for "Clean C"?
    Alex

  10. #10
    Sayeh
    Guest
    > No, nor can serious graphic programs be written with just C++ either. Both languages require the use of outside libraries for graphics.


    Wrong. C can be used to do _anything_, including a graphics engine as sophisticated as you could imagine. No third party libraries necessary.

    Most of you just don't get it do you (and sometimes I think you never will). I've been coming here for practically 7 years and.... oh screw it. I could rant, but it ain't really all that helpful is it? Besides, in most cases it's not your fault-- most of you are mislead but other ignorant hopefuls, or have no way of educating yourself because it's almost not available anymore.

    ---

    Let's start with the basics shall we-- Just what exactly do you think is in a computer? What are graphics, really?

    There are only 2 things in a computer:

    -- addition
    -- addresses (RAM locations)

    that is it. Everything is done with those 2 things and 'interpreting' the information in RAM.

    Period.

    Simple.

    What is a pixel on the screen? It is merely a value stored in a location in RAM. Video RAM is arranged logically in rows (physically it's all consecutive). All a line algorithm does is place values in specific RAM locations based on the dimensions of Video RAM. The video hardware, which has video "mapped" to the same section of RAM (which is a fancy way of saying it is scanning regular RAM superfast and copying any changes into the VRAM).

    So, anytime you touch the RAM being scanned into VRAM, you change the contents of the data displayed on your monitor-- this is called 'direct drawing'.

    So, if you know this, it is very easy to see how C or C++ for that matter, may be used to write a graphic engine of any level of sophistication-- all you're doing is changing data in RAM based on a specific set of rules which allow interpretation what those data changes mean (why is one pixel yellow, and the other turquois, for example).

    Any graphic engine is started with 'primitives'-- these are the most basic shapes and usually are very highspeed. Everything else is derivative off these things.

    pixel (dot)
    line
    arc
    fill
    clipping

    to name a few. everything else stems or derives off of these.

    enjoy.

  11. #11
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >C can be used to do _anything_, including a graphics engine as
    >sophisticated as you could imagine. No third party libraries
    >necessary.
    I'm sorry, I should have been more specific. I meant that there was no portable way with ISO standard C/C++. If you throw portability to the wind OR cover for all possible platforms then you can do anything.

    -Prelude
    My best code is written with the delete key.

  12. #12
    Sayeh
    Guest
    > I meant that there was no portable way with ISO standard C/C++.

    But that isn't true either. Of course C is portable enough to do anything you want with any computer in a single application, using nothing more than ISO standard C.

    That's part of the power of #pragma, #define, #ifdef, and #ifndef... to make your code portable based on platform...

    --

    As an example, have you ever looked at the JFIF/JPG sourcecode? Straight C and will recompile across atleast 6 platforms (Mac, Win, UNIX, etc.) without changes.

    The ISO-standard libraries (stdio, etc.) in any cross-platform compiler have enough compiler directives (#define, etc.) to make you dizzy-- all so the same code can be compiled on different processors and platforms without change...


    It is a truism that people usually "look down upon" things they don't fully understand. Don't do yourself this disservice.

    enjoy.

  13. #13
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >OR cover for all possible platforms then you can do anything
    Which also includes conditional compilation, but I do know that #pragma has an implementation defined effect unless they've changed this in C99.

    >It is a truism that people usually "look down upon" things they
    >don't fully understand. Don't do yourself this disservice.
    Hardly, I attempt to learn more about things that I do not fully understand. I've had no cause to work with graphics yet and it was my understanding that graphics programming was very much hardware dependent, otherwise everyone would write their own libraries instead of using third party libraries such as DirectX and OpenGL. Perhaps you could enlighten me?

    -Prelude
    My best code is written with the delete key.

  14. #14
    Unregistered
    Guest

    C can do "anything" vs portability

    Yes, Sayeh, perhaps you could enlighten us about how to do graphics with C, not using any imported libraries, and also not having to have more knowledge than some of us may currently have.
    I mean, isn't one of the beauties of C that there's such a small "core" language and so many libraries out there?
    Almost like web "middleware", but not quite...
    Anyone have an apt analogy?
    Alex

  15. #15
    Registered User C_Coder's Avatar
    Join Date
    Oct 2001
    Posts
    522
    *Grabs popcorn, pulls up chair*
    All spelling mistakes, syntatical errors and stupid comments are intentional.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 10
    Last Post: 11-23-2007, 12:13 AM
  2. Remember Turbo? It is comming back
    By Mario F. in forum A Brief History of Cprogramming.com
    Replies: 1
    Last Post: 08-14-2006, 01:26 PM
  3. [ANN] New script engine (Basic sintax)
    By MKTMK in forum C++ Programming
    Replies: 1
    Last Post: 11-01-2005, 10:28 AM
  4. what are your thoughts on visual basic?
    By orion- in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 09-22-2005, 04:28 AM