Jump to content

Rick

Members
  • Posts

    7,936
  • Joined

  • Last visited

Everything posted by Rick

  1. 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.
  2. 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.
  3. 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. 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.
  4. 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.
  5. I think our wires are crossed. I'm not saying the user would have to write in 2 different programming languages. My mention of C# was simply "you" (creator of the toolkit) using it to create a UI to help configure things specific to a TD game. Likewise if someone made an RPG toolkit. Would be nice for the users to have a UI to create quests vs having do it directly in lua code or some text editor. That's the line of thought I was with this. The user doesn't code in anything newer. The idea being it's even easier for the user because they don't have to code that part of the game. Why have users code towers or enemies when you could provide a dialog that allows configuration of those things with point and click. Most enemies, for example, are basically the same with a different model, speed, health, armor, etc. All of this is just configuration stuff that is just nice to have an "editor" for. The users would simply use the UI. That's not another programming language for them to learn.
  6. The examples seem to start with a file extension launching custom dialogs. Will there be a way to add menu items to launch dialogs?
  7. I looked at this for a few mins the other day, since I made the original post, and since that original file isn't in the post (is it anywhere? I can't find it on my side) someone would have to create this DLL again. Once that's done it's really easy to work with if you have sql experience. Using a database is generally just easier (once it's setup) if you're doing a lot of querying, updating, & inserting but this sounds like you just need a config file that has a nice editor. I have a json library I got from somewhere that turns lua tables into json and the other way around too, plus I know there are a bunch of json editors out there that give a nice tool for visually working with that data. Perhaps that would be helpful?
  8. That was meant for LE 4.x that doesn't have a plugin system. With LE 5's plugin system then this dialog can exist within the LE editor. This wouldn't introduce really introduce a different programming environment really. The C# was just an easy way to create some dialogs that ultimately result in config files the lua code would read from the editor, but again, it was meant for LE 4.x that doesn't have the plugin system. Without the plugin system it's fairly hard to create a good editor that allows the creation of towers/enemies/etc. I only say this because in Unity I noticed someone basically did this for a TD toolkit but Unity has the ability to have plugin editors so it was all streamlined in the editor.
  9. In that specific example you might want to think about reversing the flow. Have script2 call script1's IncreaseHealth(10) so that script1 can just increase it's health variable vs the reverse way you have it. The object that owns the variable should really be the thing that controls it directly (encapsulation those variables in the object instead of exposing them for others to change). Functions can be created on that object that other things can call if they want to ultimately manipulate it. Think of these functions as the API to said object. You'll generally have less confusion and easier debugging if said variable is only ever changed in 1 spot (the object member function) vs exposed all over the place being changed by who knows what. I know what you have is just an example an maybe you have some bigger system behind the scenes here but all I can go off is the example and seeing that example I'd reverse how you're doing it.
  10. Yeah, see he's saying in script 2's function he doesn't know the name of the variable in script 1. To build off Aggror's here's a way to do it by wrapping all primitives in a table. If plugged into here you can see it work: https://www.lua.org/cgi-bin/demo You can do a set/get idea which might make it more readable and understandable Variable = {} function Variable:create(value) local obj = {} obj.value = value for k,v in pairs(Variable) do obj[k] = v end return obj end function Variable:set(value) self.value = value end function Variable:get() return self.value end function ChangeMe(v) v:set(20) end local v1 = Variable:create(10) print(v1:get()) ChangeMe(v1) print(v1:get()) I'll see if there is a way to not have to say .value. You might be able to just make v = 20 and have it translate to v.value somehow with meta stuff lua has. That way it would simulate like it's a primitive value instead of a table.
  11. I think he's saying he doesn't know what the variable name of the object actually is while inside the function that changes it so he can't hardcode that in the function that's changing the variable. To me it seems like he's asking how to pass primitive variables by reference (or a pointer to them) so when the value is changed it's seen outside of the function call. Josh, the example you have I'm not following. Where is CallingWithArgument() defined? How is doing caller.rootVariable = 20 changing script 1's myVariable? OP: Tables are passed by reference but primitives aren't. The deeper question is why are you thinking you need this? Perhaps there is a different way that isn't so hacky or confusing to anyone reading your code.
  12. Also, when I say 'editor' I don't really even mean visual map editor. There are a lot of editors for various parts of a game that help make the game easier to extend and customize that don't have anything to do with the visual map and I think can be done today in LE 4. For TD think about how waves are defined. Having a desktop app to define waves that ultimately writes to a config file (or hell even a runable lua file) would be very handy. Then you take said output and attach it to an entity via some editor properties and your TD game code processes said config file.
  13. Yeah, I do agree that templates are good. I still think going 1 step beyond and making the templates paid add-on's would bring in more consistent revenue. These templates wouldn't JUST be code/gfx but also helper dialogs for configuration of some systems specific for the template (think quest creation for RPG template) and such (full template source code also included though). Sort of like a game builder template add-on that still uses LE at it's core. This would of course require some kind of editor plugin for said editors and a more flexible map file format but it would probably grab more people's attention at the storefront. Leadewerks RPG Builder, Leadwerks FPS Builder, Leadwers Racing Builder, etc. I think most newbies have an idea of a game type they want to make and having a little leg up but knowing you can grow with it I think is attractive. Maybe you can look into that idea as it would become more of a solid product for you. Make a Tower Defense Builder system that has some editors to visually create towers, enemies, upgrades, etc (I think you know C# right so should be easy to create such UIs) but still provide the main source that drives the TD game itself.
  14. From my perspective I have no idea where this community is. There are a handful of people who post regularly and ton of people who sit on the sidelines that we hear nothing from. Because of this it's so hard to judge what people are looking for and you are always left feeling like you're not making that big of an impact which is demoralizing to continue. If the goal is to try and reach the most people then a FPS would be the thing to do. I get from our perspective it's boring because we've done it a million times but if it's what most people want and you're trying to reach most people then a FPS is best. Now, Josh has his project which is sort of doing that as well. That's more of a true shooter so perhaps a more survival/horror type game is best as those are pretty popular still and the easier to create from a technical standpoint. Have a flashlight, open doors, collect items, etc. It's fairy simple to do. For sure Lua! Having functions as first class citizens which supports closures, and coroutines, it's the best tool for creating gameplay by far. C++ is great for the core engine but it sucks for creating gameplay features because it's just not flexible enough and making it flexible enough is a pain. Lua has made C++ flexible if you think about it that way. Lua is the answer in making C++ less rigid and more usable for gameplay code. I personally don't think there is enough of an active community here to make a kickstarter for something like this viable. People are more willing to support "official" things than community based things. You could prove me wrong but my gut tells me there just isn't enough active people in the community to get much more than $200 or so (given Josh doesn't give a bunch). That development process you're describing is a TON of work! Creating the game alone is a ton of work, much less writing up tutorials and making videos of the process. You might be better off planning up front the core elements/structures of the gameplay and then recording shorter videos as you do those parts. So you'd just be doing things twice because you'd want to do a segment/system on your own first to flesh it out, then remove it and basically record yourself doing it again but because you've fleshed it out the time it takes to record it would be a few mins and people don't have to see the parts where you may have misspelled a variable or whatever which add time to a video but no value. When we stop to think about a finished game we often think of them as the systems they have and systems can be abstracted to higher level ideas. That's what you'd really want to drive home in the videos I think. Here's a flashlight system, here's a UI system, here's a movement system, here's a pickup system, an inventory system, etc. Try to compartmentalize those things are much as possible in your code so that it's easy to segregate them when teaching it.
  15. Rick

    steam id

    Are we able to call GetAuthSessionTicket() from LE (lua)? I don't see any docs about it but this looks like where the process needs to start. I can then send the session ticket to my server to call the API on and validate the user.
  16. Rick

    steam id

    Is there a steam ID we're able to get to uniquely ID people? I assume there is but how is it promised to be the currently logged in Steam user instead of someone spoofing it? There are multiplayer games through Steam that don't require a logon and I'm curious how that process works and if we have access to it in our own system?
  17. Nvm, found a good answer here that works: https://stackoverflow.com/questions/24751648/how-to-save-to-and-from-clipboard-in-lua-windows I load it with: -- load the clipboard library assert(package.loadlib("clipboard.dll", "luaopen_clipboard"))()
  18. Did anyone happen to save off @beo6 library he linked to above? It doesn't work anymore and I'm trying to get clipboard functionality on windows to work.
  19. Was calling web api's ever exposed to us from LE? I think I recall Josh calling some web api's from Steam but did we ever get an interface to the core of that so we can call any restful web api we want? Or, has anyone done this in Lua yet? Curious how to get that working in lua in a non-blocking way.
  20. 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.
  21. Is this available in Lua?
  22. Rick

    Lobbies

    Are all the networking commands exposed to Lua?
  23. Same. I just got home, switched to the beta and nothing happened. No downloading.
  24. Nice game. I didn't read anything about it before hand and I wasn't expecting that so it caught me off guard and took a little bit to catch my bearings but after awhile I got it figured out
  25. I have an idea on trying my old GvB game. Should be reasonable and fairly simple since it’s turned based. Seems like forever since I worked on that and I’ve learned a few tricks since then so really excited to give it a try with this new multiplayer support. http://good-vs-bad.blogspot.com/?m=1
×
×
  • Create New...