Thread: What Else can I do besides Plot Pixels?

  1. #1
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039

    What Else can I do besides Plot Pixels?

    im a newbie at DOS Game Programming, or just DOS Programming in general, and I was wondering What else could one do besides PLOT PIXELS?!?!?!?! IMEAN, all i ever do is PLOT PIXELS!!!! Ok, I'll cut to the chase. Could somone please show me how to use the arrow keys and make a function happen? like for example, I hit the left arrow key and text appears saying "You hit the left arrow key!". Thank you, I'm dieing of bordom from just plotting pixels all over the place. O yeah, big text to. Thanks.

  2. #2
    Ethereal Raccoon Procyon's Avatar
    Join Date
    Aug 2001
    Posts
    189
    It isn't hard to write your own program to find the scan codes of the arrow keys.

    Try this:

    Code:
    #include <conio.h>
    #include <stdio.h>
    
    int main(void)
    {
      char c = 0;
      while (c != 27)
      {
         c = getch();
         if (c) printf("%c=%d\n", c, c);
      }
    
      return 0;
    }
    Enter any key and it will give you the scan code (as well as the ASCII representation). Press esc to exit.

    To catch the scan code, just put the return value of getch() in a char variable. Then use == to see if it's one of the scan code values you want.

  3. #3
    kimberleyp
    Guest

    Lightbulb you might want to try this...

    An idea: I just finished a game in Assembly language called 'Linkup' that is based on a grid in DOS mode. The player can choose from set block clusters using F1, and can move, rotate and flip these within the main game area.

    The reason I say this is that a lot of concepts covered in this game you will find very useful in your projects: matrix rotation, screen buffering, dialog box generation, etc.

    Although you probably won't get most of it, you will certainly follow the commenting in the source.....

    Visit http://www.gradata.com -> Linkup to download it (source code included)!


    Regards,
    Peter Kimberley
    [email protected]

  4. #4
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Posts
    2,263
    i was about to suggest matrix multilication,

    anywayz heres a sight that shows how to use rotation and translation matrices.

    http://www.geocities.com/SiliconVall.../matrices.html
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  5. #5
    Registered User
    Join Date
    Sep 2001
    Posts
    305

    Question

    hmm, itd be cool to know how to plot a pixel :P

  6. #6
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    I'm making a really cool game right now. You use the arrow keys to move this guy around in a map. You have an inventory too. It should be done at the end of November.
    By the way, wanna know how to plot a pixel??

  7. #7
    Registered User
    Join Date
    Sep 2001
    Posts
    305

    yes!!!

    Yes!!! Please!!! :P

  8. #8
    Unregistered
    Guest
    test message...........

  9. #9
    Unregistered
    Guest
    test message (2) ......... please disregard

  10. #10
    Linguistic Engineer... doubleanti's Avatar
    Join Date
    Aug 2001
    Location
    CA
    Posts
    2,459
    >hmm, itd be cool to know how to plot a pixel :P

    it gives you amazing power... behold...

    http://www.cprogramming.com/cboard/s...&threadid=2171
    hasafraggin shizigishin oppashigger...

  11. #11
    Registered User
    Join Date
    Sep 2001
    Posts
    305

    Exclamation peepz!!!

    seriously, someone tell me a way to plot a pixel using asm in my compiler read below

  12. #12

  13. #13
    "The Oldest Member Here" Xterria's Avatar
    Join Date
    Sep 2001
    Location
    Buffalo, NY
    Posts
    1,039
    no one wants to learn assembley anymore, flik...
    any way

    if you want to plot a pixel then you will have to learn how to program in DOS. You are using a Windows Compiler, those are for windows applications. Get Borland TURBO C++ 3.1 or any other compiler that supports DOS*, and we'll talk.

    *Do NOT get DJGPP....it creates DOS programs but in a weird way...
    Last edited by Xterria; 10-02-2001 at 05:56 PM.

  14. #14
    Registered User
    Join Date
    Sep 2001
    Posts
    305

    Exclamation

    >no one wants to learn assembley anymore, flik...< excuse me?!?!
    mingw can compile dos progs. not commandline dos but dos in windows

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Manipulating single LCD pixels
    By finnepower in forum Networking/Device Communication
    Replies: 3
    Last Post: 02-22-2008, 08:45 PM
  2. bitmap pixels???????????
    By SuperNewbie in forum Windows Programming
    Replies: 2
    Last Post: 03-23-2004, 01:53 AM
  3. How to store pixels in memory created with Setpixel(...)
    By Kristian25 in forum Windows Programming
    Replies: 2
    Last Post: 03-11-2003, 06:09 AM
  4. creating image from pixels stored in file
    By Kristian25 in forum Windows Programming
    Replies: 3
    Last Post: 01-21-2003, 02:08 PM
  5. Algo needed for 'Fit to page'
    By Unregged in forum Windows Programming
    Replies: 6
    Last Post: 10-03-2002, 07:09 AM