Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Posts posted by Rick

  1. There are a few companies doing this same idea. NVidia has it's own game streaming service in beta right now. However they work with your games that you own. You give them your steam/ubisoft/epic/whatever launcher id/pw and they validate you have the game and then it'll launch in the cloud for you to stream play. The benefit is this is a better transition from where we are then Stadia is. Not to mention NVidia should be able to figure it out well given they can make custom gfx cards for this if they want.

  2. "My goal is place some boxes at the position of some pre-placed pivots"

     

    You stated a goal but I wonder if this is the entire goal really? Why do you want to great a global variable to store these in? To reach your goal just make a Box script and attach it to the pivots and inside it's Start() it makes a box at self.entity position. That would reach your goal.

  3. Yeah, I say we give it to the end of the weekend to have, even if it's buggy, a 3rd party camera on a wizard (even if stand-in) walking around a blank terrain (even if not ideal terrain) with an intro screen. It's something to build on.

  4. All that being said about how the process works for saving at an entity level vs a global level, if each map is kind of in isolation and shouldn't take long to do then are we really needing to save any map data like in your example of a bat or acid trap? I would think each map is just a fresh load everytime.

  5. I don't think that process uses SetKeyValue. It uses variables that are in the entity scripts. I think you mentioned that you were more on the C++ side than lua. In lua you can attach a script to an entity, and in that script you can define variables that are specific to that instance of that entity. Imagine if you created an instance of a C++ class and attached it to an LE entity. That class instance has variables and values for that specific entity. Then imagine that class had 2 virtual functions called SaveData() and LoadData(data). When you decide to save your game, every entity in the world at that time gets iterated over and it's SaveData() function called and inside there you return from it a structure of the data you want to save for that entity. When you load a saved file it loops through everything that you saved and if it was a dynamic object it'll create it from a prefab or if it already exists in the loaded map (via unqiue name) it'll call that entity scripts LoadData(data) passing in the exact same structure that was saved. That way that script knows exactly what it saves and so it knows exactly what to load.

    So think of entity scripts just like C++ classes that you can attach to LE entities. Same idea. The main difference is the structure you'd return in the SaveData() function because in C++ it has to either be string related or a common structure but you couldn't really have a common structure because each class could have different properties that you want to save. However in lua because it's a scripting language you can just return a table that is a different structure for each entity because it doesn't matter. It's just a table and that exact same table will be passed to that entity's LoadData(data) function. The entity already knows the table structure because it's the one that created it via SaveData() so it knows how to read it and what variables in it to set to it's entity variables.

    The reason this is nice is that the creator of the scripts themselves determine what values should be saved off instead of deciding that at some global level for every entity that exists.

     

    Example:

    So to use your example above. Let's say we have a bat in one of our levels. That bat model/entity is put in at design time in that map and a script is attached to it that gives it it's functionality. We give the entity a name like Bat1 in the map. We set a script variable that indicates it should have data saved and loaded in it's Start() function. So when we loop over all the entities on a save it'll check all their scripts for this value to decide if it should call it's SaveData() function. Let's say the bat has a health variable. So we hit the bat once and reduce it's value by 10. Let's say the health variable is now 90. Then we instantly press the save button. What happens when we do that?

    1. Loop over every entity in the world

    2. Check if it has a script attached to it and if it does check if it has a shouldSave variable and if it does and it's value is true...

    3. Call it's SaveData() function and take it's return value (which will be a table with whatever structure, we don't care at this point but it would have something like a health variable in it that we set from the scripts self.health variable) and save that to a bigger overall table where it's key is the entities unique name.

    4. Once all entities are finished that bigger overall table is saved to disk because it now has all the entities data that needed to be saved.

     

    Then we want to reload the map.

    1. The map is loaded.

    2. We read in the saved overall table from disk that has all entities saved information in it and loop over every entity in it

    3. For each entity name we find that entity that is loaded (because we loaded the map in step 1) and we call it's LoadData(data) passing in the same table it gave us via it's SaveData()

    4. Inside LoadData(data) we take data.health and set it to self.health (this bats health variable)

    5. Now all the entities have their script variables set to what they were when they were saved off.

    • Upvote 1
  6. Honestly I think we're just trying to actually get something out the door. No community project has really succeeded so the main goal I think should be succeed at all costs! Show that this can be done. If we don't finish anything then all the documentation in the world doens't matter. Nobody will play or look at an unfinished game. Step 1, finish the game, Step 2, release the game to the public. Step 3, worry about highly documentation and all that other stuff for people to learn from.

    • Like 1
    • Upvote 1
  7. Do we have anyone who can model a low poly wizard and animate it as well? I don't think it needs to be perfect or even really good honestly. With this style it can be pretty blocky. We just need something instead of trying for perfection.

    If he's going to have a wand he shoots thing out of I think some kind of wizard is ideal. From there as far as lore goes I'll let others think about that. I'm not a big lore guy myself.

  8. On the workshop I did have a Save/Load script. The idea is that you add 2 script functions for a script attached to an entity you want to save/load data for. SaveData() and LoadData(). In SaveData() you return a table structure that will be saved for that entity (unique names of entities acting as it's identifier). LoadData() has an argument which is that entities table that was returned from SaveData() so the entity itself determines it's own data structure to be saved and loaded. This helps remove any sort of global way of needing to save information.

     

    Here is a post I replied to recently about someone using it:

     

  9. Do you mean wand? You wrote ward. Just clarifying. If you think you can do the "heat seeking" of the magic following a moving target then I don't see anything wrong with that. It allows for future expanding by possibly adding different element types to shoot which could come in handy for puzzles. Ice to freeze things, fire to melt things, etc but getting the core mechanic first would be fine with me. Remember that everything we do isn't set in stone and can be changed or scrapped later if things don't fit.

    I like how we can sort of organically shape this game as we go.

×
×
  • Create New...