Jump to content

AggrorJorn

Members
  • Posts

    4,816
  • Joined

  • Last visited

Everything posted by AggrorJorn

  1. I use this one as a base for Lua support: https://marketplace.visualstudio.com/items?itemName=trixnz.vscode-lua it covers all the native lua functions and syntax. Custom objects/functions are not as complete as with C#/C++, but it helps out a lot:
  2. Some advantages that make it my default text editor next to notepad++ Comes with various default styles, but can be completely styled to ones desire. Supports many languages. Lua support via plugins. Lightweight Crossplatform You can attach your own debugger code via debugger extensions. My favorite: can be easily extended with custom plugins. I could make this little leadwerks plugin that looks at the online documentation and shows it in the second screen. It could actually load in the entire Leadwerks api from here and display it for you. You can even extend the intellisense using your own documentation Something like this: https://github.com/Microsoft/vscode-extension-samples/tree/master/contentprovider-sample it can automatically install a lua intellisense plugin as a dependency. You can import all keyboard shortcuts from visual studio if you want I ahve got dozens of little snippets already made this way: For instance type: lestart followed by 2 tabs and you get: function Script:Start() end
  3. 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.
  4. Ah I see what you mean now. Yes, that would certainly be a good option. Making a really basic tower defense toolkit is great but I would not spend any time on an external editor for an LE 4.x project right now. Knowing what we will be able to do with LE5 plugins, that just seems counterproductive.
  5. Ahhhh custom menu items . I have been looking forward to this for so many years. Can't wait to get my hand on this.
  6. My answer was about 4.x. For us it would be a walk in the park, but imagine a user with no prior developing experience. introducing 2 programming languages + leadwerks is just overkill. I think writing a program that is not build with Leadwerks/Lua is only a distraction. But again: I think you want to make it far too complex. This is just a basic game with a few tower, a few enemy types and some basic wave options.The complexity level is really doable with just a lua file or even an editor script.
  7. Have you tried http://lua.sqlite.org/index.cgi/index ?
  8. I think you are making it way to complex for a user. Sure, if you are going to go and make a full fledged game, you could make your own tool. But introducing a development environment outside of Leadwerks? Way too much information for a user to process.You are going to introduce a completely different programming environment (in this case something like C#/mono gui). People are going to get enough information as it is using the Leadwerks system and the accompanied IDE.
  9. Would that also allow us to add items to the scene tree programmatically?
  10. Ah plugins: after all those years what I am most curious about is how Leadwerks will deal with plugins. Many users have requested this and it will finally happen. In the Leadwerks 5 forum section (backers only) there is a small discussion thread about it. Extending the editor would benefit the community a lot I think. The tower defense builder system was done by someone else quite some time ago actually. I think an entire program is a little too big for this project. I just want to see first if there is enough interested for a small tower defense game. That doesn't mean you idea is bad btw. I know you have mentioned these 'builder' extensions before and they can be really great to use. But also massive to build and maintain. It will all depend on how extendable the le5 is going to be. Using a custom 'editor' would be easily made though. But depends a little on what of type tower defense is made. For instance if you make a grid based map, then using a simple text editor is already enough for a basic map. [0,0,0,0,0,0] [0,0,0,1,0,0] [0,0,1,1,0,0] [0,2,0,0,1,0] [0,0,0,0,0,0] Another way is using fixed points on the map where you can build. This allows more custom maps were a designer has to put more work in finetuning available build spots. Both options are cool implementations to make. When this discussion gets enough input for me to go on, I will ask my friend to start making 3 towers and some environment props. They are going to be in the same lowpoly style throughout the game. This makes it easier to get a complete model set for a cheaper price. These models will be made either way. Just the amount would differ.
  11. Interesting questions. I don't know if there is a variable in existence that gets you the callers 'self'. But maybe there is something hidden in the lua meta tables that can do this. As for getting the root there are probably neat little tricks you can do here, but not without the use of tables. Maybe this way: --variable is a table Script.myVar = { ["root"] = self, ["value"] = 10 } Function Script:Test1() self:Test2(self.myVar) end Function Script:Test2(myVar) myVar.root myVar.value end Or make a new class object called Variable were you store the above table in. There are probably prettier ways, but I never dug that deep in to lua meta tables.
  12. At the moment there is very little community activity in the forum. I think most people sit on the side line or are just waiting for LE5 to come out. I think that is why kickstarter 'might' be a solution in this scenario. If there is no interest I will simply move on with my own little projects. But it is also a repetitive circle: no tutorials because there is no activity vs no activity because there are no tutorials. Tutorial about the game can always be additional. Having a complete game template would be a nice start. "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." I understand what you mean and you make a good point. There are also downsides on other approach. I experienced this first hand with Project Saturn when trying to record on the fly or sometimes with just a little experimenting ahead of the recording. Recording on the fly or with just a little bit of planning causes silly mistakes that are fixed only videos later while people complain in the comments that something is not working. Sometimes you write code to show of that first part that you have working on, but at a later stage you removed those parts again, because it is clutter or simply because you have a newer, better system. Both approaches have their ups and downs. I haven't tried the approach yet where the game has been completed before starting the documentation. That is why, after development I would have users give me feedback on the game. ".......here's a pickup system, an inventory system" I feel I would just be making an updated version of project Saturn. That is okay, but tutorials are scarce as they are. Something completely new can broaden the amount of templates.
  13. You are right, people want to see games, not the 'boring' syntax learning tutorials. Patreon is a thing of the past now. It was very clear that that was not popular. Lua surely will surely attract the larger crowd. I am just keeping LE5 game templates in mind with this project. If we can aid Josh in making public templates that people can import, how cool would that be. If you look at certain competitors, they have startup screens with the option to find other core templates to get started with. Even if it just to showcase the engine. That is of course more than welcome, but lets first get some more feedback. I will be sure to consult you before starting anything on kickstarter etc.
  14. Hi Leadwerks community. Several people in the past few years suggested to start a modest kickstarter or make some sort of paid tutorial set available using educations sites like udemy.com. Previous attempts at tutorial projects didn't go so well, so a change is needed. Project Saturn Game from scratch Users seem to like this approach better In the end there were too many code changes/breaks in default scripts for me to continue this. OLED Lua basics and editor usage videos. Tried out patreon: at max 3 subscribers. So I stopped using it. Although the video quality and length were improved, the views were so low that I stopped spending time on it. Then there is also SplineTools. I see the same thing there, although it is not a tutorial but a paid script. Very little usage At the moment of writing, I haven't earned anything yet. I blame the Steam workshop partially for this. New attempt I really like to see more people using Leadwerks. So here is my idea for a new tutorial project. Feedback is more than welcome. Kickstarted project The endgoal for this project is to have a cool, complete tutorial project. The endgoal is not to make a huge amount of money. however I have spend a lot of personal time in previous projects. I would hate it to see my precious time go to waste because users do not watch or read the content. Target goal (price)? Honestly no idea. Again, I do not expect to earn a lot on this. I would probably earn more money delivering mail or flipping burgers. Game type: Tower defense FPS is the most used genre for Leadwerks games so I want to do something else. I require only few animations. Several Leadwerks GUI skills to be learned. Imagine clicking on a tower, display a UI object at that specific tower. Different tower types require different game mechanics that can be taught. The amount of towers is not important, the game mechanic is: Direct hit tower: good for demonstrating raycast. (similar to Saturn weapon tutorial) Bullet: simplest effect that can be achieved. Tesla: good way to demonstrate sprites/electricity Area hit tower: either in a cone or in a radius of the tower. AABB example Projectile tower: slow moving object, physics involved. Models/textures/Sound would be provided. I have a friend who can model really well, delivers consistent quality and has a 'friend' price. Progress of the project will be publicly visible in the new Leadwerks Projects forum Project will be opensourced using Github. Language? Lua will attract more users, is quicker to set up and can be used in the editor. This brings us also to the question if the editor should be used in the first place. The game could be procedural for instance. A good showcase for C++ would be a nice change too. Leadwerks version? We have the stable Leadwerks 4.5/4.6. Possibly new game template for Josh to use with Leadwerks 5. Leadwerks 5 is a long way of though. Plus the game would be written in C++ since Lua is not available yet. Development process Game is first made from scratch. When that is done and passes review, the tutorials are made. Written tutorials on how to make the entire game from scratch. From starting a new project, to importing assets, to writing the code and finishing the game. Depending on how much time everything takes, videos could be recorded as well.
  15. It is okay. I do not really need it right now, just thought it was worth the mention.
  16. When creating a Project in the leadwerks forum, you do not have the option to change the type: public, closed, private etc. You can also not delete the project as an admin. Can those options be enabled?
  17. Small type here: https://www.leadwerks.com/editor ....And with support for Ogg Vorbis audio compression, your distrubutable can be made even smaller. ...... (distributable)
  18. You can convert them to different bitrates using Audacity. While you are at it, change it to ogg format. Saves you a lot of space.
  19. That flexibility is the strong part of Lua (arguably also a weakness). I am sure you could even adept the default table behavior to do this automatically for all tables. It is a pity Lua doesn't do this by default.
  20. I guess for general tables that is a better approach. However when using a multidimensional array, I prefer indices. I do find the Table.insert function a bit weird. I wish Lua did it more like below. It helps when using intelisense. myTable:Insert("Thing 1")
  21. You have the same issue there when using ipair, the 0 index is ignored. Try it out Lua online. output create enemies: 4 I am enemy 0 I am enemy 1 I am enemy 2 I am enemy 3 #enemiesCount: 3 I am enemy 0 I am enemy 1 I am enemy 2 Using IPAIR 1_I am enemy 1 2_I am enemy 2 3_I am enemy 3 Using PAIR 1_I am enemy 1 2_I am enemy 2 3_I am enemy 3 0_I am enemy 0
  22. I recently was introduced to a bug in my game. I had 20 AI units and only 19 of them were actively doing something. Number 20 was just standing there. The problem eventually lied in using '#enemies' to get the amount of enemies. Here is what happened: A lua table index by default starts on index 1. This in contrary to many other languages where it starts at 0. However, you can assign a value to index '0' if you want. Since I use C# on a daily basis, I am more comfortable using the 0 index as a start. As a result this is my (simplified) code: for i = 0, enemyCount-1, do enemies[i] = new Enemy() end In the AI script I loop over the enemies like this: for i = 0, #enemies-1, do enemies[i]:DoStuff() end This is really basic lua scripting with one tiny gotcha: The '#' is used to get the amount of consecutive keyed items in the list. This I knew. What I did not know, is that there is also the requirement that this order starts at index 1 (or at least not on index 0). It simply ignores the 0 index! Here is a full script to try local enemies = {} local enemyCount = 4 for i = 0, enemyCount-1, 1 do enemies[i] = "I am enemy " .. i System:Print(enemies[i]) end System:Print("#enemiesCount: " .. #enemies) for i = 0, #enemies-1 do System:Print(enemies[i]) end Output: I am enemy 0 I am enemy 1 I am enemy 2 I am enemy 3 #enemiesCount: 3 I am enemy 0 I am enemy 1 I am enemy 2 Problem So what was happening? I did get the amount of enemies back, except for the one enemy that was located on index 0. I quickly noticed the lower count of enemies, but since enemy number 20 wasn't doing anything I was also looking in the wrong place. It was actually enemy number 1 that was the culprit, even though it's AI was being executed. Solution It can be solved in numerous simple ways, but I guess best practice is to just stick to Lua's standard and not assign anything to 0. This can really prevent some time being wasted on absolutely silly issues like this.
  23. The steam store is such a disappointment. Apart from the lack of options and outdated design, the steam workshop has many long lasting issues. The upload bug in december lasted an entire month and now the store isn't available for items for who knows how long. I will not be using this system again.
  24. Opening drawline from this page results in a no found page. Reason is the capital L which should be lowercase. https://www.leadwerks.com/learn?page=API-Reference_Object_Context
  25. So the mortar scripts works with a raycast to detect impact. What you can do is trying to find out where the raycast is going.You can store the origin and target of the raycast and draw a line between them self.pos = self.entity:GetPosition(true) self.targetpos = Transform:Point(0,0,self.movespeed/60.0 * Time:GetSpeed(),self.entity,nil) function Script:PostRender(context) --You need a camera refernce in this script. local p1 = camera:UnProject(self.pos) local p2 = camera:UnProject(self.targetPos) context:DrawLine(p1.x, p1.y, p2.x, p2.y) end
×
×
  • Create New...