• Content count

  • Joined

  • Last visited

  • Days Won


Einlander last won the day on September 23

Einlander had the most liked content!

Community Reputation

254 Excellent

About Einlander

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

6,323 profile views
  1. This is a simple script that will let you get the desktops current resolution. It has not been tested in linux. It creates a hidden window, Maximizes it, and gets the window size. That's it. It returns a Vec2(). DO NOT USE IF THE PROGRAM IS ALREADY FULLSCREEN. It will cause you some annoyances. function GetDesktopResolution() --Vec2() -- get current desktop resolution ; Super quick and dirty method, works on windows dont know about linux local launchertestwindow = Window:Create(System.AppName,0,0,1024,768,Window.Tool) launchertestwindow:Maximize() local desktopres = Vec2(launchertestwindow:GetWidth(),launchertestwindow:GetHeight()) launchertestwindow:Release() return desktopres end
  2. Yes, It's in the Window Mode option.
  3. @DoomSlayer This is a work around that I created
  4. This is a launcher that starts before your game allowing players to set the game's graphical options. This was created to solve the issue of Leadwerks starting at the highest resolution of the monitor, instead of the current desktop settings. It uses a quick and dirty method to get the desktop resolution. THIS HAS NOT BEEN TESTED ON LINUX!! If this works on linux let me know, or if you made any changes to make it work. The script is to be loaded with your game and launched before the main window is created. There are some modifications to main.lua but they are very simple. Here is the script. Save it as Launcher.lua in the same folder as Menu.lua To use it, first add: import("Scripts/Launcher.lua") to the top of Main.lua. Next add LauncherMenu() After the title line. Lastly, change: window=Window:Create(title,0,0,gfxmode.x,gfxmode.y,windowstyle) to window=Window:Create(title,0,0,gfxmode.x,gfxmode.y, LauncherWindowMode) This is all that needs to be done. In action:
  5. If you use the in game menu to change the lighting quality, the lighting seems to be disabled. The shadows disappear and it looks like the scene is only lit with ambient light.
  6. It would be interesting if the asian market latches on to Leadwerks since it is a lower long term cost than Unity and Unreal. Thats a huge market. Them and russia.
  7. "current" desktop resolution. Like if I play this on my TV using HDMI/VGA out. I would want it to run at 720p, but Leadwerks would default to 1080i and I wouldn't want that.
  8. Hey now, I like utf8, I have just never had to deal with coding anything Unicode on Linux. All os's could have conflicting implementations. Is there a bsd/public domain lib that handles Unicode ?
  9. I would make sure that the rest of the engine works with utf8 and let lua itself fail with the encoding. 5.3 has utf8 support https://www.lua.org/manual/5.3/manual.html#6.5 but it's not very robust. Since it is still early, you do have the option to choose Lua derived language or a completely different language not based on Lua. As distasteful as it may be the API is changing, the scripts will need to be updated and it might be simpler to start over early with something else. Who knows.
  10. PSA: When using the Tabber, getsize().y does not take into account the size of the tabs up top.



    to get the actual bottom of the tabber.

    1. Josh


      GetSize() should include the tab height, GetClientSize should not: https://www.leadwerks.com/learn?page=API-Reference_Object_Widget_GetClientSize

    2. Einlander


      Good to know. That command always seemed odd to me, now i know exactly what it does.

  11. There really should be a function to get the desktop resolution.
  12. I found this blog post a few days ago through reddit to be insightful. https://www.joelonsoftware.com/2003/10/08/the-absolute-minimum-every-software-developer-absolutely-positively-must-know-about-unicode-and-character-sets-no-excuses/ It made me realise everything other than utf-16 is basically a beautiful hack. it also speaks to the about wcs functions in c++
  13. Ditched my old lobby design and started using tabs.


    A lot more space, and more clear what the player is doing.

  14. Been majorly procrastinating on my project because I don't look forward to making a scaleable lobby gui.

    1. Show previous comments  23 more
    2. Josh


      It seems like maybe some kind of pipe to direct events is what you want.  Like a C++ actor class that receives events.

      That is hard to decide.  You don't want to do like wxWidgets and have a class for every single widget you create (Gah!).  I have phased callbacks / function pointers out of the engine in preference for the C++ actor class or Lua scripts.

      Maybe something like this:

      class EventHandler
        bool ProcessEvent(const Event& event)
          if (event.source == mything)
            //do some stuff
            return false;
          return true;

      This is how I handle events in Leadwerks Editor.

    3. Josh


      (Each added EventHandler would have its ProcessEvent() function called, and the loop would exit if any function call returned false.)

    4. Einlander


      Sounds like a good solution.