Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Blog Comments posted by Rick

  1. The lua object is just a reference to C++ object right? Couldn't the C++ Delete() function delete itself? It's been awhile since I've used C++ but you could do:

    class Entity{
      void Delete(Entity* e){
        e = nullptr;
      }
    }
    
    // whatever the smartpointer syntax is
    Entity* e = new Entity();
    
    e->Delete(e);

    per https://stackoverflow.com/questions/1208961/can-an-object-instance-null-out-the-this-pointer-to-itself-safely

    That way we have a standard interface of deleting objects between C++ and Lua.

  2. 1 hour ago, jen said:

    Class based approach is difficult to work with. Just look at the UE4 and CryEngine C++ manual, you'll get nowhere. You can always create your own classes.

    Classes are fine in any language, it's really just deep hierarchies you want to avoid. The age old composition vs inheritance. Composition can still be done with the idea of classes which basically every programmer knows and is comfortable using in 2018.

  3. Ha! Electron is the same as Node Webkit (nw.js) which is what I said some time back was the future of writing desktop apps and here it is. Major company using it to create their IDE. I knew that was the way to go. The web stack is just an easier way to get cross platform desktop apps with better UI's. Nice to see that idea taking off. 

  4. It can't tell that entity0 or entity1 are entities. Nothing can. One of the downfalls to typeless languages is the tooling can't help. This is why languages like TypeScript exist and sit on top of Javascript. For the tooling, because when you get into bigger projects it's helpful to have tools help you code and find bugs.

    Lua seems to have similar project to do the same thing: https://github.com/andremm/typedlua but it's dead and obviously wouldn't recommend it anyway as the flexibility of not being a typed language has it's benefits, especially in game dev. However, some form of autocomplete, as you'e done, is always possible it's just not what people have come to know as autocomplete in other typed languages. Since autocomplete will be an issue for every editor, it's the other things to look at for an editor.

  5. 1 hour ago, AggrorJorn said:

    That would also go for the debugger. If we had an api to Leadwerk we can add our own IDE's. I use Visual studio code for writing Lua but it lacks the debugging options. It is possible to extend the tool with a custom debugger but not without having access to leadwerks debugger functionality. 

    I have VS Code but haven't worked too much with it. It's crossplatform too isn't it? Do you like it? Honestly with it being newer and more lightweight I'm sure it's great and could probably be considered as a defacto editor for lua and LE.

  6. 1 hour ago, Josh said:

    Maybe it would make sense to build the editor into the engine and make it part of the API even? I have considered this.

    This is a possibility. Some engines do this. I don't personally like it because I believe with those engines you run the editor from Visual Studio which sort of kills the ease of use for newbies.

     

    1 hour ago, Josh said:

    Another thing to consider is someone might make a plugin that lets you visually create UI components.

    While this is for sure possible and I would love it, in my view UI elements for a game vs an editor of sorts are 2 completely different things and very hard to pull off to making them one. The editor you have and any add-on editor someone would create is simply easier, more efficient and more standard (more people will know it) to do with something like .NET or Java or even BMax like you did (although less ppl know that compared to the other 2 mentioned). However, like I was saying as long as there is a networked way to communicate with the LE editor then people can use whatever they want and feel comfortable with because all of those frameworks can make network connections to do that communication very easily.

  7. I'm going to shoot pie in the sky here since this seems like it's in the early stages. The editor, if I recall, uses ENET. Now to create these add-ons using the LE UI or our own custom built will be painful. Having limited controls available and having to type out the creation/positioning of any kind of complex UI is really unreasonable in 2018. So I think about why not let users use other tools to create these UI add-ons like .NET or Java or anything else they like (BMAX?). I think about the communication challenges with doing this. After all these add-ons would have to talk to the main LE editor to manipulate things and get information. So how about some kind of ENET communication system? Use TCP and create/document commands and their parameters for our UI add-ons to manipulate and communicate with the LE editor. This would really open the door to easier add-on creation and would create a nice API layer for the editor itself. Something that I'm sure will have unforeseen benefits down the line.

    • Like 1
  8. 5 hours ago, Josh said:

    Maybe some of it. I would stick to C++ right now.

    Man, I haven't used C++ in a long time. I'll just start with a single player with AI version of this first with the idea of adding these multiplayer AI later when the Lua API is available. All my helper libs I've created over the years are for Lua so it's just way easier for me to work in that.

  9. Quote

    I'm not sure if I want sound broadcast to be automatic, or if I want this to be a general-purpose sound recording API with an example that compresses the audio data and writes it to a packet.

    I would say do both! Some people like out of the box solutions and others like to get under the hood and modify things. You did this with the animations API (although it took you a year or so to decide on making an official API method for it) so same idea here.

    • Upvote 1

    Leadwerks 5 Beta Rollout

    59 minutes ago, tumira said:

    You guys forgetting about open source and free game engines. I think Godot 3.1 is going to be a killer engine(with updated 2D and 3D). There is also banshee game engine, atomic , lumix and etc. When leadwerks 5 is released I'm seriously going to compare which is better and I honestly kinda hate subscription based pricing. I'm not going to have any loyalty to any product or brand. I will switch and use which product that is suitable for me in terms of cost, features wise and etc.

     

    It ends up being more about your time. Eventually your time is limited due to other commitments and you want to be as productive as you can. Switching engines all the time limits your productivity while increasing your knowledge. It's a trade-off.

×
×
  • Create New...