Eulora August update

Friday, 16 August, Year 5 d.Tr. | Author: Mircea Popescu

There's a few juicy items on today's update. Let's get to it :


I. Client source package.

People have been asking, and in any case it's not nice to go for any length of time with binaries only, so here it is : Eulora client source.

Note that this isn't a fork or anything, merely a repackaging for the needs of this project, to be able to compile a client. If you are able to compile for your platform, whatever that platform may be, a note below letting us know is much appreciated. If you'd be interested in becoming a maintaineri of binaries for a certain platform this is also helpful, let us know.

Also anyone interested in working for S.MG as a coder is well advised to read through it, which of course brings us right up to


II. First coding task.

The Problem: Currently voice files are supplied by the server to go with NPC speech. For network loading and other issues the sound files should come from the client after the server sends a message identifying the right file.

The Task: Modify the client software (modehandler.cpp is likely involved) to accept a filename from the server and pass it to the soundsystem to be streamed.

Note: This may require some work with the soundsystem to ensure that large files are adequately handled. The soundsystem is based on using the crystalspace utilities to deal directly with drivers.

Extra References: 1, 2.

You are expected to deliver these as diffs, ideally as a comment here. As is the case with artists and anyone else working for S.MG, Stock Warrants and other compensation is always on the table. As is the tradition with S.MG since the first day, such discussion may only proceed after you've contributed something as requested and in no case before.


III. New map, water, teleporting etc.

eulora-16aug2013

Things be moving right along. See if you manage to find the teleport spot - first person to demonstrate itii gets a 0.1337 BTC bounty and the title of Eulora's First Easter Egg Hunter (EFEEH for short).


Finally for the curious, here's a peek inside the dev chat.

Dev Hang on a minute.
Me k

Dev Got it.
Me Aha! What was it ?

Dev Somethings are case sensitive, some aren't :P Well crap something with the fonts broke my terrain.
Me ;/

Dev I heard those spx files passed thru the game - chipmunks.
Me Huh ?

Dev What you were saying about how bad the sound was, it is - something is wrong with how they handle those files.
Me Oh! Heh. I like how this codebase always baloons problems. Such as, change letter t to r. Well... ok, it's changed but now the terrain is broken. Put a voice file in. There's voice files etc. Well ok, but it plays it 5x speed. It's like a troll package.

Dev Haha well I fixed the terrain and I have some clue on why it broke. Don't know about the spx but prolly something they did wrong with drivers. The font thing seems to be some of it is hardcoded and it got annoyed when I deleted the base font it used.
Me Ha! Terrain font ?

Dev ROFL. Anyway its all back like it was, will need to step thru changes carefully to sort it out. I was a bit jaw dropped when I saw a font hardcoded, need to study why they did that.
Me You know this snippet is totally getting published.

Dev LMAO. One suggestion on the boundry thing seems to be just port people back if they go too far out.
Me Not a bad idea.

———
  1. This would require your creating of a GPG key and registering it with gribble ; periodic compiling of source for your platform and releasing of GPG signed binaries through a platform of your choice (either a ftp server, http website, torrent or whatever else works). []
  2. To "demonstrate it" means to post a screenshot from a very specific position. You'll know it when you find it. []
Category: S.MG
Comments feed : RSS 2.0. Leave your own comment below, or send a trackback.

14 Responses

  1. David FRANCOIS`s avatar
    1
    David FRANCOIS 
    Friday, 16 August 2013

    looks like some include paths are hardcoded to /home/chetty/eulora/

  2. hmm shouldn't be. the arrangement of the crystalspace/cal3d/eulora at the same level is pretty much required tho.

  3. Mircea Popescu`s avatar
    3
    Mircea Popescu 
    Saturday, 17 August 2013

    Note : if you're havcing trouble connecting on the old client, get the v0.0.2.

  4. Ted Stanley`s avatar
    4
    Ted Stanley 
    Saturday, 17 August 2013

    Try the following diffs. The new MSGTYPE_PLAYVOICE is similar to MSGTYPE_PLAYSOUND, although its client handler has more in common with MSGTYPE_CACHEFILE.

    diff --git a/src/client/modehandler.cpp b/src/client/modehandler.cpp
    index 4a5a550..e17e0cf 100755
    --- a/src/client/modehandler.cpp
    +++ b/src/client/modehandler.cpp
    @@ -162,6 +162,7 @@ ModeHandler::~ModeHandler()
             msghandler->Unsubscribe(this,MSGTYPE_NEWSECTOR);
             msghandler->Unsubscribe(this,MSGTYPE_COMBATEVENT);
             msghandler->Unsubscribe(this,MSGTYPE_CACHEFILE);
    +        msghandler->Unsubscribe(this,MSGTYPE_PLAYVOICE);
         }
         if(randomgen)
             delete randomgen;
    @@ -177,6 +178,7 @@ bool ModeHandler::Initialize()
         msghandler->Subscribe(this,MSGTYPE_NEWSECTOR);
         msghandler->Subscribe(this,MSGTYPE_COMBATEVENT);
         msghandler->Subscribe(this,MSGTYPE_CACHEFILE);
    +    msghandler->Subscribe(this,MSGTYPE_PLAYVOICE);
    
         // Light levels
         if(!LoadLightingLevels())
    @@ -338,6 +340,10 @@ void ModeHandler::HandleMessage(MsgEntry* me)
             case MSGTYPE_CACHEFILE:
                 HandleCachedFile(me);
                 return;
    +
    +        case MSGTYPE_PLAYVOICE:
    +            HandleVoiceFile(me);
    +            return;
         }
     }
    
    @@ -2262,3 +2268,29 @@ void ModeHandler::HandleCachedFile(MsgEntry* me)
         }
     }
     //*******************************************
    +
    +void ModeHandler::HandleVoiceFile(MsgEntry* me)
    +{
    +    psPlayVoiceMessage msg(me);
    +
    +    if(!msg.valid)
    +    {
    +        csPrintf("Voice File Message received was not valid!\n");
    +        return;
    +    }
    +
    +    if(psengine->GetSoundManager()->GetSndCtrl(iSoundManager::VOICE_SNDCTRL)->GetToggle() == true)
    +    {
    +        if(!vfs->Exists(msg.fname))
    +        {
    +            csPrintf(">>Voice file '%s' does not exist.\n", msg.fname.GetDataSafe());
    +            return;
    +        }
    +
    +        csPrintf(">>Playing voice file '%s'.\n", msg.fname.GetData());
    +
    +        psengine->GetSoundManager()->PushQueueItem(iSoundManager::VOICE_QUEUE, msg.fname.GetData());
    +    }
    +}
    +
    +//*******************************************
    diff --git a/src/client/modehandler.h b/src/client/modehandler.h
    index 9382ba2..9f8cb50 100755
    --- a/src/client/modehandler.h
    +++ b/src/client/modehandler.h
    @@ -192,6 +192,7 @@ protected:
         void HandleNewSectorMessage(MsgEntry* me);
         void HandleCombatEvent(MsgEntry* me);
     	void HandleCachedFile(MsgEntry* me);
    +    void HandleVoiceFile(MsgEntry* me);
    
         bool ProcessLighting(LightingSetting *color, float pct);
         LightingSetting *FindLight(LightingSetting *light,int which);
    diff --git a/src/common/net/messages.cpp b/src/common/net/messages.cpp
    index 792efb4..504c900 100755
    --- a/src/common/net/messages.cpp
    +++ b/src/common/net/messages.cpp
    @@ -7998,6 +7998,31 @@ csString psPlaySoundMessage::ToString(NetBase::AccessPointers* /*accessPointers*
    
     //-----------------------------------------------------------------------------
    
    +PSF_IMPLEMENT_MSG_FACTORY(psPlayVoiceMessage, MSGTYPE_PLAYVOICE);
    +
    +psPlayVoiceMessage::psPlayVoiceMessage(uint32_t clientnum, csString fname)
    +{
    +    msg.AttachNew(new MsgEntry(fname.Length()+1));
    +    msg->SetType(MSGTYPE_PLAYVOICE);
    +    msg->clientnum = clientnum;
    +    msg->Add(fname);
    +    valid=!(msg->overrun);
    +}
    +
    +psPlayVoiceMessage::psPlayVoiceMessage(MsgEntry* msg)
    +{
    +    fname = msg->GetStr();
    +    valid=!(msg->overrun);
    +}
    +
    +csString psPlayVoiceMessage::ToString(NetBase::AccessPointers* /*accessPointers*/)
    +{
    +    csString msgtext("Message Voice File:");
    +    return msgtext+fname;
    +}
    +
    +//-----------------------------------------------------------------------------
    +
     PSF_IMPLEMENT_MSG_FACTORY(psCharCreateCPMessage,MSGTYPE_CHAR_CREATE_CP);
    
     psCharCreateCPMessage::psCharCreateCPMessage( uint32_t client, int32_t rID, int32_t CPVal )
    diff --git a/src/common/net/messages.h b/src/common/net/messages.h
    index 675189a..9d33d8b 100755
    --- a/src/common/net/messages.h
    +++ b/src/common/net/messages.h
    @@ -168,6 +168,7 @@ enum MSG_TYPES
         MSGTYPE_QUESTIONCANCEL,
         MSGTYPE_GUILDMOTDSET,
         MSGTYPE_PLAYSOUND,
    +    MSGTYPE_PLAYVOICE,
         MSGTYPE_CHARACTERDETAILS,
         MSGTYPE_CHARDETAILSREQUEST,
         MSGTYPE_CHARDESCUPDATE,
    @@ -5682,6 +5683,29 @@ public:
    
     //-----------------------------------------------------------------------------
    
    +/** This message is used to tell the client to play a voice file.
    + *
    + */
    +class psPlayVoiceMessage : public psMessageCracker
    +{
    +public:
    +    csString fname;
    +
    +    psPlayVoiceMessage(uint32_t client, csString fname);
    +    psPlayVoiceMessage(MsgEntry* message);
    +
    +    PSF_DECLARE_MSG_FACTORY();
    +    /**
    +     *  Converts the message into human readable string.
    +     *
    +     * @param accessPointers A struct to a number of access pointers.
    +     * @return Return a human readable string for the message.
    +     */
    +    virtual csString ToString(NetBase::AccessPointers* accessPointers);
    +};
    +
    +//-----------------------------------------------------------------------------
    +
     /** The message sent from client to server to request a cp value for
      *  creation.
      */
  5. Ted Stanley`s avatar
    5
    Ted Stanley 
    Saturday, 17 August 2013

    It seems that all of the indentation got lost in the previous comment.

  6. Mircea Popescu`s avatar
    6
    Mircea Popescu 
    Saturday, 17 August 2013

    Meh Wordpress makes assumptions. Let me see if I can fix this one second.

  7. Mircea Popescu`s avatar
    7
    Mircea Popescu 
    Saturday, 17 August 2013

    There, it's fixed. Use <pre> tags to maintain indentation.

  8. Thanks Ted I'll try those out today/tomorrow and let you know :)
    Much appreciated !

  9. David FRANCOIS`s avatar
    9
    David FRANCOIS 
    Monday, 19 August 2013

    Do you plan on keeping the github repo up to date, and accept PRs?
    Did you fix the paths issue ?
    (I assume compiling is simply jam clean && jam)

  10. actually you run autogen first, that sets up the paths for your system in the jam and config files. then config (--with path to cal3d). Yes github will be included in the release process.

  11. Mircea Popescu`s avatar
    11
    Mircea Popescu 
    Tuesday, 20 August 2013

    @David FRANCOIS The github is just for packaging convenience, not a fork and not maintained in that sense. PRs should be directed at the respective teams maintaining the various bits involved.

  12. Downloaded from github, installed jam, tried compiling (Fedora 19, x64 platform): http://pastebin.com/fTFNNrYS . No idea what I'm looking at.

    At a first glance, there are indeed some hardcoded paths in your files, for instance in Jamconfig, lines 59 60 61 etc (about 9 instances).

  13. The jam and config files get updated when you run autogen. They setup to run on your system.

  14. Assuming you have already acquired and installed both Cal3d and Crystalspace (libraries from these are needed until such time as we start to produce a static client). Set environment variable to point at crystalspace directories.
    compile and install the source files with:
    ,.autogen.sh
    ./configure --with (path to your cal3d install)
    [I recommend you set the cal3d/crystalspace/eulora at the same dir level but its not required)
    jam -aq client

    This should end with a working copy of the current client, you will need to get a copy of the art file from the server.
    We are currently working on a updater so that once you have a client we can scan and pass only the files you need.

Add your cents! »
    If this is your first comment, it will wait to be approved. This usually takes a few hours. Subsequent comments are not delayed.