Menu

Could this server control items in a map?

2001-05-18
2001-06-05
  • Douglas Fils

    Douglas Fils - 2001-05-18

    I downloaded and set up this quake server, and look forward to playing with/on it.  I love programming in python...  was thrilled to see this.

    However, I got to thinking, recalling the news months back about the mod to the doom client that spawned bots for PID's on host linux box/client.

    With the ease at setting up SOAP interfaces or running threads that would monitor server loads etc.  Is it possible in the framework of quake to make entities in a map that are moved to various states based on parameters the server reads.  Thus sharable by whomever is connected to the server.

    I made up a test map and some items and was going to start digging into this, and then I thought it would be a good idea to ask here first of people who might now the answer right off.

    Could for example, a server push a different texture onto a brush or set lights to on or off on a bank of walls? 

    Is it possible (and if so can you point me to references) to attach such events to the server.  Is it just quakec code (and as such in this case needs to be converted to python with the converter)

    I assume it would be since if a player turns a light on, it must be relayed to the others players that this light is now on.  It would seem then that the server itself could generate such an event/signal rather than another player.  This would be an example, I assume, of the issue of alterning a texture (or light map). 

    Can a person create an entitie, like a clock or meter like item than has various settings that could be set by a server?  This could even be a player model since it could be made to look like anything, not have to mave and alter it's "arms" or such to indicate an event or status.  (it need not look human of course).

    take care
    doug

     
    • Barry Pederson

      Barry Pederson - 2001-05-21

      > Is it possible in the framework of quake to make entities in a map that are
      > moved to various states based on parameters the server reads

      I believe so, unlike QuakeC, Python gamecode should be able to access just about any external resource (which is bad in a way, since it could a security problem).  So reading a file, or accessing a network socket should work. 

      I also tried to make sure multithreading would work (adding some Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS statements in the right place), so you should be able to create threads to handle accessing external data without blocking the game.

      > Could for example, a server push a different texture onto a brush or set lights
      > to on or off on a bank of walls?

      I don't believe the quakeworld engine or network protocols allow for texture changes for anything except player skins (correct me if I'm wrong).  I do believe that lights are a class of entity that can be turned on and off - but haven't fooled with that myself. 

      The qw engine/network code handles keeping all clients (players) updated on entity state changes (which would include lights).

      > Can a person create an entitie, like a clock or meter like item than has various
      > settings that could be set by a server?

      You have to be creative about that sort of thing, since the engine is so limited.  But for a clock I suppose you could have the face of the clock be a texture on the wall, and have the clock 'hand' be an entity placed right over the face, and just alter the entity's pitch to make it go around.  Each hand would take up one entity (of which I believe QW is limited to 768).

       
    • Barry Pederson

      Barry Pederson - 2001-05-21

      Oh yeah, you could do a bar graph by having a small brush (I hate that term)
      move up/down left/right whatever.

       
      • Douglas Fils

        Douglas Fils - 2001-05-21

        I hate the tern brush as well.  Not sure what its origin is.. assume there is a good reason

        Thanks for getting back to me!  I didn't want to start on this if there was an obvious road block I was not aware of. 

        It sounds like (at least to a first order) that there is not.  So I am going to explore this a bit, see if I can make some lights or perhaps brush or two respond to elements read by the server.

        thanks again...
        I'm sure I will post some more questions here from
        time to time.  :)
        ...and hopefully some updates on the effort too

        take care
        doug

         
    • Douglas Fils

      Douglas Fils - 2001-06-05

      Ok, I am doing a repl to my own post, but I thought I would just do an update.  Barry, gave me some ideas on how to start and I finally sat down and did some.  It's very easy to bring in information into the python quake world system. 

      For example, I can use engine.bprint(defs.PRINT_HIGH, dataString) of something like that.  It's easy to attach this into the engine with the advice Barry gave me. 

      The work here is known ground to me and I can clean it up with some nice threads and a SOAP interface

      The real key question, will be attaching not to something like bprint which is easy, but to an entity within the engine.  For example, a set of lights or some moving object. 

      Obviously entities have names, and actions can be done on them via this name.  The key will be to logically create entities (name spaces) that can be referenced and easily associted from the external code attached to the python quakeworld server. 

      After that, it woudl seem things would fall into place relatively easy. (famous last words!)  :)

      take care
      doug

       

Log in to post a comment.