+ Reply to Thread
Results 1 to 12 of 12

Thread: [Tutorial] How to make 2D sprites for Darkest Hour

  1. #1
    SvenHassel: come death come! novapaddy's Avatar
    Diplomacy PlayerHoI AnthologyGalactic AssaulterNapoleonic MarshalDeus Vult!
    Europa Universalis: RomeFinder of the Lost EmpirePenumbra -  Black PlagueHearts of Iron 2: ArmageddonVictoria: Revolutions
    Europa Universalis III: In NomineEU3 CompleteRome: Vae VictisSupreme Ruler 2020Rome Gold
    East India CompanyHearts of Iron IIIMajesty 2Supreme Ruler 2020 GoldFor The Glory
    Arsenal of DemocracyHeir to the ThroneEast India Company CollectionRise of PrussiaAchtung Panzer
    Lead and GoldMount & Blade: WarbandLegioSemper FiElven Legacy Collection
    Victoria 2Commander: Conquest of the AmericasLionheartDivine WindShip Simulator Extremes
    Iron CrossMagickaCities in MotionEU3: ChroniclesSword of the Stars
    Darkest HourMajesty II CollectionCrusader Kings IIPirates of Black CoveMount & Blade: With Fire and Sword
    Pride of NationsFor the MotherlandSupreme Ruler: Cold WarSengokuSword of the Stars II
    Hearts of Iron III CollectionVictoria II: A House Divided

    Join Date
    Aug 2009
    Posts
    3,316

    [Tutorial] How to make 2D sprites for Darkest Hour

    2D Sprite Tutorial.

    It's very easy to make 2D sprites. No modelling is required. You just draw the sprite and drop it into the game. The following is a step-by-step tutorial on the process from start to finish.

    I'm drawing a Sd.Kfz 234 panzerspawagon.




    I'm using GIMP, so the first thing I need to do is create a file and give it a background. I'm using 96 x 96 pixels for my file. Choose Transparent.



    I colour the background green, (transparent colour) as this will not show in the finished product. The green colour was taken from a 3D sprite palette file, found in the Darkest Hour/gfx/palette folder of the core game.

    For this model, the first thing I do is draw a wheel.



    I constantly look at the picture and compare the images.

    1 wheel becomes 2, and 2 become 4 as needed.






    I now start drawing the frame of the vehicle, pixel by pixel.



    It takes patience and trial-and-error, but finally I have a frame.



    Using the Fill Tool, I fill in the colours I want.



    So the drawing is now complete. Save the image as a 24-bit RGB image.



    Now starts the preparation for spriting that image.

    Create a file of size 192 x 96, as I'm going to now double up on the image for my sprite.






    I copy and paste in my original image, and then copy it again. 2-up is what I need.



    This now totally completes the drawing process. Everything after this is with 3 files.


    The 3 files I need are shown here.




    1: 2-up image
    2: .SPR file (which contains the image information)( can be opened with Notepad)
    3: Palette file.

    3: The palette file is simply taken from the palette already in the game. Most of the palette files are the same, just with different names. I now name this file to suit my purposes.

    T-L_PANZER C-GER L-2.

    Explanation: T-L_PANZER denotes a Light Panzer, which is built first in the game, and 2 means the 2nd sprite built.
    C-GER denotes Germany and L-2 means Level 2 sprite.


    2: Opening up the SPR file, shows the information within.



    It is most important that all the file names are correct, as otherwise the sprite will not work.

    Bitmap: is my 2-D image
    Origin: is where the image will go on the map.
    Frames: I've got 2 frames (2-up).
    Speed: My 2nd frame will "animate" at this speed. 50 is slow.
    Palette: is my palette file name.

    I'm using only 2 frames, as that's all I need. In the game, my first frame will show the image, and my 2nd frame will show the image+ a blinking arrow to denote direction.

    This is the STAND sprite. No blinking arrow is added here, as it just stands and doesn't move. This is a list of all the sprites I will subsequently make, with added arrows in these directions: N, S, E, W, NE, NW, SE, SW. So 8 directional (WALK) and 1 STAND makes 9 sprites.

    Attack sprites now are added as (FIRE), again x 8, making a total of 17 sprites for every image in the game.



    So, using my STAND sprite, I would then add an arrow to the image, and save it as for example: T-L_PANZER A-WALK C-GER L-2 D-NE... to denote North East direction, and save each one in turn.

    To sum up:
    There are 8 directional (WALK) sprites
    There is one STAND sprite
    There are 8 directional (FIRE) sprites.

    17 sprites per image in the game. Don't worry, it only takes 10 minutes to do this whole process, once you have the original 2-up image (STAND).

    I now have all the files I need to place in the game.

    The Palette sprite goes into the Darkest Hour/gfx/palettefolder:



    The STAND image (for testing purposes) or all the 17 images go into the Darkest Hour/gfx/map/units/bmp folder:



    The SPR files go into the Darkest Hour/gfx/map/units folder:



    Now fire up the game and see your sprite:



    If you see black squares, or no image at all, then you need to check your files and see where you went wrong.

    BEST to make the STAND image, SPR file and Palette file, and test this file first, before completing the whole process, and only then finding out that things were wrong...!!

    This completes the tutorial. Seeing your own sprites in the game is very enjoyable, and I would encourage you to give this a go!

    Unfortunately, you will find yourself renaming / editing lots of files. To do so manually is crazy! I'd highly recommend these tools:

    http://www.beroux.com/english/softwares/renameit/ for renaming files.

    and http://www.inforapid.de/html/srdownload.htm for changing file contents very quickly.

    EDIT: Tutorial extended to explain how I'm doing "animation".

    I'm using a simple Green Arrow to show movement, and Red Arrow to show Battle.



    The tile is 96 x 96, so 2-up it is 192 x 96. You put the arrow on either side, but only on 1 side. A total of only 2 tiles is needed. In the game, the sprite will blink and show the arrow. I've slowed down the blinking, as it was way too fast, and may have caused vision issues to players?

    I've since learned that you can generate your own camoflage colours in GIMP:

    Last edited by novapaddy; 13-09-2011 at 09:50.
    U N D A U N T E D

  2. #2

  3. #3
    yesh now DH is setting up for Pdox domination muahhahaha
    Wannabe Quallity assurance tester for Pdox Interactive.

  4. #4
    Colonel Pasha's Avatar
    Darkest Hour

    Join Date
    May 2005
    Location
    Smyrna, GA ... Via Rhode Island
    Posts
    985
    Excellent tutorial! Thanks for posting. So does GIMP have a drag and drop function? I was thinking of experimenting and using the tank graphics from the old Steel Panthers Game and see how they'd look in DH.
    "Was your court at the trial of Visser constituted in any way like this, what rule did you shoot him under?"

    "Like this?? ... oh no sir, it was not quite like this... no no sir, it wasn't quite so handsome...and as for rules... we didn't carry military manuals around with us... we were out on the veldt fighting the Boer the way he fought us.... I'll tell you what rule we applied sir, we applied Rule Three-OH-Three .... we caught them and we shot them under Rule Three-OH-Three!!!!"

  5. #5
    SvenHassel: come death come! novapaddy's Avatar
    Diplomacy PlayerHoI AnthologyGalactic AssaulterNapoleonic MarshalDeus Vult!
    Europa Universalis: RomeFinder of the Lost EmpirePenumbra -  Black PlagueHearts of Iron 2: ArmageddonVictoria: Revolutions
    Europa Universalis III: In NomineEU3 CompleteRome: Vae VictisSupreme Ruler 2020Rome Gold
    East India CompanyHearts of Iron IIIMajesty 2Supreme Ruler 2020 GoldFor The Glory
    Arsenal of DemocracyHeir to the ThroneEast India Company CollectionRise of PrussiaAchtung Panzer
    Lead and GoldMount & Blade: WarbandLegioSemper FiElven Legacy Collection
    Victoria 2Commander: Conquest of the AmericasLionheartDivine WindShip Simulator Extremes
    Iron CrossMagickaCities in MotionEU3: ChroniclesSword of the Stars
    Darkest HourMajesty II CollectionCrusader Kings IIPirates of Black CoveMount & Blade: With Fire and Sword
    Pride of NationsFor the MotherlandSupreme Ruler: Cold WarSengokuSword of the Stars II
    Hearts of Iron III CollectionVictoria II: A House Divided

    Join Date
    Aug 2009
    Posts
    3,316
    Quote Originally Posted by Pasha View Post
    Excellent tutorial! Thanks for posting. So does GIMP have a drag and drop function? I was thinking of experimenting and using the tank graphics from the old Steel Panthers Game and see how they'd look in DH.
    No. You could try opening up the Steel Panthers file in GIMP, resize as necessary.. Then make up the 3 files in total, and then drop them into the necessary folders.
    Or even, just make up the 3 files, don't resize and try in-game to see how it looks (as it is).

    But you don't have to use GIMP, if you have photoshop, that may be better? With GIMP I can increase my viewing image to 800%, which is grand.

    Edit: for trying stuff out, I'd only make up one image file.

    Edit2: If you want to try something out very quickly: Just grab an image, 24-bit bitmap-it, name it T-L_PANZER C-GER A-STAND L-1.bmp... and paste it into the gfx/units/bmp folder... ensuring that you've made a copy of the original file first.. so you can put it back after... and fire up the game. You should see your image there, as all the files are there already in vanilla.
    Last edited by novapaddy; 02-09-2011 at 18:04.
    U N D A U N T E D

  6. #6
    Blue Danube KaiserMuffin's Avatar
    Darkest Hour

    Join Date
    Oct 2009
    Location
    Epsilon Eridani
    Posts
    4,056
    Sticky this!
    I ain't dead. Just slow.

  7. #7
    Second Lieutenant pheonix02's Avatar
    Napoleonic MarshalHearts of Iron 2: ArmageddonHearts of Iron IIIFor The GloryArsenal of Democracy
    Semper FiIron CrossDarkest HourFor the Motherland

    Join Date
    Jul 2008
    Location
    Laon -FRANCE
    Posts
    129
    How to conver CIV3 sprites to DH sprites?

  8. #8
    SvenHassel: come death come! novapaddy's Avatar
    Diplomacy PlayerHoI AnthologyGalactic AssaulterNapoleonic MarshalDeus Vult!
    Europa Universalis: RomeFinder of the Lost EmpirePenumbra -  Black PlagueHearts of Iron 2: ArmageddonVictoria: Revolutions
    Europa Universalis III: In NomineEU3 CompleteRome: Vae VictisSupreme Ruler 2020Rome Gold
    East India CompanyHearts of Iron IIIMajesty 2Supreme Ruler 2020 GoldFor The Glory
    Arsenal of DemocracyHeir to the ThroneEast India Company CollectionRise of PrussiaAchtung Panzer
    Lead and GoldMount & Blade: WarbandLegioSemper FiElven Legacy Collection
    Victoria 2Commander: Conquest of the AmericasLionheartDivine WindShip Simulator Extremes
    Iron CrossMagickaCities in MotionEU3: ChroniclesSword of the Stars
    Darkest HourMajesty II CollectionCrusader Kings IIPirates of Black CoveMount & Blade: With Fire and Sword
    Pride of NationsFor the MotherlandSupreme Ruler: Cold WarSengokuSword of the Stars II
    Hearts of Iron III CollectionVictoria II: A House Divided

    Join Date
    Aug 2009
    Posts
    3,316
    Quote Originally Posted by pheonix02 View Post
    How to conver CIV3 sprites to DH sprites?
    I think if you get your CIV image, change the background to green (as above), make the bit depth the same (24) and make the size the same, it shouldn't be a problem. Then you just create a new SPR file (by copying from another) and it should work?
    U N D A U N T E D

  9. #9
    Second Lieutenant pheonix02's Avatar
    Napoleonic MarshalHearts of Iron 2: ArmageddonHearts of Iron IIIFor The GloryArsenal of Democracy
    Semper FiIron CrossDarkest HourFor the Motherland

    Join Date
    Jul 2008
    Location
    Laon -FRANCE
    Posts
    129
    Is it possible to change sprite camo or colors with PSP7 ?

  10. #10
    Field Marshal Gukpa's Avatar
    EU3 CompleteDarkest Hour

    Join Date
    May 2011
    Location
    São Paulo,Brazil
    Posts
    3,274
    Epic

  11. #11
    SvenHassel: come death come! novapaddy's Avatar
    Diplomacy PlayerHoI AnthologyGalactic AssaulterNapoleonic MarshalDeus Vult!
    Europa Universalis: RomeFinder of the Lost EmpirePenumbra -  Black PlagueHearts of Iron 2: ArmageddonVictoria: Revolutions
    Europa Universalis III: In NomineEU3 CompleteRome: Vae VictisSupreme Ruler 2020Rome Gold
    East India CompanyHearts of Iron IIIMajesty 2Supreme Ruler 2020 GoldFor The Glory
    Arsenal of DemocracyHeir to the ThroneEast India Company CollectionRise of PrussiaAchtung Panzer
    Lead and GoldMount & Blade: WarbandLegioSemper FiElven Legacy Collection
    Victoria 2Commander: Conquest of the AmericasLionheartDivine WindShip Simulator Extremes
    Iron CrossMagickaCities in MotionEU3: ChroniclesSword of the Stars
    Darkest HourMajesty II CollectionCrusader Kings IIPirates of Black CoveMount & Blade: With Fire and Sword
    Pride of NationsFor the MotherlandSupreme Ruler: Cold WarSengokuSword of the Stars II
    Hearts of Iron III CollectionVictoria II: A House Divided

    Join Date
    Aug 2009
    Posts
    3,316
    Quote Originally Posted by pheonix02 View Post
    Is it possible to change sprite camo or colors with PSP7 ?
    Yes you can get camoflage to work as I did it in experiments completed at the time... The problem with these sprites was their "flatness" and showing the tank moving north-south, or from SE to NW, where you would be expected to show some "front" or "back" image. I mean, not a straight on side-view, but a top-down view showing perspective.
    U N D A U N T E D

  12. #12
    Darkest Hour Team & Lead GFX Inner Circle's Avatar
    HoI AnthologyDeus Vult!Penumbra -  Black PlagueHearts of Iron 2: ArmageddonVictoria: Revolutions
    EU3 CompleteRome: Vae VictisSupreme Ruler 2020Rome GoldHearts of Iron III
    Majesty 2Supreme Ruler 2020 GoldFor The GloryArsenal of DemocracyHeir to the Throne
    Achtung Panzer200k ClubLegioSemper FiVictoria 2
    LionheartDivine WindMagickaCities in MotionSword of the Stars
    Darkest HourCrusader Kings IISengokuHOI3: Their Finest HourMarch of the Eagles

    Join Date
    May 2007
    Location
    Germany
    Posts
    3,339
    Blog Entries
    3
    Quote Originally Posted by pheonix02 View Post
    How to conver CIV3 sprites to DH sprites?
    You need a tool called Flicster to open the Civ3 Sprite files and extract all animations. then you have to convert them from .pcx to .bmp

    DARKEST HOUR
    1914-1963 Grand Strategy Game By MartinBG


+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts