Jump to content

ZioRed

Members
  • Posts

    1,133
  • Joined

  • Last visited

Everything posted by ZioRed

  1. Check the Pointer of the mesh: Mesh mesh = Mesh.Load("abstract::mymesh.gmf"); if (mesh.Pointer == IntPtr.Zero) { // mesh not found }
  2. ZioRed

    Quick code tip

    In my opinion the syntax Entity["Child1"] is ugly, I would prefer a more readable way: Entity.Children[index] and Entity.FindChildren(name). Well, eventually I find that the standard GetChild(index or name) is the most readable.
  3. ZioRed

    C# SVN

    Thank you for the link, I'll give a glance to the NET wrapper linked there. Tyler is currently playing with Leadwerks.Game library (and relative side projects as AI and UI).
  4. ZioRed

    C# SVN

    Update from SVN, it has been already removed from SVN one or two revisions ago.
  5. If you open class.lua in your Scripts folder you can see the default groups. I don't know LUA very well but may be you have a grid:GetGroup besides to grid:AddGroup. But in my opinion for your own model it should be more handy to have your own property groups for rapidly access them from editor's UI.
  6. Agree and possibly it would be nice if the version could be set in the DLL too to istantly understand what engine version is in a game (like we do in the wrapper).
  7. Yes please, post a sample code (with VS2010 and the latest wrapper) to test, so I can test both in NET and in C.
  8. If you are a modeller (or have one in your team) then I think you don't really need 3DWS/CGS. For the terrain generator someone has managed to use L3DT, you can read the instructions on wiki.
  9. The MAX plugin is not part of the engine, it was written by a user of this community. There is also a free plugin for Ultimate Unwrap 3D if you want to test the exporting from other formats.
  10. For the GraphicsWidth/Height I suspect you should use the control's GetSize() method (a better and more elegant way should be exposing the Size property of the control), since for the mouse move and hits you should try to use the control's MouseMove/Click as klepto's did for keys.
  11. ZioRed

    Quick code tip

    I'd say to leave them with the Obsolete attribute: [Obsolete("Use the new syntax: Entity[0]", false)] public Entity GetChild(int index) { return new Entity(Core.GetChild(this.Pointer, index)); } [Obsolete("Use the new syntax: Entity[\"YourEntityName\"]", false)] public Entity GetChild(string name) { return new Entity(Core.FindChild(this.Pointer, name)); } ..just not to break any project already working, for at least a couple of revisions.
  12. ZioRed

    C# SVN

    Not until 4.0 (we had to create a declaration for any optional parameter, that was really ugly), less code with default value for optional parameters. This is one of the reasons that kept us on 4.0 For the weight of 4.0, why should your clients have to download instead of including it in your setup? It's quite easy with something like InnoSetup.
  13. The Facebook shader renders very well your WIPs!! lol
  14. Sure, you can load the SBX scene files with code, and as already said Lazlo trust the C# headers even if they're not "official", they seems to work as well as the other standards (I use it and some others too it seems) and we keep them always updated to the latest C++ headers.
  15. For the error message box loading a scene you probably forgot to copy the Scripts folder into your compilation folder (if you don't set the LE folder as abstract path then you need to copy into your compilation folder at least the models and materials of the lights I think).
  16. Tried to set the body mass of Sphere?
  17. Found a problem and may be a solution: every call to the GameEntity events must check if the event has been assigned before calling it and must be commented the throw exception in the destructor. namespace Leadwerks.Game { public class GameEntity : Leadwerks.Entity, IDisposable { ...... ~GameEntity() { //throw new System.NotImplementedException(); } ...... protected virtual void OnFreeEntity(IntPtr entity) { if (FreeEntity != null) FreeEntity(this, entity); } } } With those changes to GameEntity I have no exception running the following VB code: Sub Main() Graphics.Initialize(800, 600) Framework.Initialize(False) Debug.Physics = True Collisions.Set(1, 1, True) Dim cube As Body = Body.CreateBox(1, 1, 1) cube.Mass = 1 cube.CollisionType = 1 Dim plane As Body = Body.CreateBox(10, 0.2, 10) plane.CollisionType = 1 plane.Position = cube.Position plane.Move(New Vector3(0, -1, 0)) Dim AmmoBody As Body = Body.CreateBox(1, 1, 1) AmmoBody.CollisionType = 1 AmmoBody.Mass = 1 AmmoBody.Position = cube.Position AmmoBody.Move(New Vector3(1.5, 0, 0)) Dim GameEntityObject As New GameEntity(AmmoBody.Pointer) AddHandler GameEntityObject.Collision, New CollisionEventHandler(AddressOf DeclareCollisionToScreen) While (Not Keyboard.KeyHit(Key.Escape) And Not Window.HasRequestedClose()) Framework.Update() Framework.Render() Graphics.Flip() End While Framework.Terminate() End Sub Sub DeclareCollisionToScreen(ByVal Sender As Object, ByVal e As CollisionEventArgs) Drawing.Text(e.Entity0.ToString, 50, 50) End Sub
  18. Have you tried to run it as administrator? That usually do the trick for me with some other programs.
  19. I think to remember that probably will be introduced methods to set the near/medium/far ranges (which would perfectly fit your and mine situations).
  20. ZioRed

    C# SVN

    mmh... well I'll download and install VB express 2010, I'd suggest to go to 2010 versions since however the DLL is compiled for .NET Framework 4.0 and you need to do some changes to compile it for 3.x or older (expecially for the optional parameters in the function declarations which all use the new syntax). I will try and let you know if any issues. @Lazlo: for the public SVN I suggested some other repository which allows private SVN like XP-dev. The thing is that we need to manually add any member and this is bad :/ again, I cannot see how a wrapper would influence piracy, a team who wants to sell games MUST own a legal copy, who don't sell mostly don't produce AAA games which is what LE needs EDIT: @Rekindled: I tried a simple "Hello world" project in VB 2010 with the latest DLL and found no problems during compilation.
  21. Have you called FreeWorld()+CreateWorld() with the transparency world I suppose?
  22. Networking lag mostly depends on the amount and weight of the messages (of course the host connection speed is crucial), but I bet that if your messages are light enough than you should not have problems with lag/sync even on home connections (unless your players aren't playing from a 56K modem ). However a good library as RakNet as already told here seems to be the most clicked on C++ (I use Lidgren on C# but I haven't still really tested its performance). About the LE Netwerk, even Josh often suggests to use a specific networking library for a deeper use of network.
  23. ZioRed

    C# SVN

    New version available: 1.32.8 Log message - Updated the declaration of Core.EntityViewRange to the latest headers - Added all the missing operators towards scalar values to Vector2, Vector3, Vector4 and Vector6 - Added missing key codes (Key.Print, Key.Section) - Added ViewRange enum to use with Entity.SetViewRange - Moved the static property Engine.Log to Logger.Enabled and changed its type to bool - Updated the LogMode enum values to the latest headers
  24. I see nor "Attach" button neither "add to topic". In the "Edit tutorial" page I see only two file fields in the box "Attachments" but there I see no button "Attach" (I'm using Chrome, but have tried with IE and Firefox too).
  25. I'm trying, going to EDIT TUTORIAL, select a ZIP file in one of the two Attachs fields and click SAVE, but it doesn't appear at the end of the article. Agree, may be it's better the internal counter as order field. A global text search in all tutorials may be also useful to find something.
×
×
  • Create New...