Jump to content

Search the Community

Showing results for tags 'lua'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Categories

  • Models
    • Animals
    • Barriers
    • Characters
    • Containers
    • Environments
    • Furniture
    • Props
    • Rocks
    • Vegetation
    • Vehicles
    • Weapons
  • Materials
    • Brick
    • Cartoon
    • Decals
    • Dirt
    • Grass
    • Industrial
    • Medieval
    • Metal
    • Plastic
    • Plaster
    • Rock
    • SciFi
    • Sky
    • Signs
    • Tile
    • Stone
    • Walls
    • Wood
  • Scripts
    • GUI
    • Object
    • Utilities
  • Shaders
    • Post-Processing Effects
    • Surface
  • Sounds
    • Ambience
    • Effects
    • Music
  • Tools
  • BATTLE LEAGUE's Assets
  • BATTLE LEAGUE's Mods

Blogs

There are no results to display.

There are no results to display.

Forums

  • Leadwerks
    • Technical Assistance
    • General Discussion
    • Programming
    • Game Art
    • Suggestion Box
    • Bug Reports
  • Platforms
    • Windows
    • Mac
    • Linux
  • Community
    • Showcase
    • Promotion
    • Off-topic
  • BATTLE LEAGUE's Topics
  • Vec-Tec's Releases
  • Vec-Tec's Topics
  • Forth's Development
  • Forth's Game design
  • Forth's Graphics
  • Forth's Documentation
  • Forth's TODO
  • Forth's IMPORTANT
  • Forth's Screenshots
  • The uncertain world's Game Design
  • The uncertain world's Programming
  • The uncertain world's TODO
  • The uncertain world's Graphics
  • The uncertain world's Screenshots

Categories

  • Records
  • Entity
  • Command Reference
  • Vec3
  • Vec4
  • Script Reference
  • Shader
  • Index
  • Material
  • Object
  • Buffer
  • Asset
  • Font
  • Shape
  • Sound
  • Texture
  • App
  • Context
  • Model
  • Light
  • DirectionalLight
  • PointLight
  • SpotLight
  • Attractor
  • Camera
  • Emitter
  • Listener
  • Pivot
  • Bone
  • Sprite
  • FileSystem
  • Key
  • Source
  • Surface
  • Math
  • AABB
  • dVec3
  • Mat3
  • Mat4
  • Plane
  • Transform
  • Vec2
  • Vec3
  • Vec4
  • Mutex
  • Prefab
  • PickInfo
  • Map
  • Stream
  • System
  • Thread
  • Time
  • Window
  • World
  • Driver
  • SoundDriver
  • GraphicsDriver
  • PhysicsDriver
  • OpenGL2GraphicsDriver
  • OpenGLES2GraphicsDriver
  • OpenALSoundDriver
  • NewtonDynamicsPhysicsDriver
  • Draw
  • Color
  • Blend
  • Joint
  • Debug
  • Component
  • Steamworks
  • LensFlare
  • Vehicle
  • Decal
  • Quat
  • Leaderboard
  • Probe
  • Analytics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Location


Interests

Found 362 results

  1. Supposing you want to implement a quest system where each quest is a lua script. quest_101.lua quest_102.lua quest_103.lua ... In each quest script I want to call function "Update()" in a chain. Similar to how TModel LUA scripts are processed. Is it good practice to create a virtual machine for each script? Or use one VM and call the "Update()" function in each script? And if not, what is the correct way to index them and call the same function in each script? example source Local vm:Byte Ptr = luaL_newstate() luaL_openlibs(vm) lua_dofile(vm, AbstractPath("abstract::quest_101.lua")) lua_getfield(vm, LUA_GLOBALSINDEX, "Update") lua_pushinteger(vm, 0) lua_call(vm,1,0) script "quest_101.lua" function Update(s) -- mission update code here end
  2. Since all the old tutorial pages are gone, here is a zip file containing all the PDF files and source code of the Lua tutorials. Download http://www.leadwerks...tutorial-files/ Youtube playlist http://www.youtube.c...eature=view_all Happy scripting!
  3. I use Leadwerks Engine 2.5 Evaluation, but in it there is one problem. In lua i use function of SetPositionf, but result not display. In what may be the problem?
  4. I was wondering how someone would go about packing things into password files. If I were to load all map files (models etc) into a packaged file would they still be able to access each other, and would I be able to put scripting in there and still have everything load perfectly? I am just not sure and want some clarification. Thanks in advance.
  5. Monster trucks that is, not the big teeth, flesh eating scaled skin variety. This started as a thought exercise and turned into the start of vehicle AI. The truck has auto steering which will steer the truck to a designated point, as demonstrated in the opening of the video. Currently the truck has no brakes an a far too high torque acceleration, but it was more fun. Eventually the nodes that are used for steer to points will become info nodes that will set things like braking distance and max speed amongst other things. This was recorded realtime in the Leadwerks 2.5 editor with the trucks AI scripted in Lua.
  6. I have seen some posts about the lack of LUA support for syntax coloring in Visual Studio. Nothing could be less true. Of course there is LUA syntax coloring in Visual Studio. Here is how to. In VS open the extension manager and search for LUA, choose 'Lua Language' and install. There you are Edit: No Lua Intellisense though.
  7. Josh

    Design Confusion

    Sometimes I run into situations where I don't really know how to structure things. I don't mind this, because it usually results in some really elegant design once I figure out what to do. I just play with ideas and try not to force anything, and when the right idea arises, I will recognize it. Explaining a problem to someone else can help facilitate that process. How many times have you solved a difficult problem right after you posted a description of it on a forum somewhere? The procedure of explaining it logically to someone else can help you think more clearly about it. And so, we have today's blog topic. Below is a very rough start to the script editor. The syntax highlighting system was written about a year ago, and works beautifully, using the native text widget on both Windows and Mac. In the Leadwerks3D source code, there is a base class called an "AssetEditor". From this class the material, model, shader, texture, font, and script editor classes are derived. Like the other asset editor windows, only one instance of the script editor window will be allowed open at any time. Unlike the other asset editor windows, which display only one asset at a time, the script editor will use tabs to display multiple files. Scripts aren't a typical asset like a material or a model, so it's fine for them to behave a little differently. Any Leadwerks3D application can have its Lua state debugged. The engine uses networking commands to communicate with a debugger on a specified port. This means the engine can communicate with a debugger whether it's part of a C++ program, C# app, or standalone Lua interpreter. The debugger can display the Lua callstack and shows all variables and values in the Lua state, including full examination of C++ objects and members! I do not intend for Leadwerks3D to "play a game" in the editor. We've tried that approach and there are a lot of problems. I want Leadwerks3D to be a very solid and stable level editor, with a visual interface to do everything you need. I also want better consistency between Lua and C++ programs. Therefore, Leadwerks3D will use a run game system more similar to 3D World Studio than the Leadwerks Engine editor. A dialog will allow you to choose the application to run, command-line parameters, and other settings. These will be saved between sessions, so you can hit a key to do a "Quick Launch" and run your game. It would be possible to hook the Lua debugger into any application as it is launched, which could be very helpful. Let's go back to the script editor now. My inclination is to have F5 launch an interpreter and call the script for the currently selected tab. However, I don't think it's a good idea to use multiple game launch modes, I already described a uniform game launch mode for both Lua and C++ applications, but that seems sort of counter-intuitive if you are working in the script editor and just want to run something really quickly. There;s also the question of whether we want to provide a standalone script editor and debugger outside of Leadwerks3D. Or should the debugger be a standalone application as well, since someone might want to use it with a C++ application? You see there are a lot of options and a lot of possible ways to set this up. What about Lua compile errors? I can print that out in the engine log, but how will the editor display it? If a compile error occurs, should the program pause and display the line it occurred at? What if the user just doesn't care, and wants the program to keep going? Alternatively, the user may want to just hit F5 in the script editor and check for basic syntax errors, which the command LuaL_LoadString() will detect. That's pretty much all my questions at this point. I don't expect anyone to come along and solve my problems, but the process of describing and discussing the issues will help me come to a resolution.
  8. To prevent non Leadwerks Engine specific/Related entries from my Blog being automatically published here via the Blog Feed, I have removed that functionality, and will simply add a new entry title and link here for all Leadwerks Engine specific/Related entries. Leadwerks Related Blog Entry. Meet The Flockers.
  9. Hi all little wip rollercoaster demo as i spent time in algos for my wip race car game, i discovered some code from "The Masked Coder" which displays some Bsplines in a little demo, as i liked it, i made it in 3D with Leadwerks 2.5 in Lua. hope you like it here link : ps: sorry for lags due to camstudio got always 60fps without it note: no sound
  10. Is there a way to free a material in lua? I've tried FreeMaterial(mat) and mat:Free() and both give me an error saying they don't exist.
  11. Hi guys, finally I have some more freetime back and have restarted developing with Leadwerks more intensively in C#. Currently I'm working on multiple extensions for the .NET Wrapper of Leadwerks and I'm also finishing / continuing developing my tools. Later I hope this will all fit in one easy to use framework. First here is a screen of new nightsky texture used in my lua daynight script (not completely correct scaled) : the texture was made by taking screenshots from the stellarium software ( http://www.stellarium.org ) and building a cubemap out of them. Also I have started an advanced 2D Library for Leadwerks.Net : This is the current 2D code for the image above: public void Render() { Drawing2D.Enabled = true; //Enables Rendering of 2D Elements in native OpenGL Drawing2D.SetViewRotation(m_angle2, 1024f/ 2f, 768f / 2f); //Rotates the complete Viewport around given point Drawing2D.SetBlend(BlendMode.Alpha); // Set differten Blendmodes Drawing2D.SetColor(255, 0, 0, 1.0f); // Set Color for the following drawing calls Drawing2D.DrawLine(0, 0, 1024, 768); // Draws a line Drawing2D.SetColor(0, 255, 0, 0.5f); Drawing2D.DrawLine(0, -100, 1024, 768); Drawing2D.SetColor(0, 0, 255, 0.5f); Drawing2D.DrawLine(0, 100, 1024, 768); Drawing2D.SetColor(255, 0, 255, .5f); // Set the Drawing Handle of the next items to draw //(eg: normally all items are rotated at their local [0,0] coordinate, this function offsets this point by the given point) //values of 10,10 would rotate the following rects around their center. Drawing2D.SetHandle(50, 50); for (int i = 0; i < 150; i++) { if (i % 2 == 0) Drawing2D.SetRotation(m_angle); //Sets current rotation for the following drawings else Drawing2D.SetRotation(-m_angle); Drawing2D.DrawRect(10.24f + i * 10.24f, 7.68f + i * 7.68f, 20, 20); // Draws a rect } m_angle += 0.02f; m_angle2 += 0.04f; Drawing2D.Enabled = false; // Disables raw OpenGL Mode } The module will have its own Image handling (Leadwerks textures can be used as well) and much more. This is a brief overview and will be continued...
  12. After uploading my first lua snippet i'm continuing my task to develope useful tools for Leadwerks Engine. What tools you may ask? The first, a batch texture converter is ready since a long time, but needs some tweaking here and there. A beta was previously published but i want to get this tool out of the beta and will release a finished version the next days. The next one is to finish my milkshape exporter (animations still doesn't work) but the rest is faster and less buggy. The main tool I'm currently developing is a small helper which i call "Asset Helper". What does this exactly mean? Well everyone who ever have bought a model pack from one of the modelshops around the web may know this problem. You download it and want to play with it in the Leadwerks Editor. Unfortunatly in most cases this doesn't work at first. You need to: -convert the model to the gmf format -create correct material files -create lua scripts -give proper names to have a good structures view in the Editor -and some things more / depends on the pack What does my tool do? In a first version of my tool I tried to do the above steps completely automatically with just a parameters given at startup, but this aproach fails as expected. It was working with some modelpacks but mostly it fails. So my new approach is a semi-automatic tool: First it will scan and analyse a given directory recursivly and collects all needed data like available models, are there already GMF models or do we need to convert from fbx. It collects every texture it found and like the GenMat tool it will try to find proper texture pairs to build material files. In a last prestep it will scan the converted meshes and get the needed materials or marks missing materials. The next step is done by the user: Choose which models to pack into the asset library. Assign missing textures, rename them etc. . You will also be able to choose a scale value for every single model or choose a scale for all models. The analyser will also attach a basic lua file to each model so you have proper dialogs in the editor. The last step will be to choose an asset name, a package name (optional) and a password (also optional). After a click on start the whole process will start and you will get a nice pak file or a directory structure which you only need to copy into your Game folder. I hope that I have a small Update next time, maybe a screenshot. See ya, klepto2
×
×
  • Create New...