Jump to content

Brutile

Members
  • Posts

    314
  • Joined

  • Last visited

Everything posted by Brutile

  1. Unfortunately, those didn't work. I'm convinced there's a correlation between the ball falling through and the seam where the two trianges meet to create the polygon of the surface.
  2. I decided to make a mini golf game for the game tournament, but I'm being haunted by some physics bug. I have a ball that is 0.1 scale and after it gets hit, once it gets to a specific point, it falls throught the floor. It happens without fail. The hotspot seems to be in the middle of the CSG where the two triangles meet. Even when I scale the ball to 1, it doesn't fall through the floor, but it does hit a bump and put it off course. Here's my script in case you can see anything that might be wrong. Script.mouseSensitivity = 2.0 Script.camOffset = Vec3(0, 1, -3) Script.camSmoothing = 10.0 Script.hitForce = 350 function Script:Start() --initialize camera self.camera = Camera:Create() self.camera:SetFOV(70) self.camera:SetRange(0.05, 1000) self.camera:SetMultisampleMode((System:GetProperty("multisample", "4"))) self.camera:SetRotation(self.entity:GetRotation(true)) self.camera:SetPosition(self.entity:GetPosition(true) + self.camOffset) --add listener as camera self.listener = Listener:Create(self.camera) --create player model self.entity:SetPosition(self.entity:GetPosition(true) + Vec3(0, 0.1, 0), true) self.model = Model:Sphere() self.model:SetScale(0.1, 0.1, 0.1) self.model:SetPosition(self.entity:GetPosition(true), true) self.model:SetParent(self.entity) self.model:SetColor(1,1,1) --setup ball physics self.entity:SetMass(1) self.entity:SetFriction(0.1, 0.1) self.entity:SetSweptCollisionMode(true) --Create a shape local shape = Shape:Sphere(0,0,0, 0,0,0, 0.1,0.1,0.1) self.entity:SetShape(shape) shape:Release() --set collision type of player self.entity:SetCollisionType(Collision.Prop) local window = Window:GetCurrent() local context = Context:GetCurrent() window:SetMousePosition(Math:Round(context:GetWidth() / 2), Math:Round(context:GetHeight() / 2)) self.mouseDifference = Vec3(0, 0, 0) self.camRotation = Vec3(0, 0, 0) self.camera:SetRotation(self.camRotation) end function Script:UpdateWorld() local window = Window:GetCurrent() local context = Context:GetCurrent() --mouse look self.currentMousePos = window:GetMousePosition() window:SetMousePosition(Math:Round(context:GetWidth() / 2), Math:Round(context:GetHeight() / 2)) self.currentMousePos.x = Math:Round(self.currentMousePos.x) self.currentMousePos.y = Math:Round(self.currentMousePos.y) self.mouseDifference.x = Math:Curve(self.currentMousePos.x - Math:Round(context:GetWidth() / 2), self.mouseDifference.x, 3) self.mouseDifference.y = Math:Curve(self.currentMousePos.y - Math:Round(context:GetHeight() / 2), self.mouseDifference.y, 3) self.camRotation.x = Math:Clamp(self.camRotation.x + self.mouseDifference.y / self.mouseSensitivity, 0, 70) self.camRotation.y = self.camRotation.y + (self.mouseDifference.x / self.mouseSensitivity) --camera orbit around ball self.camera:SetRotation(self.camRotation) self.camera:SetPosition(self.entity:GetPosition(true), true) self.camera:Move(self.camOffset) --hit the ball if window:MouseHit(1) then local c = self.camera:GetPosition(true) local p = self.entity:GetPosition(true) local dir = p - Vec3(c.x, p.y, c.z) dir = dir:Normalize() * self.hitForce self.entity:AddForce(dir) end end All I did was create a new map, added a pivot at 0,0,0 with this script assigned, then created a CSG cube at pos: 0, -16, 2688 and size: 512cm, 32cm, 5888cm. Hit the ball without moving the mouse and it will get half way down and fall through. I even tried a small 512x512 floor with walls and just hit it around. Eventually it would fall through.
  3. If you can't find a way in the editor, you could do it at runtime. Just do a whole bunch of raycasts downwards at random positions to get the position to spawn them.
  4. Yeah, It's Nvidia. I have the latest driver. I'll just work around it, especially if it's only happening to me.
  5. How do I re-render the shadowmap? Dynamic shadows fix it, but I'd rather not.
  6. Strange, I haven't seen this bug outside of Leadwerks. I'll try to work around it, but it's a little frustrating when you can't take decent screenshots because of it.
  7. I'm getting weird stuff going on with my shadows. I used to get this when I had 2 lights intersecting, but I only have 1. I've tried setting the light quality to 2, but it still does this. Is this a bug, or am I doing something wrong?
  8. Thanks for the advice and support everyone. I should just point out that I still have a job and have decent income to support myself. I'm in no rush to release anything, it's more for the learning experience of doing things myself. Same goes for GameMaker. I want to learn native development. While a game engine would be more efficient, I'm not really looking for a quick buck. I'm not expecting to become successful overnight, so I will make my first game with no tools at all, learn from it and decide what the best way of going forward will be.
  9. Thanks for the advice. I plan on doing regular dev logs on my progress, so hopefully that will be enough to keep people interested before I actually release anything. Concept art is a great idea, but unfortunately that's one of the things I'm not so great at. I'm sure I will be able to make something in due time.
  10. This is my very first blog, so I'm not sure the ins and outs of writing one. I will do my best and hopefully become better at writing them. In the last few weeks, I have been contemplating starting a business in making games. I have done countless research on starting a business and have finally come to a point where I'm ready to begin registering the business and getting a website up and running. I have decided to write a blog on said website, which will mainly consist of dev logs on the game I will be working on. I also plan on making dev logs on YouTube, showing my progress, not only for other to see, but also for a record of what I did so I can learn from it for future projects. My first game will be on iOS, as 3D games are just too ambitious. The plan is to make a 2D action RPG. It's not going to be as complex as Pokemon or Zelda, but will be big enough to keep my interest. A lot of people suggest making simple games first, but that doesn't interest me. I want a challenge. Hopefully running a business will kind of force me to stick with a project, instead of just making a prototype and moving on. My first hurdle has been making the website. I've decided not to use a CMS such as Wordpress, as I have enough web experience to make my own. I want it to be customizable and I want to make it as secure as possible for when I start implementing a login mechanism with mailing lists and the sort. I have the skeleton of a website with enough visual fidelity to be released, but I just don't know what content to put in. I don't have any images to put up and I'm not sure what to write, as I haven't actually done much development work yet. I'd love to know what you guys think I should add. The website isn't public, so I can't show you what I have, but if you have any experience with this kind of thing, I'd love to hear from you. I hope to write more blogs like this in the future, so any feedback on my writing or suggestions on starting a business would be greatly appreciated. Also, If you are thinking of starting an indie game business of your own, I'd be happy to share the info that I have gathered.
  11. You want it ticked, because the door is an obstacle. Check out how its done in the fps template in the events and AI tutorial map.
  12. I'm pretty sure he means to literally bounce off the walls. i.e. adding force velocity, rather than just colliding.
  13. In that example, I would personally create a script just for the walls that apply a force to any object that touches it. That way it stays consistent, but that might not be what you want, so I guess its up to you how to go about it. You could either do the collision on the player and check for a name, or a have a script for the walls that checks for the player (or maybe all objects). If your walls don't specifically have a collision shape, then I would write a script for the wall to create a collision shape.
  14. If its just an obstacle, it doesn't need a script. You make the collision function in the player for example, and when the player collides with something the Collision function will be called, which passes the entity that you collided with so you can do something with it.
  15. I've noticed that lights don't work when using the orthographic camera view. I have a top down camera in orthographic view with a spotlight facing downwards. The light doesn't work unless I leave the camera as perspective.
  16. What about xcf (GIMP image file)? Is this likely to be added in the future?
  17. My original question was due to the fact that I made a similar demo with a much bigger size (double, or even tripple) on another engine and was getting something like 2000-3000fps and there was no stuttering at all. I just felt that something was hindering the performance somehow.
  18. I did this previously. 32x32x32 seems to be the largest size without stuttering when rebuilding the chunk. Is there a way to merge meshes without needing to create a whole new mesh? I know I'd probably need to recalculate the AABB, but if I could easily merge meshes and even collision shapes, that would be awesome. Thanks!
  19. There are only 256 entities, and there are no shadows being drawn.
  20. You can try it here https://www.dropbox.com/s/tn43uw52mn11quc/Voxel_Terrain.zip?dl=0 but it's procedurally generated, so I don't have a map file you can look at. F4 will allow you to see the verts. It's using one material with a texture atlas, so it only has one draw call per model, which is 16x16 blocks.
  21. Would you say that 50,000 tris is a lot for a scene? I'm getting 150fps, but it just seems like it should be getting a lot more. That's even after removing the lights and using just the ambient light.
  22. Interesting, thanks for that explanation.
  23. I'm looking in the header file for Brush in C++ and there is a function called FindSurface(). You pass a material and it returns a surface with that material in the brush. Try that.
×
×
  • Create New...