-
Posts
7,936 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Rick
-
Oh, nevermind. I see there is an event button in the properties. Lame-o VB.NET's way is so much better
-
Does anyone know of a way to make control event handlers with the editor vs coding them yourself? Like in VB.NET when in the code view there are 2 drop downs at the top. The left is for all the controls on the form you are in and the right would be all the events for the control in the drop down on the left. When when you select it, the editor fills in the code. This is an amazing time saver, but I know C# always lacked this. I would have figured 2010 wold have added this for C#. The only other way I can see is to either define them all up front in the form load (ugly) or to go into the editor generated code and define them there ("dangerous" as defined by MS). The only way to auto generate event handlers seems to be to dbl click the control on the designer, but that only gives you the 1 default event for that control. Which is not the one I'm looking for.
-
I'm running a "experiment", if you will, to bring a Unity feel to Leadwerks, that will extend to a flowgraph in the future. It would be great if the thing stopping someone from making a game ISN'T the game logic. Most everyone can think logical about how their game should work, so it would be nice if that was easily translated into code.
-
Note that the road system is in lua scripts right now. That's how Josh made them.
-
I'm hoping to bring C# scripting ability to LE soon.
-
I think this depends on where you are doing this. If you are doing this in the main lua file like ZioRed did that should work. If you are doing it in an object script then I seem to remember I was using a different able than the classnametable. Check if there is an objecttable. I think I used that before. In the download section you can look for my Pi-Main and in there I loop through the table to call functions in all the object scripts that I created. for k,v in pairs(objecttable) do if v.Initialize ~= nil then v:Initialize() end end
-
Tell him to buy a license? Having access to the forums is kind of a part of the license these days. The general idea of having the forums this way is that all that have access has a license and therefore we can distribute code that has LE stuff in it that should only be seen by other licensees.
-
Short answer and the quickest way would be to just copy the Scripts\template.lua and uncomment things in that file for your objects. I always start with that as it's easier. I agree though, when I was getting into LUA the implementation didn't seem all that straight forward. This is why I'm messing around with C# script instead. I'm trying to convince Josh that C# script would be better. It provides much better object oriented support and the syntax is pretty close to LUA. The only down side would be the .NET dependency.
-
Thanks Pixel. If anything it'll be interesting to see if I can get this structure down and working. I'm going to take a different approach at how the editor will work. Instead of embedding LE inside a control I'm going to have that part as a separate .NET project where it just makes the window. Then I'll have another separate .NET project as the project tool. Using .NET I can communicate between both programs using .NET Remoting. So when I add something to the scene in the project program it can communicate to the LE window program and actually add it. If anything this will be a good learning experience on .NET Remoting A SQLite DB is just 1 regular file. To use the library is just a dll. There would be no install for the user. It's all self contained. I just prefer working with databases and I find it easier to just write a query to get information. As far as the communication between the 2 programs I plan on using .NET remoting to talk between the 2. They say it's faster than local networking. Plus it's something new I get to learn in the .NET world.
-
Documenting a design for holding assets. LeadwerksAssets.assets (sqlite db) ================= LEElements - Table ID = int (the id of the element) type = int (script, model, sound, etc) name = string (the name of the asset) location = string (where the asset is located) LEObjects - Table name = string (the name of the asset) elementID = FK to the LEElements table Project.assets (each project gets it's own sqlite db) =========== LEProject - Table (describes this project) LEElements - Table (any elements specific to this project) LEObjects - Table (any objects made specific to ths project) LEScenes - Table Lee.exe - This is the editor and when working with projects you use this. Lee automatically opens Engine.exe and talks to it to put it into editor mode. Engine.exe - This is the game engine. Lee.exe opens this and works with it when editing. If you just pass the .assets to it, that's how you get your game to run. Without Lee talking to this it'll start in game mode.
-
That's not good. This has been an issue for such a long time. What are the issues around getting LE to draw on a .NET control? I'm almost getting to a point where it's probably easier to just make 2 programs. One for the LE viewing and another for the editing tools, and just use local networking between the 2 to communicate. This would probably be easier than trying to get LE into a control. I might play around with that some. That actually might not be a bad idea anyway, since the LE window part could act as the actual game without the other tool windows. Or I might actually be able to plug into the other programs domain and just make calls back and forth that way.
-
That's perfect as I won't be using LUA for this anyway. If you passed false did you try the stats to see if they work?
-
I'm going to call this editor/engine 'Lee'. Which stands for Leadwerks Editor/Engine. I'm going with the spelling of Lee because that happens to be my middle name. Spooky huh So anyway, this is going to be a little like how Unity works. Some things will be slightly different, but the general idea is the same. Note that this is a game structure system. It will not give you access to any sort of int main() and will have objects with a predefined structure for people to use. It should however not be restrictive in anyway. You will be able to do full object oriented programming. Anything C# can do, this will allow. A little about how this will work: 1. The scripting language will be C#. 2. A script is compiled every time it's saved and will give real-time script error feedback for easy debugging. 3. Everything will start from a base game object, which will basically be a pivot. You will build on this object to make what you want. Add any number of scripts or models or sounds to build a game object. 4. Prefabs will be supported (it has to since building objects from scratch all the time would be annoying) 5. You attach scripts to objects. In the script you will define a class that derives from the LEScript object. This provides many virtual methods that the engine/editor will call automatically and where your logic for that object will go. You can also create scripts that are just normal classes that you can use in other scripts. 7. One of the virtual methods will be UpdateInEditor() which will simply return true or false. By default this returns false if you don't override the method. This determines if the script methods are ran in the editor and game mode or just in game mode. This gives the scripters the ability to make real-time objects in the editor or objects that only run when in game mode. 6. The editor will come with pre-built prefabs. The first of these will be a Cube & SpotLight, and we'll build from there. Once the core structure is in place it's just a matter of adding LE objects as prefabs. Here is an example of how the SpotLight prefab will work. The SpotLight will basically be an empty game object with 1 script attached. The empty game object gives the spotlight position, rotation, & scale. The script that'll be attached to it will define the UpdateInEditor() and return true. In the Initialize() method is where it'll use LE code to create a spotlight object. It'll attach the LE light object to the game object. This basically sets the position, rotation, & scale to the game objects & makes the game object the LE lights parent so the light moves with the game object. The Initialize() method is only called game objects in a scene that have an LEScript object attached to it. All the prefab setup is done on the project view and not the scene view. This SpotLight object however will be already setup on disk and just read into the editor. This leads me to the directory structure. I'm thinking of the following structure to store prefabs. Any folder under Assets will be automatically added to the editor on startup. So if someone creates a cool pathfinding library, they can follow this structure and people can place their folders under Assets and it'll get loaded on each project. If a person didn't want it to load automatically on every project, they can just add a library asset folder into individual projects they have. Lee Directory Structure Lee Assets Leadwerks Assets Prefabs Lights SpotLight Scripts Lights SpotLight Objects Lights SpotLight A good portion of this design is already working in test projects I have. I just need to get the embedded LE control working the way I need it. Once this is in, it lays a foundation for getting flowgraphs going.
-
Bummer. It seems like some things work with it. I use the framework Update() and Render() and that seems to work. Do you happen to know what things work and what don't?
-
I was able to get this working with using engine.dll v 2.32. I still get this black square in the LE control though. Not sure what's up with that.
-
Sorry NA, didn't mean to belittle your efforts. I just assumed they must have liked what they saw (be it graphics or gameplay), but sounds like you were persistent also. Good job man!
-
I'm able to use the Framework with the LETKControl, but when I set Framework.StatisticMode = StatisticMode.Detailed; I don't see anything on the screen. Any ideas?
-
Looks like I didn't have 2.32 engine.dll. All good now. Still not really sure what's up with this black box. It seems to be the LETKControl. If I turn it invisible it doesn't seem to matter. If I move it it doesn't seem to matter, it just goes back to where it was originally. hmm, even if I delete it it's still there when I run. Wtf is up with that?
-
OK, I got it. Gave me some error about attempted to read or write protected memory, but if I hit continue it seems to work somewhat. I have a the scene with falling cubes, but I also have a black 2D square in front of that. I can run the exe directly, but not from the editor. Guessing it's because of the protected memory error I get when I run directly. I assume it's doing the same thing from VS but it won't let me get passed it in VS. Looks like it's erroring in Leadwerks.Core.CreateBuffer().
-
Bah, so I can get it to start but it just bombs right away with a 'Unable to load DLL Engine.dll' That file is in my debug dir so not sure what's up there.
-
I can't figure out how the control works. Do I need anything special? All I see is the dll. Isn't there supposed to be like an ocx or something? When I try to run the Leadwerks_Forms_Test I get an error: Visual Studio cannot start debugging because the debug target '...' is missing. Please build the project and retry, or set the outputpath and assembly name properties appropriately to point to the correct location for the target assembly. The program compiles already so not sure what's up.
-
How can I get that project off there? I don't see any projects on there.
-
So I saw the link http://leadwerks.com/werkspace/index.php?/files/file/131-c-headers/ and now this. If I want to start getting into LE.NET what are my steps? What should I be using? Also, are there any preexisting builds already? I guess I can get VS Express 2010 *sigh*
-
Has anyone done any benchmarking between C++ vs C# with LE? How much slower is C#? Just a rough idea would be fine.
-
This will be the main thread where I update the status of scripting with C# in LE. I was able to the basic idea working without any LE code. My goal is to make a very basic editor that allows C# scripting where the C# script is compiled and ran in the editor live when the file is saved. I plan on having some kind of mechanism to allow for running the script live in the editor and/or both in editor and when running the game. Don't turn that dial!