Jump to content

Pleca

Members
  • Posts

    35
  • Joined

  • Last visited

Everything posted by Pleca

  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.
  16. In Foliage Model try to set different Alignment, best for rocks is probably Rotate to normal.
  17. Hi Josh, I'm experiencing exactly same problem with Lua project. https://streamable.com/o5742u
  18. So I installed Visual Studio Community 2022 (Desktop development with C++), created new C++ project in Ultra Engine and it runs perfectly fine. Then a reinstall Visual Studio Code, created new Lua project in Ultra Engine and it also runs without issue. I believe there still was something wrong with redistributables, Visual Studio Community installed new ones and problem is solved. Thank you once again SpiderPig.
  19. I actually installed Visual Studio Code (followed link in Getting Started with Lua) and a project is Lua based. I guess, I'll try to install Visual Studio and maybe try both Lua and C++ based project tomorrow. I've got Pro version. Is there a way, how can I perform clean install of Steam version? If I uninstall it and install it again, it still remembers path to projects and other configuration. BTW thanks for your replies and help.
  20. Yes, they did, without any error. I'm also no longer able to run game directly from Ultra Engine, that happened after a followed Getting Started with Lua. https://streamable.com/626u14
  21. Yes, I do get same errors. I don't have integrated graphics. I've got AMD Radeon RX 5700 XT.
  22. Hi, how did you fix this problem? I tried to follow troubleshooting in Getting started, I also tried to reinstall Ultra Engine, Visual Studio and redistributables with no luck. Currently I'm not even able to run game directly from Ultra Engine.
  23. I voted for FPS, but it's hard to choose. How about a sample game where you can toggle between FPS and TPS?
  24. I think there used to be an issue with PNG images some time ago. I had to use JPG instead. It might be related.
  25. Those maps look awesome. Did you create the models used yourself?
×
×
  • Create New...