-
Posts
4,816 -
Joined
-
Last visited
AggrorJorn's Achievements
-
DooMAGE started following AggrorJorn
-
WolfinWool started following AggrorJorn
-
mikael91 started following AggrorJorn
-
That is what Visual studio code snippets are for. Just type vec3prop or something, press tab and you get a snippet with common options. You can even tab through the parts of the property. And JSON for file format sounds great. Having a filesystem that can be merged by any versioning protocol is great to have. In the past you mentioned this would get make a bad design choice because of the file size. Is this no longer that relevant or are there good solutions to work around that?
-
@Josh Do you think you will use the plugin system like a nuget store for several core Turbo functions? It would make the editor easier to update without constantly building the entire editor. I do not entirely see the advantage of separating the menu logic from the importing logic. Lets say I make a C++ lib that works both in-game and in-editor, I would want to load it in via your second, but also make the menu options. How many projects are you working on right now? Don't overwork yourself. I find the process_event callback rather cluttering up the code. How about setting a callback for a click event? function Plugin:Load() local menu = Editor.modelEditor.menu:FindMenu("Plugins") if menu ~= nil then self.menuitem = menu:AddItem("Flip Normals") --syntax: self.menuitem.SetMenuClickEvent(callback, extraParams = {})) self.menuitem:SetMenuClickEvent( self:FlipNormals(Editor.modelEditor.model), {forceModelEditorRedraw = true, someOtherValue = 0.3} ) end end function Plugin:FlipNormals(event, params, model) if Editor.modelEditor.model ~= nil then --code: Flip normals of model if params.forceModelEditorRedraw then Editor.modelEditor:Redraw() end end end Rather than relying on this long if chain in processEvent, you set the callback for the events you really need like. MenuClick ViewPanelLeftClick ViewPanelRightClick SceneTreeChanged TransformMoved (triggered when object in scene is moved) RotateEvent (triggered when object in scene is rotated)
-
Using Multiple Entity Scripts in Turbo Game Engine
AggrorJorn commented on Josh's blog entry in Development Blog
hehe, starting to have a déja vu again. I think for the past 5 years there has always been a topic each year mentioning the 'similar named' functions like "Kill", "Hurt" as well as using events. I don't see an event system happening for Turbo either unfortunately. -
Using Multiple Entity Scripts in Turbo Game Engine
AggrorJorn commented on Josh's blog entry in Development Blog
I see your point Josh and the advantages to this method are plentiful based on your examples alone. It is an interesting idea with lots of flexibility. Maybe this is just me, but I see the level of flexibility as an increase to the complexity of the game. New users will lose track of what functions are attached to an entity. I am not trying to shoot down your ideas here btw, I am just trying to see if the advantage way up to possible disadvantages. For instance, I wonder how this works in practice when you are debugging an enemy hat has 8 different scripts applied that all have the Kill() function. With this method it seems that infinite recursion and stack overflow exceptions are constantly lurking around the corner here. If I have a bug and start debugging I would expect some sort of ListAllFunctions() that gives you an overview of all execution ordered function (duplicates) on an entity. As long as you can properly see the stack trace and easily verify which Kill() function has already been called you can can away with it. Either way, the concept of attaching these scripts is interesting and the discussion about it as well. Keep on improving and blogging. -
Using Multiple Entity Scripts in Turbo Game Engine
AggrorJorn commented on Josh's blog entry in Development Blog
This is to this day how I would have liked the lua scripts to have worked in Leadwerks. Albeit slightly differently scripted. The example you give really describes the problem with singular scripts. The player script has no business seeking out a healthmanager subscript that should be managed by the enemy. It is the enemy's script responsibility to expose any of its subcomponents to the outside world. Personally I never check if something is a function either. By convention variables are lowercase and function are not. In this case the player only check if it has enemy and that gives it damage. --player function Script:HurtEnemy(amount) if self.enemy ~= nil then self.enemy:ApplyDamage(amount) end end The enemy has a reference to the health manager which it retrieves in the start function. If it is not there, the game should simply report an error since something is wrong in your setup. Lastly, the enemy script passes the damage value on to the right component(s). In this case only the healthmanager. Ideally you would set this up by events. --enemy script function Script:Start() self.healthManager = self:GetScript("healthManager") if (self.healthManager == nil) error("Enemy has no healthmanager. Something is wrong in your setup.") end function Script:ApplyDamage(amount) self.healthmanager:ReduceHealth(amount) end The health manager finally actually does something with it. The amount variable should only be changed by the healthmanager itself and not by other scripts. --healthmanager function Script:ReduceHealth(amount) self.amount = self.amount - amount end Now you have the logical separated scripts that are far easier to maintain due to small amount of code lines, the absence of constant nil checks and by keeping responsibility to the component and its owners. This would be my choice too Rick. Maybe that is because this is far more similar to how Unity does it with GetComponent<> or Godot with get_node. I think what plays along here is that Josh really likes to implement his own methods rather than just 'copying' the same methods others use. Both systems work, and Lua is awesome in this kind of flexibility. @Josh: have you considered using a GetComponent feature? People using other engines will recognize this function and find it perhaps an argument as too why they could potentially switch. A future documentation page I would recommend: Switching from Unity to Turbo/Leadwerks. "If you are used to using GetComponent<>(), with Leadwerks you are just as easy on your way with GetComponent(YourScript)." From the day I learned that this was possible I never even considered using multiple return values. Not that is not powerful, but merely the complexity this suddenly adds, stops me from using it. This already happens when you have a function that can have any number of arguments. If you don't deal with all these arguments you will eventually kick yourself in the knee. Especially if you program in a team, you expect that a user does something with the given values or you would need to have strict guidelines in how to deal with them. Thought you would never ask. Lets start with some basics: Zooming in and out of a current layer. Flowgraph works by creating scene level graphs and prefab/model based graphs. Level based Layers: When working with FPS levels (like the elevator demo), you want to add level logic for a certain area in a layer. eg: Starting area layer Elevator room area layer Panels These are more UI containers for your 'graph nodes' to attach to. Naming or colouring the panels is a nice addition. Improved input types: curve property material selector More advanced: Nested flows/ Object flows. Nested flows are excellent for reuseablity. Nested flows are fixed flows per entity/prefab. This means a flow is always similar regardless of what level you are playing. Example Lets say you have to 3 script in a flow: CollisionTrigger, timertrigger and EnemyTurret. The CollisionTrigger.OnCollision can activate the Turret The TimerTrigger.OnCollision can also activate the Turret after a given time Double click on the EnemyTurret opens the subflow of this turret. This flow is on an object level instead of scene level. The subflow always has its parent entry arguments coming in The subflow always has its parent exit arguments going out. This subflow produces a rocket that can again also be double clicked since it is an object flow. -
Leadwerks Software to Assist NASA Building VR Applications
AggrorJorn commented on Josh's blog entry in Leadwerks News
Congrats Josh. As stated before in your blogs: unlike the mobile direction, VR is actually bringing back the power to the engine. So leadwerks 5 will contain the Turbo changes, minus the new editor. Do you think you will expand your team, now that you have a contract? -
That looks interesting. What a cool concept.
-
Map Loading, Materials, Shaders, and other Details
AggrorJorn commented on Josh's blog entry in Development Blog
If we can do that on a separate thread/async, that would be great. -
Map Loading, Materials, Shaders, and other Details
AggrorJorn commented on Josh's blog entry in Development Blog
I am curiously awaiting the demo. Would it be feasible to have a build in loadingprogress percentage? -
How to Request a Payout from Leadwerks Marketplace
AggrorJorn commented on Josh's blog entry in Leadwerks News
@Josh I would add this information to the documentation. You can also use your earned account credit to purchase new items in the leadwerks marketplace: -
How expensive is this operation?
-
Don't you just hate it when you stand in the shade, and all the sudden you got yourself a console application.
-
I didn't even know penumbra was an actual English word. I thought it was just the name of the games.
-
Keep up the good work Josh. Really fascinating to see your progress.
-
There are a lot of cool model packs. Really tempting not to buy all kinds of stuff that I do not need.