Thread: What's the best compiler for graphics primitives?

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    1

    Question What's the best compiler for graphics primitives?

    I am used to using BASIC on my graphing calculator and Qbasic. I like the simple interface, these languages output directly to the screen, and the commands are few and simple. I'm basically looking for a compiler (or language, if necessary) that will let me work with a console, with good graphics capabilities. If you are familiar with TI calculator basic or Qbasic, think that, but with maybe 800x600 resolution with at the very least a 256 color palette, and definitely mouse capabilities.

  2. #2
    do a search for "allegro graphics api" from google, because allegro is the way to go for simplicity and power. you'll look at the documentation, and then say to yourself "whoa, i can do a WHOLE lot more with this than i can do with qbasic!" i know, cause i started out on qb4.5 (NOT a good idea though, c++ or c is the best starters language imho)
    -Save the whales. Collect the whole set.

  3. #3
    Registered User
    Join Date
    May 2002
    Posts
    66
    Visual C++ Stadard Edition (around 99$US), then download the DirectX 8.1 SDK from Microsoft (free) and you are ready to write games Well it's a start anyhow.

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I'm not sure what you are asking. You can do 800x600x32 bit color in QBasic or any other valid VESA mode. It's just not going to be fast, even in real-mode C its not. Plus in order to back buffer...well you can't because of QBasic's memory model limits. There are some tricks in assembly but I doubt you want to dive head first into them.

    QBasic is a good language to begin on. But you must know when you have reached the limits of your language. It's not going to tell you when you have reached that limit, it is for you to decide. If you have to do some fancy tricks just to get something simple like 800x600x32 bit color, chances are that your language is not helping you and therefore it is time to switch to another language.

    If you are used to QBasic then you might try Visual Basic 6. You can program for DirectX 8 with it, although DirectX is primarily designed to be used with C/C++. But you can get some very good graphics even in VB6 with DirectX 8.

    If you are not familiar with types and objects in QB, I would brush up on those skills prior to attempting VB6.

    For instance:

    Code:
    type point2d
      x as integer
      y as integer
    end type
    
    type point3d
      x as double
      y as double
      z as double
    end type
    
    type vertex
      vlocal as point3d
      vworld as point3d
      vview as point3d
      pscreen as point2d
    end type
    
    dim shared vertexlist[100] as vertex
    Nearly the same as this in C:
    Code:
    struct point2d
    {
      int x;
      int y;
    };
    
    struct point3d
    {
      double x;
      double y;
      double z;
    };
    
    struct vertex
    {
      point3d vlocal;
      point3d vworld;
      point3d vview;
      point2d pscreen;
    };
    
    vertex vertexlist[100];
    
    or 
    
    vertex *vertexlist=new vertex[100];
    You can use interrupts in QB via the CALL INTERRUPT family of functions (SUBs).

    To plot pixels in SVGA modes in QB you will need to use POKE to place each value in the correct location in video memory. You will also have to have a bank switching function. You might be able to point QB to the far bank swithing function of the video card using CALLS (formerly CALL ABSOLUTE) but I haven't tried that.
    I use the interrupt (C: 0x10 - asm: 10h - QB: &H10) to bank switch. Check the RBIL for more info.

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    305
    i thought this was a c/c++ programming site. youre asking for qbasic info.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. added start menu crashes game
    By avgprogamerjoe in forum Game Programming
    Replies: 6
    Last Post: 08-29-2007, 01:30 PM
  2. Compiler Paths...
    By Cobra in forum C++ Programming
    Replies: 5
    Last Post: 09-26-2006, 04:04 AM
  3. C Compiler and stuff
    By pal1ndr0me in forum C Programming
    Replies: 10
    Last Post: 07-21-2006, 11:07 AM
  4. I can't get this new compiler to work.
    By Loduwijk in forum C++ Programming
    Replies: 7
    Last Post: 03-29-2006, 06:42 AM
  5. how to call a compiler?
    By castlelight in forum C Programming
    Replies: 3
    Last Post: 11-22-2005, 11:28 AM