Jump to content

Pleca

Members
  • Posts

    35
  • Joined

  • Last visited

Profile Information

  • Location
    United Kingdom

Recent Profile Visitors

7,393 profile views

Pleca's Achievements

Collaborator

Collaborator (7/14)

  • Collaborator
  • First Post
  • Conversation Starter
  • Dedicated
  • Reacting Well

Recent Badges

29

Reputation

1

Community Answers

  1. So I guess AUDIOFILTER_REVERB_CAVE is 9? That's the one I wanted to use.
  2. In the documentation, the example for Speaker:SetFilter throws an error after pressing the space key (which activates the Speaker:SetFilter function). https://www.ultraengine.com/learn/Speaker_SetFilter?lang=lua Example: --Get the displays local displays = GetDisplays() --Create a window local window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[1], WINDOW_CENTER + WINDOW_TITLEBAR) --Create a world local world = CreateWorld() --Create a framebuffer local framebuffer = CreateFramebuffer(window) --Create a camera local camera = CreateCamera(world) camera:SetClearColor(0.125) camera:SetFov(70) camera:SetPosition(0, 0, -3) camera:Listen() --Create a light local light = CreateBoxLight(world) light:SetRotation(35, 45, 0) light:SetRange(-10, 10) --Create a box local box = CreateBox(world) box:SetColor(0, 0, 1) --Sound local sound = LoadSound("https://raw.githubusercontent.com/UltraEngine/Documentation/master/Assets/Sound/notification.wav") local speaker = CreateSpeaker(sound) speaker:SetLooping(true) speaker:SetPosition(box:GetPosition(true)) speaker:Play() speaker:SetRange(10) --Main loop while window:Closed() == false and window:KeyDown(KEY_ESCAPE) == false do --Add filter when space key is pressed if window:KeyHit(KEY_SPACE) then speaker:SetFilter(AUDIOFILTER_REVERB_SEWERPIPE) end --Move and turn with the arrow keys - best experienced with headphones if window:KeyDown(KEY_UP) then camera:Move(0, 0, 0.1) end if window:KeyDown(KEY_DOWN) then camera:Move(0, 0, -0.1) end if window:KeyDown(KEY_LEFT) then camera:Turn(0, -1, 0) end if window:KeyDown(KEY_RIGHT) then camera:Turn(0, 1, -0) end world:Update() world:Render(framebuffer) end return 0 Error: [sol2] An error occurred and has been passed to an error handler: sol: runtime error: stack index 2, expected number, received nil: stack traceback: [C]: in method 'SetFilter' [string "G:\development\ultraengine\testbloomeffect\source\main.lua"]:42: in main chunk sol: runtime error: stack index 2, expected number, received nil: stack traceback: [C]: in method 'SetFilter' [string "G:\development\ultraengine\testbloomeffect\source\main.lua"]:42: in main chunk Error: [string "G:\development\ultraengine\testbloomeffect\source\main.lua"]:42: in main chunk
  3. Hello Josh, I'm encountering these errors with new Bloom effect in Lua Project: Error: Failed to compile "G:/Development/UltraEngine/TestBloomEffect/Shaders/PostEffects/BloomPrefilter.frag" ERROR: 0:4: '#version' : must occur first in shader ERROR: 0:4: '#version' : bad profile name; use es, core, or compatibility ERROR: 0:4: '#version' : bad tokens following profile -- expected newline ERROR: 0:4: '' : compilation terminated ERROR: 4 compilation errors. No code generated. Error: Failed to compile "G:/Development/UltraEngine/TestBloomEffect/Shaders/PostEffects/BloomDownSample.frag" ERROR: 0:4: '#version' : must occur first in shader ERROR: 0:4: '#version' : bad profile name; use es, core, or compatibility ERROR: 0:4: '#version' : bad tokens following profile -- expected newline ERROR: 0:4: '' : compilation terminated ERROR: 4 compilation errors. No code generated. Error: Failed to compile "G:/Development/UltraEngine/TestBloomEffect/Shaders/PostEffects/BloomUpscaleCombine.frag" ERROR: 0:4: '#version' : must occur first in shader ERROR: 0:4: '#version' : bad profile name; use es, core, or compatibility ERROR: 0:4: '#version' : bad tokens following profile -- expected newline ERROR: 0:4: '' : compilation terminated ERROR: 4 compilation errors. No code generated. Error: Failed to compile "G:/Development/UltraEngine/TestBloomEffect/Shaders/PostEffects/BloomFinalPass.frag" ERROR: 0:4: '#version' : must occur first in shader ERROR: 0:4: '#version' : bad profile name; use es, core, or compatibility ERROR: 0:4: '#version' : bad tokens following profile -- expected newline ERROR: 0:4: '' : compilation terminated ERROR: 4 compilation errors. No code generated.
  4. Thank you Josh, it's working now.
  5. Here is a simple font test project using the example from the docs. There's a possibility I'm doing something wrong, but I really don't know what. FontTest.zip
  6. Yeah, you're right font isn't loaded, so it's NULL. However, I created a new project and tried running the example from the docs, and I got the same result. -- Get the displays local displays = GetDisplays() -- Create a window local window = CreateWindow("Ultra Engine", 0, 0, 1280, 720, displays[1], WINDOW_TITLEBAR + WINDOW_CENTER) -- Create a framebuffer local framebuffer = CreateFramebuffer(window) -- Create a world local world = CreateWorld() -- Create a camera local camera = CreateCamera(world, PROJECTION_ORTHOGRAPHIC) camera:SetClearColor(0.125) camera:SetPosition(framebuffer.size.x * 0.5, framebuffer.size.y * 0.5, 0) -- Create sprite local fontsize = 36 local font = LoadFont("Fonts/arial.ttf") local sprite = CreateSprite(world, font, "Hello, World!", fontsize) local rect = CreateSprite(world, font:GetTextWidth("Hello, World!", fontsize), font:GetHeight(fontsize), true) --sprite:SetPosition(0,0,0) rect:SetPosition((framebuffer.size.x - rect.size.x) * 0.5, (framebuffer.size.y - rect.size.y) * 0.5, 0) sprite:SetPosition((framebuffer.size.x - rect.size.x) * 0.5, (framebuffer.size.y - rect.size.y) * 0.5, 0) -- Main loop while (not window:Closed()) and (not window:KeyHit(KEY_ESCAPE)) do -- Update world world:Update() -- Render world world:Render(framebuffer, true) end Not sure what I'm doing wrong, but I keep getting these errors: Loading font "Fonts/arial.ttf" Error: Failed to load font. Error: Failed to load font "Fonts/arial.ttf" Deleting font "Fonts/arial.ttf" I'm sure arial.ttf is present in the Fonts directory.
  7. Has syntax for CreateSprite function changed? The following line of Lua code produces an error, even though it worked perfectly fine yesterday. local statsSprite = CreateSprite(world, font, "", fontsize)
  8. Thanks for your reply. Amazing! You pointed me in the right direction. Thank you very much! For anyone who might need this in the future, the correct Lua syntax for casting is: local light = Light(self.entity) self.currentRange = light:GetRange()
  9. Hello everyone. How can I access light methods in a Component script attached to a light? I created a Point Light in the editor and attached a simple Component script to it. When I tried to use the light method GetRange() on the entity, it threw an error. What am I doing wrong? Simple Component script: Range = {} Range.name = "Range" Range.currentRange = Vec2(0, 0) function Range:Start() self.currentRange = self.entity:GetRange() end RegisterComponent ("Range", Range) return Range JSON file: { "component": { "properties": [ { "name": "currentRange", "label": "Range", "value": [0.0,0.0] } ] } } Error:
  10. It's amazing what you've been able to create with the Leadwerks engine. This game looks really great. Well done!
  11. Hi Josh, what is the current state of decals? When I try to assign my own material, the screen blinks black, and the viewports turn white. Additionally, when I run the game and turn towards a decal with my material, the game freezes. This is happening in a Lua Project; I haven't tried it in C++ yet. Material: Oil_stains.zip
  12. Hi Josh, after the latest beta update, I'm unable to run a Lua Project game from the Editor or VS Code. The project is updated, but the game freezes at a white screen. Please see the attached screenshots. The C++ Project runs fine. Ultra Engine: Steam beta version 0.9.7 build 1388 GPU: AMD Radeon RX 5700 XT (latest drivers) OS: Windows 10
  13. I use Ubuntu 22.04 and I'm able to run Leadwerks 4.6 with Proton version 7.0-6 (newer versions didn't work), and it works great. Except for two things: Script Editor: No autocomplete. I use VSCodium with the Leadwerks Add-on (can be found on the VS Code marketplace). Running the game from the editor (both normal and debug modes) works only once, the second time, it will crash the whole editor. Instead, I run it from the terminal with Wine (wine "ProjectName".exe). If you want to run the game natively on Linux, publish the game as standalone first, then make the file "ProjectName" executable and run the game the same as any sh script. If you run the game as an sh script from the developing folder, you may experience texture and collider issues.
  14. Hi Josh, in a Lua project, if I run the game directly from the editor using Run (F5), the wrong map is loaded. If I run it in Debug (F8), it loads the correct map. The correct map is also loaded if I run it directly from VS Code. The correct map is set in main.lua, and CreateWindow is set to Fullscreen, so it seems that main.lua might be ignored. Please see the attached screenshot and video link. I've got Ultra Engine Pro on Steam. https://streamable.com/yyg3hi
  15. Upss, sorry I thought you meant Alignment of rocks. My bad.
×
×
  • Create New...