Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: Notes for the WME 1.1.037 release  (Read 3892 times)

0 Members and 1 Guest are viewing this topic.

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Notes for the WME 1.1.037 release
« on: November 17, 2003, 10:18:08 AM »

Notes for the WME 1.1.037


JPG support

While using JPG files for your background images can significantly reduce the size of your game, this format is NOT suitable for sprites and generally any graphics with transparent areas. Due to the lossy compression those solid transparent areas get distorted and do not work as transparent anymore.



How to use thumbnails for saved games

First off, you have to enable thumbnails in ProjectMan. You do it by filling in the thumbnail dimensions in project properties in the "Saved games" section. There are two properties, "Thumbnail width" and "Thumbnail height". If as least one of those properties is set to zero, thumbnails are disabled. Otherwise WME will automatically save a thumbnails with the saved game.
Secondly you need to display the thumbnail somewhere. It's dependant on the design of your interface windows, but generally you reference the thumbnail image as an ordinary image file, using the following filename:

"savegame:0" ... where 0 is the number of a save slot whose thumbnail you want to load. You can use this filename convention anywhere you'd normally use filename like "path\file.bmp".

The WME demo uses the following approach: The save and load windows contain an empty static control, and once the player selects a used save slot, the scripts calls something like this:

Code: [Select]
 if(Game.IsSaveSlotUsed(SelectedSlot)) Thumbnail.SetImage("savegame:" + SelectedSlot);
  else Thumbnail.SetImage(null);

As you can see, it uses the filename conventipon described above to load an appropriate thumbnail from a selected save slot. See the "load.script" and "save.script" files in WME demo for details.



Fonts generated using the FONText utility

If you are using the excellent FONText utility for creating fonts for a WME game, you'll have to add one extra attribute to your font definition file.

Example:

FONT
{
  IMAGE = "fonts\image_name.tga"
  COLUMNS = 16
  TILE_WIDTH = 24
  TILE_HEIGHT = 24
  AUTO_WIDTH = TRUE
  FONTEXT_FIX = TRUE
  EXPAND_WIDTH = 1
}

The problem is the FONText utility excludes the sapce character from the font image, while WME expects to find it. The FONTEXT_FIX = TRUE attribute will tell WME the font image doesn't contain space.
« Last Edit: November 17, 2003, 10:25:27 AM by Mnemonic »
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
Re:Notes for the WME 1.1.037 release
« Reply #1 on: November 17, 2003, 11:23:47 AM »

Sorry for highjacking this thread but I thought that there was no reason to start a new one.

Quote
- Support for thumbnails for saved games

Can I ask for a tiny little dreams specific feature?
I'd like to be able to have grayscale images in the saved games although my project is not grayscale.

Quote
 - New window.LoadFromFile() method for dynamic changing of window contents

It's not really important but if you check the docs you will find this sentence " A filename of a wiondow file to be loaded."
Logged
fl*p

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:Notes for the WME 1.1.037 release
« Reply #2 on: November 17, 2003, 02:23:57 PM »

Can I ask for a tiny little dreams specific feature?
I'd like to be able to have grayscale images in the saved games although my project is not grayscale.

Believe it or not, but I was thinking about it. It would be useful even for other things that Dreams, like having the thumbnail b&w and making it color when the mouse is over it. But I'm not sure how to make it work; I'll probably expand the "savegame:0" convention to something like "savegame:0,g" to return the thumbnail in grayscale. It's a little dumb, but since it won't be used often...


Quote
 - New window.LoadFromFile() method for dynamic changing of window contents

It's not really important but if you check the docs you will find this sentence " A filename of a wiondow file to be loaded."

Oh yeah, thanks. There are probably hundreds of misspellings in the docs :(
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.048 seconds with 24 queries.