Jump to content

Yue

Members
  • Posts

    2,302
  • Joined

  • Last visited

Everything posted by Yue

  1. Me watching all this passively.
  2. Yue

    Player Script DevLog

    Experimenting with rigid bodies in the ragdoll, I think this lends itself to many interesting things. For example, when the player takes damage to certain parts of the body, for example, the head, or an arm.
  3. Something happens, and from my point of view that I don't speak English, that I have struggled with many things in programming, and I will never consider myself a programmer. The documentation could be much more specific for novices coming for the first time to a development environment as do other engines, but it is what it is and what works for many here. I think you will go through the same thing I did, some time to understand how things work, some time to apply what you learn and some time to think about making a video game. The initial learning curve is usually hard in almost everything, but after you understand a concept, you move on to any tool without any inconvenience. Translated with www.DeepL.com/Translator (free version)
  4. function :Message( message ) System:Print(message) end Esto es una simple función personalizada en Lua script y que funciona en Leadwerks. Si me tocará documentar esta función haría lo siguiente. Message( string message ="Mi message" ) Of course, this is reinforced by an example of its use. Message("Hello World")
  5. The first parameter is a string, a text string that is enclosed in double quotes, the example "Leadwerks" is enclosed in double quotes with the simulated equality. The X and Y parameters are set as number values, and the example is set to the numbers 0,0, where the window will be drawn in the upper left corner of the screen. The following parameters are completely equal, for width and height. And e of the flags is to determine if the window goes to full screen mode, if it is drawn centered. Translated with www.DeepL.com/Translator (free version)
  6. I believe the navigation system is not compatible with the Leadwerks terrain.
  7. Yue

    Player Script DevLog

    function this:Start() self.skeletal = CBones:New() self.bodies = CBodies:New() self:SetPositionBodies() --self:SetRotationBodies() self:GetPositionBodies() self:StartJoints() self:SetRotationBodies()-- Here Solved Problem. end And this is where for a long time I have suffered with the rag doll effect. Create the joints and then rotate them in relation to the bones, there is only this possibility, if you do it too early, the ragdoll effect does not work correctly.
  8. -- *********************************** -- Proyecto : Astrocuco -- Scripter : Yue Rexie -- Fichero : CPlayer.lua -- *********************************** -- Notas : Clase CPlayer para -- crear el objeto Player. -- *********************************** import ("Scripts/Class/CCamP.lua") import ("Scripts/Class/CMove.lua") import ("Scripts/Class/CAnimP.lua") import ("Scripts/Class/CHudP.lua") import ("Scripts/Class/CItemsV.lua") import ("Scripts/Class/CInven.lua") import ("Scripts/Class/CRag.lua") CPlayer={ camera = nil; move = nil; anim = nil; hud = nil; itemsV = nil; inven = nil; rag = nil; New = function (self) local this={} setmetatable(this,self) self.__index = self function this:Init() self.window = Window:GetCurrent() self.camera = CCamP:New() self.move = CMove:New() self.anim = CAnimP:New() self.hud = CHudP:New() self:StartHud() --self.itemsV = CItemsV:New() self:StartInven() self.rag = CRag:New() System:Print(">>> ### CREANDO OJBETO PLAYER... ¡OK! ### <<<") end function this:StartInven() self.inven = CInven:New() end function this:StartHud() self.hud = CHudP:New() end -- Update Player. function this:Update() self.camera:Update() self.move:Update() self.anim:Update() self.inven:Update() self.rag:Update() end function this:DrawHud() self.hud:Draw() end this:Init() return(this) end } This is my workflow for a character in Leadwerks. I think my hobby is to learn things and improve my skills, maybe someday I'll make a video game.
  9. An object is a list of attributes that represent an object to us as programmers. In the real world we have objects like a ball, it has properties like color, material, and events that are triggered for example when the ball is kicked. This ball can be in another much larger object, a soccer stadium, where there are objects such as the field, the players, the referee. The idea of objects in programming, is that you work in smaller parts that are then of larger ones. Leadwerks has objects, such as the Windows object, which in turn has a context. So when you understand this, it is much more fun to program and you won't feel like your brain is going to explode, but you need time to assimilate these things and perceverance. Translated with www.DeepL.com/Translator (free version)
  10. What happens is that your game will be big as time goes by, and object oriented programming aims to break a huge program into smaller parts, the only thing I can think of and from my own experience is that it will take some time when you learn to program and understand Leadwerks. And then if you take the step to create a game. What I am trying to explain is that you have two options, one is to write your entire program in a single file, this would be equivalent to writing on an Egyptian paper, this will create spaghetti code, if you write your program as a book, separated by sheets, chapters and paragraphs. Because the hardest part is when you start debugging your program and most of the bugs are just in our coders head. And something important, don't give up. Translated with www.DeepL.com/Translator (free version)
  11. Yue

    Player Script DevLog

    It seems that this time I will succeed, the idea is to activate the ragdoll effect, and if the player still has life he will stand up. And if the life is at zero, he will not stand up. @Josh
  12. Yue

    Player Script DevLog

    Test to restore skeleton after the ragdoll effect, the idea that the character after activating the effect can stand up again. This test implies that by means of an animation I can restore it to its standing position. This is not conclusive, as I have to see how I attach the bones to the rigid bodies.
  13. -- *********************************** -- Proyecto : Astrocuco -- Scripter : Yue Rexie -- Fichero : CInput.lua -- *********************************** -- Notas : Clase CInput para -- crear el objeto Input. -- *********************************** CInput={ window = nil; New = function (self) local this={} setmetatable(this,self) self.__index = self function this:Init() self.window = Window:GetCurrent() System:Print(">>> ### CREANDO OBJETO INPUT... ¡OK! ### <<<") end function this:KeyHit(CodeKey) return (self.window:KeyHit(CodeKey)) end function this:KeyDown(CodeKey) return ( self.window:KeyDown(CodeKey)) end function this:FlushKeys() self.window:FlushKeys() end function this:MouseDown(CodeKey) self.window:MouseDown(CodeKey) end this:Init() return(this) end } Check out some of my object-oriented flow programming. Esto es una clase, y por lo regular la pongo en un fichero aparte. Ahora el siguiente paso es construir un objeto de esa clase. -- File Main.lua import("Class/CInput.lua") input = CInput:New() -- Sample. if input:KeyDown(Key.F) then System:Print("Key F Down") End Remember from the beginning that your whole game is one big object, which must be made up of other objects. Think of it as a car, a single object that has other objects, the wheels object, the chassis object, the engine object, the steering wheel object. All these objects must communicate with each other, the pedal object when pressed accelerates the motor object and makes the car move. The Main file, is the input file to the program, the rest are the way to structure your code. The entities within a map can be assigned scripts, but everything internally is executed from the Leadwerks core in a Loop depending on the case or at the start of the game.
  14. I think a camera would have a command to render shadows or not. RenderShadows(false), this would be very useful to save resources.
×
×
  • Create New...