Jump to content

Yue

Members
  • Posts

    2,449
  • Joined

  • Last visited

Everything posted by Yue

  1. Yue

    Astrocuco

    --################################################## --# Proyecto : Astrocuco --# Scripter : Yue Rexie. --# Sitio Web : https://www.iris3dgames.xyz --# Fichero : CSound.lua --################################################## --# Notas : Clase CSound para crear objeto --# Sound. --################################################## CSound={ Create=function(self) local this={} setmetatable(this,self) self.__index = self function this:Init() self.sSteps = Sound:Load("Sound/Caminar.wav") self.source = Source:Create() self.source:SetSound(self.sSteps) self.source:SetLoopMode(true) self.sSteps:Release() self.source:Pause() self.source:SetVolume(1) self.Hud = World:GetCurrent():FindEntity("Hud") System:Print(">>>### OBJETO SOUND CREADO ###<<<") end function this:Update() self.source:SetPitch(0.9) if self.Hud.script.gLife > 1 then if player:GetAirborne() == false then -- Player Walk. if Window:GetCurrent():KeyDown(Key.Shift) == false then if Window:GetCurrent():KeyDown(Key.W) or Window:GetCurrent():KeyDown(Key.S) then if self.source:GetState() == Source.Paused then self.source:Resume() end else self.source:Pause() end else self.source:SetPitch(2) -- Player Run. if Window:GetCurrent():KeyDown(Key.W) or Window:GetCurrent():KeyDown(Key.S) then if self.source:GetState() == Source.Paused then self.source:Resume() end else self.source:Pause() end end else self.source:Pause() end else self.source:Pause() end end this:Init() return(this) end }
  2. Yue

    Astrocuco

    Satellite out of range
  3. Yue

    Radar.jpg

  4. What I did was to try to understand the system and create my own script, so I can learn a little bit about the subject. This is only a prototype. --################################################## --# Proytecto : Astrocuco --# Scripter : Yue Rexie. --# Sitio Web : https://www.iris3dgames.xyz --# Fichero : Hud.lua --################################################## --# Notas : Script enganchado a la entidad --# MiniMap. --################################################ Script.map = nil --entity "Map Mesh" function Script:Start() self.entity:SetProjectionMode(Camera.Orthographic) self.texture = Texture:Create(256,256) self.mtl = Material:Create() self.mtl:SetShader("Shaders/Model/Diffuse.shader") self.mtl:SetTexture(self.texture) --self.mtl:SetColor(1,0,0) self.map:SetMaterial(self.mtl) self.entity:SetRenderTarget(self.texture) self.map:SetParent(World:GetCurrent():FindEntity("CameraPlayer"),true) self.map:SetPosition(-1,0,1,false) --self.entity:SetZoom(250) self.entity:SetFOV(45) end function Script:UpdateWorld() self.posPlayer = player:GetPosition(true) self.rotPlayer = World:GetCurrent():FindEntity("CameraPlayer"):GetRotation(true) self.entity:SetPosition(self.posPlayer.x, self.posPlayer.y+40, self.posPlayer.z, true) self.entity:SetRotation(90,self.rotPlayer.y,0,false) end function Script:PostRender(context) context:DrawImage(self.texture,0,context:GetHeight()-128,128,128 ) end
  5. My tests seem to fit what I need, but the drawback is that the camera that follows the character always has to look at the cube that renders the material with that texture so that it is updating the texture where the mini map is displayed. Any suggestions?
  6. "In Leadwerks 4, render-to-texture was accomplished with the SetRenderTarget command, which allowed a camera to draw directly to a specified texture, while hiding the underlying framebuffer object (FBO). In the new engine we have a bit more explicit handling of this behavior. This is largely in part due to the use of Vulkan's bindless design, which greatly improves the context-binding design of OpenGL. The Leadwerks "Buffer" class was never documented or officially supported because the underlying OpenGL functionality made the system pretty messy, but the design of Vulkan simplifies this aspect of graphics." I have been left with this information that points me in the right direction to create a mini map. The Hud Elements store example shows the Buffer command, but I guess with the camera command you can create a mini map without any problem. The question Josh is can I apply a transparent texture to that rendering to make the mini map look round? SetRenderTarget
  7. I was looking at the script, however I see commands called Buffer and strange things that are not documented. My question is, using SetRenderTarget is equivalent to the same thing? At this point it is rendering what a camera sees in a texture or material.
  8. I want to have some clue how to create a mini map in Leadwerks that marks the position on the ground of the player and some targets. Someone who's experience can point me in the right direction please.
  9. I'm already thinking about the footprints my character will leave on the Martian terrain.
  10. Yue

    Astrocuco

    Thank you very much for your comment. It is a great idea. I'm working on other game stuff now, but your comment is much appreciated. Here I show an access to a shelter.
  11. For some reason it doesn't seem to work.
  12. My character has a dangling head that swings like a bell from side to side.
  13. Yue

    Astrocuco

    Resources are in order. Scrap, polymer, electronics, and erythropoietin.
  14. Yue

    Astrocuco

    There will be a total of three resources, Scrap, Polymer and electronic components. This is intended to make repairs, build facilities and thus improve them. Other than that we have health kit, oxygen kit and activities to improve endurance. The inventory menu will be at the bottom, something very simple.
  15. How can I update the position of a widget on the screen. The idea is to hide the widget and when pressing a key it will progressively show up towards its final position
×
×
  • Create New...