Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Apr 2004

    handling Graphics in FatalForce game

    Has anyone take a look at the FatalForce code? How do they handle graphics? I see that all the pngs are stored in a single file, with all the other resources....What are they doing there with them? Are they loading the pictures and store them into an array, then use drawPixels? Do they use offscreen buffer?
    I don't wanna steal the code or anything, I would just like to understand it, and to learn the best approach for building such games.... Anyone has any suggestions or data on how to learn graphics handling the way Gameloft and Macrospace are doing in their games?


  2. #2
    Regular Contributor
    Join Date
    Mar 2003
    They probably have a simple application that takes images, sounds and game data, and bundles them together.

    When reading the data in the midlet they simply read the data into byte arrays and create images and sounds that way.

    // for an image
    Image i = Image.createImage(myImageDataArray);

    // for a midi
    Player p = Manager.createPlayer(new ByteArrayImputStream(myMidiDataArray), ...);

    Storing images in this way (packed together) makes them compress much better in the jar, saving you several kb.

Posting Permissions

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