Creation/Dev/Releases/Client/4.04

From Graal Bible

Release Date

February 17th 2006 on Windows, Linux and Mac

New features

This new version fixes a lot of problems with particle effects, those are needed for the new spells on Graal Kingdoms. There are also several new functions for sounds and for the new scripting engine in general. In the options window on Windows you will find new options for light effects and similar, they are not the same like in v2 though - scripters must decide if they show the effects, by disabling those things in the options you are just specifying that you don't want to see those effects, it is not actually disabling them.

Crash fixes:

  • fixed a problem with crashing when someone is connecting from another server and having a statusicon which is not existing on the current server
  • fixed division by zero error when a tiled GuiBitmapCtrl has no image or the image has not been loaded yet
  • gani scripts cannot call destroy() on npcs anymore

Other fixes:

  • it is displaying an error now when the connection to the Graal 3D server timed out
  • it is using the particle size for clipping the particles (which fixes problems with huge particles)
  • particles are displayed even if the object is moving out of screen - this currently only works for moving npcs (e.g. spell missiles)
  • the 'continueaftedestroy' flag for particle emitters is also working on gmaps now
  • the showimg attachoffset variable is working correctly now
  • gani-ROTATEEFFECT is fixed on gmaps
  • weapon timeouts are executed before gani timeouts so that things like custom chat text display work better
  • terrain levels are not having gaps anymore
  • disabling UDP also disables microphone support
  • the font tempus sans itc is automatically installed
  • fixed the "&" character in urls retrieved with requestURL, it is also sending the host and client for better compatibility with web servers, also requestURL is working on Linux now
  • the script event "actionclientside" is cached now in case the destination weapon is not loaded yet
  • findplayer(accountname) is returning the client if both client and RC are online
  • Graal3D textures take less memory in the video RAM now
  • the game is not freezing when a mp3 or radio stream is starting

New/Improved:

  • script variables npc.isblocking, level.width, level.height, npc.npcsindex, player.playersindex, defaultfontname
  • npc.isblockingprojectiles flag for letting blocking npcs pass particles (not working for non-blocking npcs yet, which never block projectiles)
  • new script function findnpcbyid(id)
  • signs can be scrolled via mouse click
  • optimized levels/maps with many npcs
  • new options: lighteffectsenabled, weathereffectsenabled, particleeffectsenabled - those options don't change the engine itself though, they are only a help for scripters so they can enable/disable effects if possible; those variables are also accesible by the old scripting engine
  • script functions getMusicTags() (returns array) and getMusicStatus() (returns string) for knowing more about the currently played music
  • script event onMusicDataReceived(dataname,datavalue) for getting the title and artist of an internet stream (the stream server is sending this all few seconds)
  • playlooped2(soundfile,x,y,volume)
  • fixes the message bug on Graal Kingdoms
  • Added scripting functions:
    • getimgpixel(imagefile,x,y) - returns an array of {red,green,blue}
    • isimgpixeltransparent(imagefile,x,y)
    • isimgrectangletransparent(imagefile,x,y,width,height)

Sound examples:

//#CLIENTSIDE
function onCreated() {
  // Retrieve the playlist via http
  this.req = requestURL("http://www.shoutcast.com/sbin/shoutcast-playlist.pls?rn=3281&file=filename.pls");
  catchevent(this.req,"onReceiveData","onData");
}

function onData(obj) {
  // Got the playlist data: 
  // parse the returned data for a line like "File1=http://streamlocation"
  for (line: obj.data) {
    if (line.starts("File1=")) {
      // Play the real url
      play(line.substring(6));
      // Also start a timer to display the music info
      setTimer(0.1);
      break;
    }
  }
  this.req = NULL;
}

function onTimeout() {
  // Display the music data
  if (getMusicStatus()!="")
    echo("music status: " @ getMusicStatus());
  if (getMusicStatus()=="ok")
    echo("music info: " @ getMusicTags());
  else
    setTimer(0.1);
}

function onMusicDataReceived(dataname,datavalue) {
  // Music meta data is sent by the stream server
  // all few seconds, dataname is either ARTIST or TITLE
  echo("music data: " @ dataname @ " - " @ datavalue);
}

Revisions

Revision 2

March 3rd 2006

Fixes:

  • fixed a problem of non-stopping looping sounds
  • the option for not loading heads for the player list is working better now
  • better error message when the connection cannot be established (asks to check the internet cable & firewall)
  • fixed some controls which were still using the old red/gold profiles (GuiPopUpMenuCtrl needs to set scrollprofile)
  • fixed the code of several Gui controls which were producing division-by-zero errors in certain situations
  • re-added the file selection for scripted-RC (selectFileForUpload(), selectFileForDownload(string)), also displays the other drives now on Windows
  • fixed the file-upload (for scripted RC)
  • fixed again the timed-out error on Graal3D so that it displays the correct error and goes back to the login screen
  • fixed animating of gifs/mngs in Graal3D
  • fixed the logout from Graal3D, to fix relogin problems
  • fixed a problem with updating files with upper case letters (on Linux/Mac)

Additions:

  • new option 'Use a minimum of video resources' for using textures of smaller size; this option doesn't reduce the image quality, and doesn't change anything for newer cards (should only make a different with geforce2 or older)
  • new scripting function setSelectedByText(text) for GuiTextListCtrl, GuiPopUpMenuCtrl, GuiPopUpEditCtrl, and GuiContextMenuCtrl