Jump to content

Braqoon

Members
  • Posts

    69
  • Joined

  • Last visited

Everything 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. 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.
  5. I do and my kids as well and will not buy overpriced hardware because it's shiny.
  6. 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. Great to hear, any updates will be appreciated. I'm waiting for this in order to purchase the engine.
  8. 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.
  9. Yeah, look here : http://steamcommunity.com/app/251810/discussions/0/613956964581554868/ Author does not want to fix this. For me it's also an important feature which still keeps me back from buying it.
  10. Sure Josh, for me personally is not a massive problem, but single viewport on Linux would be great Thanks
  11. 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.
  12. 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.
  13. 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...