Jump to content

Josh

Staff
  • Posts

    23,101
  • Joined

  • Last visited

Everything posted by Josh

  1. Josh

    August 13, 2011

    Once again, I like to attack the things I haven't done in the past first. I know how to make a CSG editor. What I haven't done in the past is a visual editor for gameplay and logic. In the shot below, you can see the properties editor, with the "Scripts" tab selected. I moved the name and angle editor outside the tabbed panel, with the idea that these are so important they belong in the main window, but the real reason was to break up the boredom of a full-window tabbed panel. Under the scripts tab, there's a list on the left where you can drag scripts onto to assign a script to an entity. You can also drag the scripts around within the list to rearrange the order they are executed in. When a script item is selected in the list, its properties appear on the right in the bordered area. This has a border because if the number of controls exceeds the available height, a scrollbar will appear to allow you to scroll down and access all of them. Now I personally am not a fan of this, because I think it makes things more complicated, but the user feedback overwhelmingly suggests users want multiple scripts attached to a single object. I think this is so users can combine behaviors and adjust them through trial and error. This doesn't occur to me because for me it's no big deal to just open a single script and program it to do exactly what I want. However, this isn't as trivial for everyone, and for every programmer out there, there are probably 99 non-programmers. This is a good example of why we need to understand how everyone uses the software. The resolution we have satisfies the need for trial and error design, without restricting what you can do with it. You can drag an entity script or an entity into the flow graph editor to make its attached scripts appear. Each script has inputs and outputs, and you can connect one to another. I think I am going to put both script output functions and exposed attributes on the right, with a different icon for the two. Output functions can be linked to inputs on other scripts, while attributes can be linked along the curved line connecting the two, as function arguments. This is a cool idea I think will make it unique, and it only works due to the flexibility of Lua; you can skip function arguments, and the function call will be executed anyways without any problem. I'll have some special flowgraph nodes that only appear in the flowgraph editor for logic, timing, etc. It is not my goal to make a visual script editor. I don't think the challenge of programming is because people don't understand text code. The problem is thinking in an extremely logical and meticulous manner. A visual script doesn't get rid of this requirement, it just uses a different method to display the logic, one that will baffle both programmers and non-programmers alike. Think about (most) artists trying to design "Pong" with a flowgraph; I don't think it would work. Trying to code behavior through a visual representation of script is not something I want happening in the flowgraph, except on a fairly lightweight level. People are welcome to try it, but if we expected that everyone would be able to write complex programs with it, I think it would fail and we'd be back to the drawing board. My goal for the flowgraph system is to allow a designer to connect behaviors to create interesting sequences of events in a game. Individual behavior of objects will still be coded in script, in a manner designed to be as general-purpose as possible. A button opens a door, a cat chases a mouse, a switch turns an elevator on, then opens a trap door, and turns on a machine ten seconds later. Leadwerks Engine 2 had individual entity scripts, but without a standard system for interactions, there's little you can code in a self-contained script, other than some looping behavior. Setting names and targets is functional but rather abstract and cumbersome when working with complex interactions. With the Leadwerks flowgraph editor, we're all working together on the same game...yet the programmer still has complete control and freedom.
  2. All your requests are already written or in the design spec except terrain brush editing. Are you talking about the displacement brush stuff from the Half-Life 2 editor?
  3. Josh

    Making a scene

    Yes, that idea was ripped shamelessly from 3ds max.
  4. Josh

    More interface stuff

    I've considered that, but the 2D views are actually rendered straight to the back buffer. Also, not all supported hardware the engine runs on even support render-to-texture! Now you get an idea of the constraints I deal with.
  5. Josh

    Making a scene

    The scene browser lets you see every entity and brush in the scene, and also lets you arrange entities in a hierarchy. You can add a light to the scene, position it onto a lamppost, then use the scene browser to parent the light to the lamppost model and save the whole thing as a prefab. There's no "mesh" class in the new engine, and entities inherit a lot of the properties that models in LE2 had, like scripts and physics. Models are just MDL files, and generally just contain model and bone entities. A prefab, on the other hand, can contains models loaded from other files, lights, particle emitters, and anything else you can create in the engine. Whereas in Leadwerks Engine 2 you would use a script to create special entities in code and parent them to a model, in the new engine you can place and parent them visually, then save them as a prefab to be used again and again. Top-level models can be dragged around in the hierarchy, but limbs (children contained within a model file) are a bit more problematic. If we allowed the user to create a character, then parent the character's arm to another model in the scene, then delete the character, leaving the arm...you can see how that could cause a lot of issues. What I'm leaning towards is a rule that it's fine to parent the top-level model to something else, and you can add entities within the model's sub-hierarchy, but changing the parent of a model's limb is not allowed. I hope this doesn't confuse people using it, but it makes sense; if you really need to alter an model file's hierarchy, it should be done in the model editor (similar to the texture and material editors you have seen). You can still set different properties like color, script settings, etc. for limbs of different instances of the same model. The map file will just store data that says "attach these scripts to limb number 7 of this model after you load it". This way models will always be reloaded from their original files, and if you alter your model the whole map will be updated. Actually, the more I think about it, the more this makes sense...this is a map editor, not a modeling program. Not shown here, but I am adding a filter at the bottom so you can type in a name and a list will appear of all objects in the scene that contain that name, so you can type in "tree" and find all relevant objects. Hmmmm, come to think of it, maybe I should also add a drop-down box to search by either object name or the name of the file the object was loaded from. The check marks will toggle visibility recursively, though they don't work yet. I'm writing the grid and object selection rendering into the engine, so they'll be some commands like Entity::SetSelectionState(bool mode). I found this easier than a bunch of rendering callbacks, especially when the engine is designed to run multiple renderers. This might come in handy if you are writing any kind of editor.
  6. I've changed my mind on this, but we're going about it our own unique way and it may not be in the first release. Instead of a rigid "plugin" design that attempts to anticipate every possible use, I think a hook/script system is better. 1. The editor runs all scripts in the "Scripts/Start" folder at startup. 2. Scripts can add a hook. Hooks can be added for an event, or they can be added for a bunch of predetermined points in the program. For example: AddHook(HOOK_MATERIALEDITOR_OPEN,"MyMaterialPluginInit") AddHook(HOOK_EMITEVENT,"MyMaterialPluginHook") AddHook(HOOK_MATERIALEDITOR_SAVE,"MyMaterialPluginSave") You can add a menu action the user can add to the menu to call your plugin: function AIEventHook(event) if event.id==EVENT_MENUACTION if GadgetExtra(event.source)=="OpenAIEditor" aiwindow=CreateWindow("AI Editor",0,0,800,600,mainwindow,WINDOW_CENTER|WINDOW_TITLEBAR) okbutton=CreateButton("OK",20,20,80,30,aiwindow) end end if event.id==EVENT_WINDOWCLOSE if event.source==aiwindow ActivateGadget(mainwindow) HideGadget(aiwindow) end end end] CreateMenuAction("AI Editor","OpenAIEditor") AddHook(HOOK_EMITEVENT,"AIEventHook") So instead of being a "plugin" system, it's more like the editor is semi-open source, while remaining more structured than an open-source program, and preventing the branching that always occurs with open source stuff. It seems almost too good to be true, but as far as I can tell it seems like this would allow for unlimited flexibility, without screwing up the editor source code. You could use this to add a plugin with an interface for PureLight, or any number of other things, and everything would occur right in the editor, within the same interface.
  7. I did contact both of them, and even offered to convert their models for them. It sounded like Steve was getting ready, then one day he asked me what I thought sales would be like. I honestly answered I didn't think they would be much at first, but a year from now it could be significant, and it's about getting the system in place and ready. Haven't heard anything from him since. What I really want are the FPSC model packs. Rick is interested, but he's busy right now with their new app maker program.
  8. Actually, I don't think a non-programmer will be any more likely to be able to write script code than C++. It's all the same commands and concepts. If they can't understand code, putting it in another language (Lua) isn't going to help. They might be able to edit a few variables, but that's it...it just opens the door to endless requests for examples for this and that and the other, and then when an example isn't written to their tastes another request comes for a trivial change. At some point, requests for examples just become requests to write their game for them, to their specification. That's why I have implemented our flowgraph system. It's something completely new that largely replaces the need for code, and lets designers use pre-made interactive objects. You'll have to wait and see how that works. This is an example of when listening to literal customer recommendations is suicide. I don't mean you, YouGroove, I mean the hundreds of non-customers who have said the kinds of things I am describing. You want to listen to your customers' problems. You don't want to listen to their proposed solutions, because even if you carried them out exactly as specified there's no guarantee that would solve their problem. Additionally, if you just carry out a recommendation, you won't necessarily even understand the problem, so your solution can completely miss what they are after.
  9. What I'm really attempting to acquire are animated characters, since that is something there is a high need for.
  10. I don't meant 5% of the Leadwerks community, I mean 5% of the larger potential market. Right, and it was a big challenge to figure out how to make things simple without crippling the system, because frankly if I had to make an easy-to-use ****ty engine, I would rather go write high-speed trading algorithms or do something else for work. I mean, simply making easy to use low-quality stuff has no appeal to me. I like to think the design I worked out will make life easier for everyone, without holding back the expert programmers. I started as a map designer.
  11. Josh

    And now the fun begins

    CSG brushes will be saved into the map, or you can save them as prefabs, or convert them to models, or convert them to physics shapes. But normally, CSG brushes will be considered to be unique geometry for a given map. I haven't thought about how much CSG commands will be exposed. Probably everything, because I am building it into the engine anyways, and I have to access it all from the editor. Most days my progress is something like "that thing that used to crash the program no longer causes a crash" so I don't know if that is very interesting.
  12. We have our design parameters. We know the editor should let the user control every aspect of the engine in a visual manner, without having to use any other tools or do any editing of text files. We have 3D World Studio to serve as inspiration for the design and feel of the program. The sky's the limit. You, the users, have told me that you want to invest in a system that does more for you and makes your life easier. I'm happy to provide the basis for your next projects. Thank you for letting me make this for you, because creating 3D tools is what I really love doing. Look at me, I see a CSG editor grid and I get all sentimental. I like having the scene tree and asset browser in tabs on the right. I tried a couple variations of keeping them both visible at once, and I think it looks silly. The down side of using tabs is you can never drag anything from the asset browser to the scene tree directly. Therefore, it makes the most sense to me to have sounds, scripts, and anything else in the properties editor, so you can drag assets from the asset browser to that. This means scripts, sounds, etc. do not go in the scene tree, and it gets used for only entities and brushes. It seems like a good layout and will support all the drag and drop features we need.
  13. I have been unable to obtain sufficient items to do this properly. We only get one chance to make an impression, so I am looking for more models before it is launched.
  14. Josh

    More interface stuff

    Probably because Blender isn't rendering a lot of post effects and lighting each frame. It's not any slower than the redrawing in the current editor, but given the choice I'd like to keep the program feeling light and as responsive as possible. There's a subtle difference you feel when a program starts fast, closes fast, and resizes fast. Not sure why it makes a difference, but it feels better.
  15. Josh

    More interface stuff

    That's what I meant by "XOR drawing". GDI has some functions to draw a negative brush, which is what you are probably thinking of.
  16. Once any third party gets involved, the user experience is out of my control. Probably 95% of the potential market for software like this won't accept or understand the need for a third party compiler. Even if they do go for it, coding tools are almost always very difficult to set up and poorly supported. That causes a lot of conflict when I am trying to make a system that's easy to use. A lot of people come here with no coding experience at all, see they have to install Visual Studio, and that's the end of it for them. My guess is that describes maybe 95% of the people who might be interested in designing games.
  17. Josh

    More interface stuff

    Another common technique is to overlay an XOR drawing and only resize the stuff when the mouse is let go, but that doesn't work for window resizing, and is Windows-specific. It's not a big thing, but I thought some of the programmers might be interested in what I found.
  18. I implemented resizable viewports this morning. This is so much more fun than fiddling around with compiler settings. You can grab the bars between viewports, or the very center space, and drag it around to resize the four viewports. I usually prefer a smaller perspective view, and like to devote most of my space to the 2D views when doing serious editing: You can also drag the views around to make a single big viewport, or just have two viewports visible: In 3D World Studio, when you resize the window the program instantly redraws, even as you are still moving the window. This is nice looking but it can get slow when you have a large map loaded, and it makes the program feel slow. The problem is even worse with a deferred renderer, because you are constantly creating and deleting those big gbuffers. I don't like hearing the graphics card fan kick up just because I decided to resize a window. I'm getting better results by waiting for the user to let go of the mouse before redrawing viewports, but for window and viewport resizing. This has the effect of displaying "bad"/undefined screen regions while the user is resizing things, but it makes the program very fast and responsive. I used to consider those artifacts to be a sort of amateurish trait, but I think this actually works better. The program feels very fast and light, so I think this is actually a pretty good tradeoff. As soon as you let go of the mouse button, the viewports redraw at their new size. --EDIT-- And now we have grids. Starting to look familiar, but new:
  19. http://www.leadwerks.com/werkspace/blog/1/entry-655-tools-and-stuff/ http://www.leadwerks.com/werkspace/blog/1/entry-658-lua-and-c-debugger/ I intend to focus on Lua for examples in the future. It's a lot easier to work with because you don't have to install compilers and code editors for all the different platforms, and it runs the same on everything.
  20. I should correct that, but yeah, lots of people install it on their laptop and their desktop.
  21. I'm really surprised at the speed of that.
  22. Josh

    Interfacelift

    It's possible to just drag the four viewports around as you need, so you can make it 2 views or just one. However, with a complex scene I always find I need three 2D views so I can see what the scene geometry really looks like. This editor is being design to work as a complex level designer, not just a tool to drop some models in a scene, so the rules are a bit different from the last editor.
  23. Josh

    Interfacelift

    You can select the top-level directory, enable the recursive option, then enter a search term in the filter box, and the results will be filtered pretty near instantly. If you want to view all materials, for example, type in "*.mat" and hit enter.
  24. Josh

    Fentinor build

    You've got to submit that last image as a banner! B)
×
×
  • Create New...