Day-To-Day Work Logs and Woot! Engine Stuff!

Discussion in 'Clockwork Empires General' started by Nicholas, Sep 19, 2012.

  1. MOOMANiBE

    MOOMANiBE Ah, those were the days. Staff Member

    ERROR
    AUTHOR NOT FOUND
    LOAD DEFAULTAUTHOR==NICHOLAS
     
    Kazeto likes this.
  2. Daniel

    Daniel CEO Staff Member

    Hey now, the one before that was me too! What's going on here?
     
  3. Alistaire

    Alistaire Member

    Wait a second. Lua? Lua! LUUUAAAAA!!!!
     
  4. MOOMANiBE

    MOOMANiBE Ah, those were the days. Staff Member

    What do you mean, ##NICHOLAS ?
     
  5. Nicholas

    Nicholas Technology Director Staff Member

  6. Nadd

    Nadd Member

    Fog is great for mood-setting, but how can it be exploited for industry?
     
  7. Wootah

    Wootah Member

    'fog with cactus' screenshot is interesting. It looks as though the fog level doesn't extend all the way to the top of the cactus.... Which is cool. Because the best kind of fog (for gaming) is also the eerie kind of fog. I used to live in a low level area of wetlands, and at night these batches of fog would come in at different levels. And driving down long stretches of it was amazing! You would sometimes go through a patch that was only an ankle high, other times you would hit stuff that was a thin layer between chest and head height, and other times it would be waste up, making you almost wish you were crawling along beneath it so you could see if you were gonna hit something.

    Is the fog programmed here to float at random heights and thickness?
     
  8. Nicholas

    Nicholas Technology Director Staff Member

    It's ground fog, so it has a defined "top" height and density. Distance-based fog doesn't make much sense in a game without distance (i.e. an isometric perspective)
     
  9. Createx

    Createx Member

    I have no idea whatsoever of this coding stuff, but does the transition of the game logic to Lua make the game quite a bit easier to mod, especially the core bits?
     
  10. Alistaire

    Alistaire Member


    Lua is a bit slower and has some flaws. Other than that, it's a significant amount easier to understand and learn for complete noobs. C++ will take you a considerably longer time.
     
    mining and Createx like this.
  11. Createx

    Createx Member

    The most Lua applications I've read of are programming game modes for mods and similar things, nothing too complex, that's why i was asking. Thanks for the clarification :)
     
  12. mining

    mining Member

    The nice thing is that LUA can call an object file (.o or .so or probably .dll though I'm not sure on which of .o or .dll it is) so you'll have it on hand if needed. [though I'm not THAT familiar with LUA, so correct me if I'm wrong]
     
  13. Nicholas

    Nicholas Technology Director Staff Member

    Since Triolo isn't here, I will mention that today's new blog post is about DIRT and FILING:

    http://www.gaslampgames.com/2013/01/23/dispatch-from-the-ministry-of-art-direction/

    For those wondering about the Lua stuff, we ended up gluing it to our internal object message-passing system and it turned out to be A Good Thing after all. Essentially, each type of game object gets a .go file (to confuse everybody's text editor into thinking we're using Google Go), which consists of a small pile of Lua scripts and a handful of Exciting Information about State And Stuff. Events will likely be rolled into some other file that combines a Lua script and game-specific mockups. It seems to be pretty good so far! We'll keep you posted, maybe in a future blog post.
     
  14. EleSigma

    EleSigma Member

    I can't believe I read the entire blog post. I do feel oddly more intelligent and organized though.
     
    Kazeto likes this.
  15. Wootah

    Wootah Member

    Not being a programmer I am quite happy about the recent blog post. But I get a feeling that Nicholas very short explanation of what they are doing with Lua is a kick to the gonads for the people who were excited to hear all the details about it. Maybe I am mistaken and it is enough, but even I was planning on reading the Lua Update with some anticipation, and I know nothing about it.
     
  16. Nicholas

    Nicholas Technology Director Staff Member

    I'm pretty sure you're just being difficult at this point. :)

    Everything basically fits into a .go file, which stands for "game object." There's a list of received messages, a collection of state variables for the object, and then the actual received message types. (Create, Update, etc.)

    For instance, here is a couple of messages that you might expect from a mineshaft (still being worked on):

    Code:
    receive Create()
    <<
        gridPosition.x = 100
        gridPosition.y = 100
        name, renderHandle, error = query("rendStaticPropClassHandler", "odinRendererCreateStaticPropRequest", SELF, "models//environment//placeHolders//grinderPh.upm", 100,100);
        send("rendInteractiveObjectClassHandler", "odinRendererAddInteractions", renderHandle, "Mine", "Mine");
    >>
     
    receive InteractiveMessage( string messagereceived )
    <<
        print ("Message Received: " .. messagereceived );
        if messagereceived == "Mine" then
            send( "gameCitizenRequestBlackboard", "gameObjectNewJobByNameMessage", SELF, "Mine" )
        end
    >>
    
    Basically, everything still communicates by message passing - a character sends a message to another character saying that he's been shot, that sort of thing. This will look very familiar to you if you have ever played with, say, Megazeux. (Or Erlang.) FSMs are now also being done in Lua, and they just consist of a table with a list of states which are functions, and each one can then throw the next state that it goes to and so on and so forth.

    There will be a third Lua event primitive for events ("Lord Palmerstoke has commanded that you store his collection of Research Bees. What could be possibly go wrong?") and probably other files for things like Megaprojects, that sort of stuff. But this is the general direction things are going in. I'll ask Micah if he wants to drop by and talk about it.

    EDIT: It is worth noting that this is how this works *today*. This is probably not how it will look by the time we are done, and it is not clear what Lua (if any) fits into the mod system, and what will actually be moddable. Details have not been finalized, and requests for features will be ignored. :)
     
  17. Alistaire

    Alistaire Member

    You'll print out each and every request and put them in the cylindrical storage under the desk?
     
    Kazeto likes this.
  18. Nicholas

    Nicholas Technology Director Staff Member

    No, we give them to Sean for his guinea pig's cage.
     
    Turbo164 and Kazeto like this.
  19. Wootah

    Wootah Member

    So do your citizens have have the capability to reject incoming messages? For example if they have some other state assigned to them? What about forcing priority? Would the capability to tell them to ignore or place some command at low priority if they have some other state (such as a fear of darkness, or belief in haunted mines) be included in the mod?
     
  20. Nicholas

    Nicholas Technology Director Staff Member

    Messages are purely internal constructs and are never affected by jobs or whatever. For instance, you would never want a citizen to stop responding to grid request messages because, then, something waiting for a grid request from a citizen would never get it and would just keep hanging out doing nothing.

    What you're talking about is the job selection stuff, and I imagine there will be ways to whitelist or blacklist that based on various things. right now it's just occupation but I can easily imagine people getting traits which either whitelist, or blacklist, jobs - or at least slant the utility functions.
     
    mining and Kazeto like this.