-
Posts
69 -
Joined
-
Last visited
Content Type
Blogs
Forums
Store
Gallery
Videos
Downloads
Everything posted by Braqoon
-
Ouch, yeah that option is not available on Linux Build 4.5. Any other suggestions ? Trying to set Rotation in general settings makes no difference.
-
Hi, This might be trivial but not sure how to solve this. I have crated a simple model in Blender with texture and exported it to .fbx. Imported that to Leadwerks without issue, set collision mesh and placed in 3D space (see attached pic). This is my character in the game , Roomba like cleaning robot. So when i start the game , robot gets flipped 90 degrees. What gives ? When i create a simple cylinder, size of of my object and attach my player script all is fine, cylinder does not flip, and works just fine. Not sure what's going on, any help apprecieated. Player script below. function Script:Start() --Create a camera world:SetAmbientLight(0,0,0) self.camera = Camera:Create() --Update the camera self:UpdateCamera() --Initial Vars self.entity:SetMass(1) self.entity:SetPhysicsMode(Entity.CharacterPhysics) self.pos = 0 self.minimal_speed = -3 self.max_speed = 3 self.lives = 3 self.speed = 0 self.tilt = 0 energy=100.0 energy_max=100.0 energy_min=0 self.energy_depletion = 0 self.lastTime = Time:Millisecs(); self.torch = PointLight:Create() end --Adjust the camera orientation relative to the ball function Script:UpdateCamera() self.camera:SetPosition(self.entity:GetPosition()) self.camera:SetRotation(45,0,0) self.camera:Move(0,4,-7) end function Script:UpdatePhysics() --Get the game window local window = Window:GetCurrent() end function Script:UpdateWorld() --Update the camera each frame if energy > 0 then -- move if you got energy local move = ((window:KeyDown(Key.Up) and 1 or 0) - (window:KeyDown(Key.Down) and 1 or 0))*3 local strafe = ((window:KeyDown(Key.Right)and 1 or 0) - (window:KeyDown(Key.Left) and 1 or 0))*3 if window:KeyDown(Key.Up) or window:KeyDown(Key.Down) or window:KeyDown(Key.Left) or window:KeyDown(Key.Right) then if energy > 0 then if (Time:Millisecs() > self.lastTime + 80) then self.lastTime = Time:Millisecs(); energy = energy -1 end end end self.entity:SetInput(0,move,strafe) else -- out of energy, can't move move = 0 strafe = 0 self.entity:SetInput(0,move,strafe) end -- Light --light = SpotLight:Create() self.torch:SetPosition(self.entity:GetPosition()) self.torch:SetRange(0.2,1.5) self.torch:Move(0,1,0) --self.torch: self:UpdateCamera() end function Script:PostRender(context) context:SetBlendMode(Blend.Alpha) context:DrawText(energy,context:GetWidth()-30,4) end
-
Based on example you have showed it seems like 'small' things and not the whole theme packs are selling better on the . Maybe it's mentality or maybe people just looking for cheaper things on workshop where DLC can be pusshed with higher price.
-
Yes it, does. I would suggest in future builds to have full screen/windowed mode toggle. Linux version of LE game launcher is no longer supported (check bugs section of the forum). Launcher still works hence I was able to check your game. Otherwise game was playable so not a massive problem.
-
I had a go yesterday. Aside what others have mentioned , got one Linux related thing. I think it's a bug in the LE. On Linux going full screen does not work. Window have not resized to full screen and just lost window decoration. You can still play it.
-
Yes Brutile. This is just an example. So overall you need to have a script attached to an object if you want more than physical collision with that object, even if this is just to get the name of the object.
-
Yes, I understand that, basics are simple. I'm wandering how should I approach where collision is a trigger to do other things. Take for example a shooter game (which I got it working), so if ship collides with something that it's not an entity I have no way of telling what it was, and I have to apply one rule for all on such collision. That makes me think that if I want this ship of mine to eg. bounce of the side walls, those walls needs at least a name that collision function of my ship can detect. Otherwise any wall will just trigger collision in the same way and here I might don't want that.
-
Hi, So on collision if object we are colliding with has a script attached to it it will be an entity with eg. name function Script:Collision(entity, position, normal, speed) if(entity:GetKeyValue("name") == "wall") then --Do Something end end Now I guess that in order to code specifically certain behaviours based on what object I'm colliding with, that object should be an entity which equals to have a script attached to it, right ? regardless is that a primitive or a prefab model. Even if that object is doing nothing apart from being just an obstacle. Is that correct ? Is that approach is one that everybody is using or should be used or is there another, simple, go to method of finding about an object player have just collided with ?
-
I'm no expert but looking at your script, you don't control over real speed of the ball. I personally would not use : self.entity:Move((dirX * ballSpeed),0 , (dirZ * ballSpeed),true) Why you are multiplying ? This makes you ball to accelerate very quickly. In your pad movement you are using self.entity:Move(0,0,padSpeed,true) which makes more sense as you moving your object by a constant speed , here padSpeed. Have you tried applied same schema to ball movement ?
-
Uploaded mine just in time : http://www.leadwerks.com/werkspace/page/viewitem?fileid=630002481 http://steamcommunity.com/sharedfiles/filedetails/?id=630002481
-
Hi guys, Finally uploaded my 'game' to the workshop called d4Shmup. This is a simple prof of concept with one playable level. Any feedback is appreciated. If anyone want standalone, please shout out. http://steamcommunity.com/sharedfiles/filedetails/?id=630002481 Update 23/02/16 - Game now available as standalone: http://www.leadwerks.com/werkspace/page/games/_/d4shmup-r109
-
Set perspective view in editor to camera viewpoint?
Braqoon replied to drdt's topic in General Discussion
Old post but question still remains. In View menu there should be camera option to pick if there is at least one camera in the scene. -
I think some short tutorials on specific subjects will be great. Marble game tutorial is very good, but for example is missing how music is playing. I know there is a pivot with noise script, but I have found it by looking for it and guessing. Also why it's nested in pivot is not explained. If it's expected in LE to look into API and Forums on how to do specific but commonly needed things in game then you guys creating a barriers of any new user. Don't expect users are experienced game developers. LE allows to create FPS games with almost no need for coding which is amazing but try to do something extra and hurdle is present. Create tutorials for complete noobs, 12yr olds or users who never tried to do anything in gamedev, then your userbase will grow even more and LE will become more popular. Unity, game maker and alike are so popular due to community, and as harsh it might sound we are still way to small. Don't add new features and add more tutorials about simple things. I can give you few eg. How to detect what is colliding with the player How to share vars between maps ( I know it's simple but for noobs it's not) How to do a title screen (probably a tutorial no.1) Text positioning List is long, but think about what complete green person will need.
-
first RTFM as they say, but truth to be told: "Window::FullScreen: the window will take up the entire screen, and the screen resolution will be changed to match the window size." That does not do what it says at least on the Linux version. It just removes window borders and will not resize to the fullscreen. So you need to readjust screen resolution (I currently don't know can LE probe for current resolution of the display), then apply new resolution and change to Fulscreen to remove border decoration.
-
Hi, API reference does not mention anything but can sprite have a shadow ? Thanks
-
Yes, I understand how it work, thanks.
-
So bullet only can travel forward in my game and cannot be fired from an angle so it travels only forward (on one vector) with constant speed until hit or end of life. I have tested so far on only one model and collision so far works as it should.
-
OK issue resolved. As pointed out correctly travel var was here to blame, changing it to Vec3 sort's the problem out. if self.entity.world:Pick(bullet.position,bullet.position+Vec3(0,0,travel),pickinfo,0,true,Collision.Projectile) then Thanks for pointing it out.
-
As you probably seen my posts in programming section of the forum, I'm try to create something as well. This is my first go at 3D engine but it's going OK minus my little frustrations self-inflicted or otherwise. I'm doing an simple Shm'up and I hope to provide one playable level. Will share some screenshots soon. Based on feedback it might grow to something bigger.
-
Point taken, thanks. Will check this later.
-
Well that's just copy & paste from FPSGun.lua script. I have not altered this.
-
1. This is set correctly. Bullet does hit and collision get's triggered, but like I have mentioned only when sprite hit's vertex on collision mesh of the target. 2. bullet.position = bullet.position+Vec3(0,0,travel) That works no problem. This is done after collision check and it's needed to move the bullet forward.
-
So I have bullets which are sprites. Bullets are fired from a ship towards enemies and when bullet triggers a collision, enemy will get damaged or destroyed. That all works in principle but only when sprite will collide with vertex on collision mesh of the enemy. That results very often that bullet goes trough the object and don't trigger a collision. My bullet creation script: function Script:GetBullet(position) local bullet = Sprite:Create() bullet:SetPosition(Vec3(position.x,position.y,position.z+3)) --bullet:SetPosition(position) bullet:SetViewMode(2) bullet:SetMass(0) bullet:SetGravityMode(false) bullet.origin = Vec3(position.x,position.y,position.z) local mat = Material:Load("Materials/Bullets/bullet1.mat") if mat then bullet:SetMaterial(mat) mat:Release() end return bullet end And my collision detection: function Script:UpdateWorld() local bullet,n,dist local pickinfo=PickInfo() local travel local bspeed=25 local window = Window:GetCurrent() for n,bullet in ipairs(self.bullets) do travel = bspeed/60.0*Time:GetSpeed() if self.entity.world:Pick(bullet.position,bullet.position+travel,pickinfo,0,true,Collision.Projectile) then local enemy = self:FindScriptedParent(pickinfo.entity,"Hurt") table.remove(self.bullets,n) bullet:Release() bullet=nil if enemy~=nil then if enemy.script.health>0 then enemy.script:Hurt(self.bulletdamage,self.player) end end else if bullet ~=nill then dist = (bullet.position-bullet.origin):Length() travel = bspeed/60.0*Time:GetSpeed() bullet.position = bullet.position+Vec3(0,0,travel) bullet:SetPosition(bullet.position) if dist>self.bulletrange then table.remove(self.bullets,n) bullet:Release() bullet=nil end end end end This is largely based on FPSGun.lua Am I missing something ? I'm 99% sure that my sprite bullets only trigger a collision with collision hull vertexes which renders whole idea of using sprites as bullets not usable. Don't think that creating collision hull with big number of vertexes is a good solution.Even Convex Hull type mesh is not 'accurate' enough. Is there a way can I check if bullet is 'inside' of the other object which will trigger a collision ? Thanks
-
Will player will be always in the vehicle ? If so, you need to build control for vehicle as your vehicle will be your player. Applies as well if you want to use vehicle as transport for your FPS player. You just need to find out how to switch what you control.
-
Hi, How one will go about passing variables between maps? For eg. let's take Marble Game. When player reaches trigger to load another map, game map loads from start and you play again, your score is zeroed. What if you want to pass a highscore or some other vars so I can access them in the new map? Should I store those vars globally so they are accessible regardless of what map is loaded ? How do I go about it ? Thanks.