Thread: making sprites

  1. #1
    l'Anziano DavidP's Avatar
    Join Date
    Aug 2001
    Plano, Texas, United States

    Question making sprites

    I am making sprites for my Dragonball Z clone of Liero, and have encountered some problems.

    I do not want to use a 3d modeler...because I dont need that....this is a 2d game....a 3d modeler is way too much to use for this....

    I have tried hand drawing my sprites in paintbrush....but that makes them look childish and not very well done.

    Are there any good sprite making programs out there? I need a program that would aid me in making my sprites. Especially when my sprites for characters have to be as small as 13x13 pixels....
    My Website

    "Circular logic is good because it is."

  2. #2
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    One technique I've seen is to hand-draw your sprites with pencil
    and paper then scan them. Clean up the scan, then paint in your
    colors/shadows/etc.. If I'm not mistaken that's what Capcom did for the Street Fighter 2 game series.

  3. #3
    Registered User compjinx's Avatar
    Join Date
    Aug 2001
    "The most overlooked advantage of owning a computer is that if they foul up there's no law against whacking them around a bit."
    Eric Porterfield.

  4. #4
    Rambling Man
    Join Date
    Jan 2002
    One technique I've seen is to hand-draw your sprites with pencil and paper then scan them. Clean up the scan, then paint in your colors/shadows/etc..
    Yeah, I've heard that too, and the people I heard that from had some killer 3D figures. I was going to buy a scanner a few weeks ago, so I could do this. However, I realized that it would be of no purpose to me right now, because I wouldn't be able to implement the figures into my games (bad consoles!). Over the course of this school year I have become much better at drawing from doing all of my sketches during my insanely simplistic math class.

  5. #5
    Has a Masters in B.S.
    Join Date
    Aug 2001
    Paint Shop Pro 6 (NOT 7, 7 is slower for some reason)
    of Photoshop 6 or 7.

    those are the tools of choice
    ADVISORY: This users posts are rated CP-MA, for Mature Audiences only.

  6. #6
    Programming is fun, mkay?
    Join Date
    Oct 2001

    Here's a sprite using what I...

    Well, I just made a sprite, just seeing how good I could do. I think it's pretty good, seeing as it's my first try at a character. Anyhow, I will attach the .bmp. I used techniques I learned from the posted link


    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  7. #7
    Used Registerer jdinger's Avatar
    Join Date
    Feb 2002
    Pretty cool little guy. Looks like a sprite you'd see in a 2d rpg.

  8. #8
    Registered User heat511's Avatar
    Join Date
    Dec 2001

    i like it too (nt)


  9. #9
    Registered User
    Join Date
    Nov 2009
    The link does not work but you coded that in C?

  10. #10
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    segmentation fault
    No, I would gather from the discussion that this just refers to the image, which is a bitmap. The bitmap will be read in by the program at runtime.

    So rather than coding the sprite directly, you draw the sprite in some kind of photoshop style program and then save it as "raw" bitmap data. As long as you know the dimensions and exact format of the data, this is the easiest kind of image to process, because it does not have a header and is uncompressed.

    Here's an example of what I mean by "format": a normal (non-transparent) bitmap contains 3 bytes per pixel. These occur in the file in order, row by row, from the top left corner. The data is said to be interleaved because it alternates Red value, Green value, Blue value (as opposed to organizing the file with 3 sections).

    Some image software such as gimp will do an image dump into C code. For example, here is the first little bit of my current avatar. This was created by loading the jpg into gimp and resaving it with the extension .c instead of .jpg. I don't know what other image editors will do this -- it's actually of debatable value, since if you compile a few of these in it will increase the size of your executable substantially. It would be more normal, as I said, to save the image as .raw, in a separate file, and then read it in at runtime:
    /* GIMP RGB C-Source image dump (CIAvatar.c) */
    static const struct {
      unsigned int   width;
      unsigned int   height;
      unsigned int   bytes_per_pixel; /* 3:RGB, 4:RGBA */ 
      unsigned char  pixel_data[55 * 55 * 3 + 1];
    } gimp_image = {
      55, 55, 3,
    This goes on for another 300 lines. As you can see, directly coding an image would be very tedious.

    .xpm images are C code, if you look at them in a text viewer instead of an image viewer, eg:
    /* XPM */
    static char *Toaster[] = {
    /* columns rows colors chars-per-pixel */
    "48 48 90 1",
    "  c #020202",
    ". c #0C0C0C",
    "X c #141414",
    Again, the only problem with this is you must compile it in to take advantage of the format.
    Last edited by MK27; 02-20-2010 at 07:06 AM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Making great graphics
    By MadCow257 in forum Game Programming
    Replies: 1
    Last Post: 02-20-2006, 11:59 PM
  2. Making control...
    By Finchie_88 in forum C++ Programming
    Replies: 2
    Last Post: 09-07-2004, 01:42 PM
  3. Animating Multiple Sprites
    By Tommaso in forum Game Programming
    Replies: 2
    Last Post: 10-11-2002, 12:06 AM
  4. Sprites In Console
    By c++_n00b in forum A Brief History of
    Replies: 4
    Last Post: 04-13-2002, 07:02 AM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 07:37 AM