Jump to content

Josh

Staff
  • Posts

    24,629
  • Joined

  • Last visited

Everything posted by Josh

  1. Still in progress, but these are good: http://combathelo.blogspot.com/2011/10/c-scope.html http://www.leadwerks.com/werkspace/topic/4024-small-update-with-some-characters-in-gameplay/
  2. The new CSG editor is coming along nicely. Yesterday I implemented CSG rotation and skewing, and today I got object center and edge selection working. 3D World Studio uses GL_SELECT mode to handle picking in orthographic viewports, but this stopped being supported in ATI drivers a few years ago! I implemented a CPU math routine for picking brush edges. In orthographics viewports, brushes can be selected by clicking their center or any edge, while models only use the center for selection. (This is how Valve's Hammer editor does it.) If this feels weird I can implement an edge-picking algorithm for models, but I think the speed of this would not be good with complex models/scenes. The editor is starting to look and feel like a real editor, and we'll soon be able to start producing the level for our example game. It's neat to see a tool with a modern take on a proven level design technique. I have some map files saving and loading. I'd like to use an ASCII based format if possible, but that may be too slow, especially on mobile. Here's a sample of the file format I am using right now: Map { Version: 3.0 Brush { ID: 203099704 Name: "Box" Position: -0.999999881, 10.0000000, -20.0000000 Rotation: 0.000000000, 0.000000000, 0.000000000 Scale: 1.00000000, 1.00000000, 1.00000000 Color: 1.00000000, 1.00000000, 1.00000000, 1.00000000 Material: "models\buildings\guardtower\plaster.mat" Vertices { 0: -1.00000000, -10.0000000, -10.0000000 1: 0.999999881, -10.0000000, -10.0000000 2: 0.999999881, -10.0000000, 10.0000000 3: -1.00000000, -10.0000000, 10.0000000 4: -1.00000000, 10.0000000, -10.0000000 5: 0.999999881, 10.0000000, -10.0000000 6: 0.999999881, 10.0000000, 10.0000000 7: -1.00000000, 10.0000000, 10.0000000 } Face { Indices: 0,1,2,3 Plane: 0.000000000, -1.00000000, 0.000000000, -10.0000000 MappingPlane[0]: -1.00000000, -0.000000000, -0.000000000, 0.000000000 MappingPlane[1]: -0.000000000, -1.79489679e-009, -1.00000000, 0.000000000 Material: "models\buildings\guardtower\plaster.mat" } Face { Indices: 7,6,5,4 Plane: 0.000000000, 1.00000000, 0.000000000, -10.0000000 MappingPlane[0]: -1.00000000, -0.000000000, -0.000000000, 0.000000000 MappingPlane[1]: -0.000000000, -1.79489679e-009, 1.00000000, 0.000000000 Material: "models\buildings\guardtower\plaster.mat" } Face { Indices: 0,3,7,4 Plane: -1.00000000, 0.000000000, 0.000000000, -1.00000000 MappingPlane[0]: -1.79489679e-009, -0.000000000, -1.00000000, 0.000000000 MappingPlane[1]: -0.000000000, -1.00000000, -0.000000000, 0.000000000 Material: "models\buildings\guardtower\plaster.mat" } Face { Indices: 5,6,2,1 Plane: 1.00000000, 0.000000000, 0.000000000, -0.999999881 MappingPlane[0]: -1.79489679e-009, -0.000000000, 1.00000000, 0.000000000 MappingPlane[1]: -0.000000000, -1.00000000, -0.000000000, 0.000000000 Material: "models\buildings\guardtower\plaster.mat" } Face { Indices: 4,5,1,0 Plane: -0.000000000, -0.000000000, -1.00000000, -10.0000000 MappingPlane[0]: 1.00000000, -0.000000000, 3.58979357e-009, 0.000000000 MappingPlane[1]: -0.000000000, -1.00000000, -0.000000000, 0.000000000 Material: "models\buildings\guardtower\plaster.mat" } Face { Indices: 6,7,3,2 Plane: -0.000000000, 0.000000000, 1.00000000, -10.0000000 MappingPlane[0]: -1.00000000, -0.000000000, -0.000000000, 0.000000000 MappingPlane[1]: -0.000000000, -1.00000000, -0.000000000, 0.000000000 Material: "models\buildings\guardtower\plaster.mat" } } }
  3. I just calculated the wave height at the object's position. I didn't have to calculate the whole ocean field, just the height at the position I was interested in.
  4. Absolutely. That's what I do in the editor. There's a secret callback in the camera class like this: framewerk.Main.camera.DrawCameraHook=DrawCameraHook Function DrawCameraHook(camera:TCamera,stage:Int=0)
  5. In Leadwerks Engine, probably no since there is no real debugger. In Leadwerks3D, yes.
  6. Josh

    Relay

    Let me put it this way: When I use a third party library, I have code I did not write. That means it's out of my control to fix or even understand. I try to minimize the amount of code I didn't write that I use: zlib enet freetype lua glew recast newton tolua++ openal The only time I ever needed Boost was when I tried using LuaBind, and ToLua++ turned out to be much better. It was a relief to delete the Boost folder.
  7. Josh

    Relay

    I call it **** because it's a lot of code that may not compile/work on every platform we deploy to. Therefore, it is something to be avoided.
  8. Josh

    Relay

    I think you will find Leadwerks3D to be a lot easier to port. You can probably comment out systems you don't want, or just leave them there and they will take no resources. Everything is pure C++, with no commercial third-party libs, and no **** like Boost built into it. The engine, including all libraries, is about 200,000 lines of code.
  9. Josh

    Relay

    Right but your system is not compatible with anyone else's code. This will give us all a standard framework for script interactions so all our script objects will play nice together, and it will be zero overhead if you don't use it.
  10. Josh

    Totally Tubular

    Yep. I thought it sounded fancier.
  11. Josh

    Relay

    I would create a brush, set it as a trigger field, then connect the brush to the door.
  12. Josh

    Relay

    It's a way to let designers access script functions in a visual manner. Script programmers can write in their functionality, then have it available for everyone to use in a standard framework.
  13. Josh

    Relay

    I'm not interested in making a visual programming language. If that's what people wanted, they would be using the C4 Engine: Once you start writing a real program with such a system, it quickly becomes unmanageable. People might say they want this, but that is because they have no idea how complex the actual result would be. You end up with something neither artists nor programmers understand. Instead, I am interested in a system to connect objects to control interactions using predefined functions. The code that makes things happen is in script, and the visual tool lets the level designer control sequences of events.
  14. Josh

    Totally Tubular

    Today I implemented the last two compound primitives. Tubes are the same as in 3D World Studio, with parameters for the number of segments and thickness. Since the Leadwerks3D editor supports smooth groups, another new compound primitive has been added. A torus is a "donut" shape. These can be used to make curved pipes and other things. Here are the two compound primitives, side by side: Smooth groups and new primitives in Leadwerks3D allow you to create new kinds of geometry which were traditionally not possible with CSG editing: An interesting case occurs when a torus' cross-sectional radius exceeds the radius of the ring. At this point the shape folds in on itself, eventually degenerating into a sphere. To prevent this from occurring, the creation function automatically adjusts the cross-sectional radius, as shown in the image below:
  15. Josh

    Plugins

    Not in particular, the workflow in the editor is way too specialized for that. It isn't like you just click a toolbar to select with the mouse, click another to rotate, click another to translate. That kind of behavior is easier to program, but we care most about making a really easy to use editing workflow with a minimum number of mouse clicks.
  16. Josh

    Plugins

    One of the coolest aspects of Leadwerks Engine has been the ability it gives shader authors to implement new effects. On that note, how do you see a formal plugin system for Leadwerks3D working? I am thinking a number of hooks will be available in the engine, on both a per-entity and system wide basis. A plugin class will look something like this: class Plugin { std::multimap<int,void*> hooks } The Plugin object can be created in a DLL or other library, and retrieved. Then the engine will have a function like this: RegisterPlugin(Plugin* plugin) And all the hooks in the hooks multi-map will be added to the engine. Is there a way this could be architected so that the plugin can access the same instance of the Leadwerks3D command set? Any ideas there?
  17. Since brushes in Leadwerks3D are entities, and the Leadwerks3D editor gives you access to the entity hierarchy throughout a scene, we don't use "groups" like 3D World Studio had. Instead, when a compound brush is created, a parent pivot is created, and all brush segments are made a child of that. When you select any part of the hierarchy, the entire compound brush is selected (unless "Ignore Hierarchy" is turned on). Since brushes can now have a 4x4 matrix, which wasn't the case in the past, my code for editing has to be a little more advanced. I was initially having some trouble getting this working with my first compound primitive, the arch shape: However, I think it's all good now. You can see the smooth groups working across multiple subobjects, to give the arch interior a smooth curved surface: You can also see how the scene tree displays every object in the scene, allowing you to select multiple objects at once.
  18. Josh

    Snow Day

    The last day of the season was today, so I was at North Star. We had a storm for the last three days, so the snow was pretty good, just sticky in some places. Even though it was a Sunday, crowds were not bad. Towards the end of the day, most people were hanging out at the lodge and the runs were completely empty. All in all, it was a pretty awesome day.
  19. All appears fine now. If you experience it again please post here or email support, if you can't post.
  20. Josh

    Smooth Move

    Yes, it will be quite interesting to see CSG levels on mobile, as these have traditionally been the realm of AAA games. It seems like mobile technology has finally caught up to where we need it to be.
  21. Josh

    Smooth Move

    Smoothing groups are one of the most frequently requested features for 3D World Studio, so I am happy to show you their implementation in Leadwerks3D, finally. Smoothing groups are usually stored as a bitwise flag. When two faces share a vertex at a certain position, if they have one or more smoothing groups in common, their vertex normal is calculated as if they are sharing a vertex. I first attempted to write an algorithm based on edges, which worked great for cylinders but failed for geometry that had faces that influence vertex normals they are not connected to by an edge. I wrote another routine, which uses an n*n*n loop (big programming no-no, but sometimes it's necessary) and got good results with cylinders and spheres. Cones are a difficult case, and if you don't believe me, just crack out a cone in your favorite 3D modeling app and inspect the tip. I got around this problem by adding a max smoothing angle member to the brush class, which allows the smoothing algorithm to discard faces that are too 'different' from the one being processed. Here's the result: In order to make shapes like arches appear smoothed, the smoothing algorithm has to span multiple objects. This will be accomplished by first grabbing all the brushes in the nearby vicinity to the brush being processed, and then searching for vertices that occupy the same position, on faces that have a smoothing group in common. In the past, we've seen some pretty advanced modeling done with 3D World Studio, but the lack of smoothing groups always limited it. It will be awesome to see what people come up with, when those limits are removed and they can model exactly what they want.
  22. That seems a little complex, when you can just do stuff like this: stateSys.break = false stateSys.CamSwitching = true
  23. The 3D World Studio documentation pops up when you hit the F1 key in the program.
  24. If you make the password long enough they can't be broken in a reasonable amount of time.
×
×
  • Create New...