-
Posts
2,449 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Yue
-
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.
-
-
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)
-
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")
-
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)
-
I believe the navigation system is not compatible with the Leadwerks terrain.
-
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.
-
-- *********************************** -- 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.
-
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)
-
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)
-
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
-
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.
-
-- *********************************** -- 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.
-
I think a camera would have a command to render shadows or not. RenderShadows(false), this would be very useful to save resources.
-
Dealing with the implementation of the Rag Doll effect. Whenever I repeat something, I always find the best way to do it.
-
The funny thing is that we have to create something that people like and not just that we like. Look at trends, marketing research. On the other hand, sales, advertising, should be considered part of the investment in the development, it is what the big studios do, so everything is summarized in capital for the project that even if the game is very bad, a good marketing will make it visible at least for a critique and that people know about it. Translated with www.DeepL.com/Translator (free version)
-
Structuring the rag doll effect system.
-
In my case, what has worked is to completely clean the main.lua file, and start from scratch, with the documentation in hand. this is like anything in life, to learn to play music, you learn by playing an instrument, and the same thing happens, you learn to program by programming. So what I do is to have the main.lua file and many files represented in objects through the use of tables (classes), and then these objects communicate with each other. The example is not to build a wall of a single block, as in prefabricated houses, but as is done here in Latin America, walls with several blocks, bricks that make up our program, if one fails it will not be necessary to knock down the entire wall. This has taken me several years to learn after trial and error. But I am sure that if you put your heart into it, you will learn something new and that is gratifying when we gain experience in something and make it applicable.