Jump to content

Braqoon

Members
  • Posts

    69
  • Joined

  • Last visited

Posts posted by Braqoon

  1. Hi,

     

    So I can't find a good example or tutorial on how to create a bullet projectile that will fire in given direction and vanish if get off screen or hit an obstacle. On the forum subject of bullets is mostly covered in FPS type game where you would use a raycasting with no visible bullet. Only post that relates to bullet I'm after is http://www.leadwerks.com/werkspace/topic/11941-bullet-hell/page__hl__bullet but to be honest there is no LUA code to start with and there is no answer actually how to go about it.

     

    Did somebody tried to do it ? Please correct me if I'm wrong but it looks like Sprite object will be the most suitable for this.

     

    Let's assume for this exercise that I got a 'turret' that fires in one direction if I press a button. On that action a sprite is being created from within a turret script (texture, initial position, etc) and is being pushed with eg. SetVelocity. (other ? please correct)

     

    1. Can Sprite be created from within a turret script and have own LUA script attached which will describe potential interaction with the World like collision, Velocity etc)

     

    2. Will that bullet become own entity in the World ?

     

    3. Can it be destroyed/released/nullified from the World ? If yes, how?

     

    4. Is is possible to determine is Sprite visible by the players camera ? (eg. Top down static view on a playing field

     

    I'm am still fairly new to Leadwerks but seems that games with shooting mechanics where Raycasting is not a good option as it requires a projectile to be visible and hit not being instant, are not covered too much.

     

    Thanks

  2. Thanks for reply @Dexter. Had to tinker around but I think this will pass for very simplified controller for shmup. Obviously this is a starting point.

     

    function Script:Start()
    --Create a camera
    self.camera = Camera:Create()
    --Update the camera
    self:UpdateCamera()
    self.startposition = self.entity:GetPosition()
    -- Ship Vars
    self.entity:SetMass(1)
    self.entity:SetGravityMode(false)
    self.entity:SetFriction(0,0)
    minimal_speed = 5
    max_speed = 20
    max_pos = 15
    pos = 0
    speed = 5
    throttle = 1
    vel = Vec3(pos,0,speed)
    self.entity:SetVelocity(vel)
    end
    function Script:UpdateCamera()
    self.camera:SetRotation(60,0,0)
    self.camera:SetPosition(self.entity:GetPosition())
    self.camera:Move(0,0,-20)
    end
    function Script:UpdatePhysics()
    --Get the game window
    local window = Window:GetCurrent()
    --Ship movement
    if window:KeyDown(Key.W) then
    if speed < max_speed then
    speed = speed + throttle
    end
    end
    if window:KeyDown(Key.A) then
    if pos > -max_pos then
    pos = pos - throttle
    end
    end
    
    if window:KeyDown(Key.D) then
    if pos < max_pos then
    pos = pos + throttle
    end
    end
    if window:KeyDown(Key.S) then
    if speed > minimal_speed then
    speed = speed - throttle
    end
    end
    vel = Vec3(pos,0,speed)
    self.entity:SetVelocity(vel)
    end
    function Script:UpdateWorld()
    self:UpdateCamera()
    end
    

     

    Above script will not allow to drop velocity lower than min_speed, go higher than max_speed and left/right speed bigger than max_pos. I know this is pointing the obvious but for someone new could be useful.

  3. Hi,

     

    I'm trying to do a simple mockup of a shmup. Taking controls from marble game tutorial at least for a start all seems to be working fine. Applying force to an object works as desired but for obvious reason force looses it's kinetics and object eventually stops. This is all good, but what if I would like to have a minimal speed of an object that moves in one direction. I have used SetVelocity but that also is not constant and value decreases without any update. If I will be updating velocity on UpdateWorld (currently commented out) then AddForce is not working smoothly. Any advice ?

     

    Below my player.lua that controls a box in the world.

    function Script:Start()
    --Create a camera
    self.camera = Camera:Create()
    --Update the camera
    self:UpdateCamera()
    self.health = 100
    self.startposition = self.entity:GetPosition()
    self.entity:SetMass(1)
    self.entity:SetGravityMode(false)
    self.entity:SetFriction(0,0)
    speed = 5
    vel = Vec3(0,0,speed)
    self.entity:SetVelocity(vel)
    --self.entity:AddForce(0,0,200,true)
    end
    function Script:UpdateCamera()
    self.camera:SetRotation(60,0,0)
    self.camera:SetPosition(self.entity:GetPosition())
    self.camera:Move(0,0,-20)
    end
    function Script:UpdatePhysics()
    --Get the game window
    local window = Window:GetCurrent()
    if window:KeyDown(Key.W) then self.entity:AddForce(0,0,50,true) end
    if window:KeyDown(Key.A) then self.entity:AddForce(-50,0,0,true) end
    if window:KeyDown(Key.D) then self.entity:AddForce(50,0,0,true) end
    if window:KeyDown(Key.S) then self.entity:AddForce(0,0,-50,true) end
    end
    function Script:UpdateWorld()
    self:UpdateCamera()
    --self.entity:SetVelocity(vel)
    end
    

     

    Thanks

  4. That's a shame. Guess I'll just get a refund, then.

     

    That's a shame. Guess I'll just get a refund, then.

     

    You did not tried the demo first ? Please don't come up with this like author should feel guilty that editor does not work on tiling window manager. Leadweks works not just on Ubuntu or Ubuntu default window manager so there is quite a lot of flexibility.

    • Upvote 2
  5. There should be a Mac instead of a Linux. Linux market is so small. I do not know anybody that uses Linux for gaming. Instead Mac I see thousands of people using iMacs or laptops all over from children to adults. Linux is used more on Servers or special embedded systems. Yes I know Android uses the kernel but that's other story.

     

    Please Windows (XBox One?"With universal platform") and Mac is the way to go. Also Im waiting for the mobile as Leadwerks 3 supported iOS.

     

    I do and my kids as well and will not buy overpriced hardware because it's shiny.

    • Upvote 2
  6. Respectfully, if you're waiting for this to purchase the engine, I don't think you should buy Leadwerks. Nothing personal, I've just learned from experience that if the present product doesn't meet your basic needs already, it probably never will.

     

    I have enjoyed the trial period while it lasted. I have tried it mainly due editor is native to Linux and has not been disappointed. If you remember my post on Steam and around here I only asked one thing to be fixed which is IMO important if you want to spend more time in it.

     

    Your post suggest you are unlikely to fix it, at least You are honest. Thanks.

  7. Reading through the comments, maybe we can separate the concept of 'resizable' vs 'maximizable'? Josh, do we have the same problem with only having Quarter Screen + Maximum Screen as we would with a draggable resizable border? IE 2 sizes instead of infinite sizes?

     

    Yes i agree. Having option to go from 4 into 1 viewpoint will be perfect, resize on the fly is not that useful but switching to one big window is.

  8. Support for OSX can be turned on relatively easily, but it isn't a high priority right now, especially since it involves a reboot / sync / build every time I post an update. I expect this will be added at some point in the future, but not right now.

     

    Sure Josh, for me personally is not a massive problem, but single viewport on Linux would be great :) Thanks

  9. Also Steam Workshop games are coming this summer. Josh is working on the Leadwerks Game Launcher. This will allow you to publish your games and demos on Steam for free to all users who have downloaded the Game Launcher. Without it you would have to either manually distribute your game (zipped archive) or go through Steam Greenlight hoping you will get accepted.

     

    Yes, for free games or demos this will work, not for commercial though. Greenlight/Steam and other forms of distribution are no problem.

     

    I'm more interested how this engine is ready for commercial releases. OSX release date would be nice too but from posts around this forum it looks like this engine is maintained by one person. This can be a long time.

     

    Thanks for the game, will check it later.

  10. When you publish it makes a standalone game with encrypted assets archive. Your friends, family or customers will not need Leadwerks to play it.

     

    Thanks, that answers one question :) but does publish button generate binary for given OS ? do you have maybe something I can download and see for myself (even one of the default maps)? Linux please if possible, Win is also OK.

  11. Hi All,

     

    I'm using a demo version to evaluate is the engine will be a good purchase. Seems like there is no list what's disabled/ not working in demo version apart from it's just LUA for scripting.

     

    I have tried to publish (create a standalone version of map I have created) but engine does not allow (button is not active). I assume this is due to demo version but would like to be certain.

     

    Does published version of a game will allow anyone who have my game and Leadwerks engine to import maps and models from my game?

     

    How easy is to create main menu or HUD in the game ? Official tutorials and documentations are silent on this.

     

    I already know that Linux version have no single Viewport mode but I suspect that's not all.

     

    Cheers

×
×
  • Create New...