Jump to content

Clackdor

Members
  • Posts

    227
  • Joined

  • Last visited

Everything posted by Clackdor

  1. Will somebody explain to a graphics noob what I'm looking at here? I'm having a hard time seeing the differences on the cave screenshot comparison.
  2. It's a TPick. TPick raycast;
  3. Clackdor

    Ravage Online

    Would be interested in beta testing.
  4. I have a camz variable that is controlled by the MouseZ function. It affects how far from the PlayerController the camera is. camz = MouseZ(); PositionEntity (camera,Vec3(0,0,camz); To initiate camera collisions, I position a second pivot about 0.2m from the pivot used to rotate the camera. This means that my raycast won't be affected by the mesh. pivot2 = CreatePivot(pivot); PositionEntity(pivot2,Vec3(0.0f,0.0f,0.2f)); PointEntity(pivot2,camera) Then I do a EntityPick command from that second pivot to the camera. If there is a collition, I put a third pivot at the point of the collision. If camz is less than the distance to that 3rd pivot, I ignore the collision. Otherwise, the camz variable is overridden by the collision. if (EntityPick(&raycast,pivot2,10.0f,1)) { PositionEntity(pivot3,Vec3(raycast.X,raycast.Y,raycast.Z)); PositionEntity(camera, Vec3(0,0,Min(camz, EntityDistance(controller,pivot3)-1.0f))); } else { PositionEntity(camera, Vec3(0,0,camz)); }
  5. Look here: http://www.leadwerks.com/werkspace/topic/4380-my-3rd-person-character-controller/ Is this the effect you want? The code I used for camera collision is in the last post of that thread.
  6. Useful code, thanks Aily.
  7. There's probably a team dedicated to cliffs in WOW. Blizzard has a **** load of resources.
  8. I really like the foliage, also.
  9. Taken directly from my source. pivot2 is an entity that is on a line between the character and camera, but positioned a little ways out so that the ray does not hit the character mesh. It basically makes a circle around the character mesh. Because the TPick raycast collision location is given in global coordinates, I position a pivot3 at that location instead of doing Vec3 math and figuring out local/global conversion. if (EntityPick(&raycast,pivot2,10.0f,1)) { PositionEntity(pivot3,Vec3(raycast.X,raycast.Y,raycast.Z)); PositionEntity(camera, Vec3(0,0,Min(camz, EntityDistance(controller,pivot3)-0.7f))); } else { PositionEntity(camera, Vec3(0,0,camz)); } FYI, I decreased the frequency of the images shown in number 2 of Ken's comments by adding that 0.7f modifier shown above and also adjusting my near camera frustum range to 0.01.
  10. Thanks a lot for this feedback, Ken! I will play around with the camera collision some more. It's only been implemented for a day. The strafe code is actually commented out. This character doesn't have a strafe animation. I'll have to add it. I also need to reverse the walking animation so it looks more correct when she is walking backwards.
  11. Got it. Replace character.exe in the zip with this one. Character.exe
  12. W - forward S - backward A - turn left D - turn right 1 - Sword Swing (no sword model loaded, though) Mouse right click to turn your character with the mouse. Mouse left click to look around, but not change direction.
  13. Blah, using abstract instead of that zip::///nonsense worked better. Thanks for the help.
  14. I also tried using abstract paths. Do I simply need to put the .pak in the abstract path somewhere. So "abstract::scene.gmf" will find it whether its in the .pak or not?
  15. Solved. So, what is the correct procedure for making a .pak and then using it in my Leadwerks program? Please illustrate where I'm going wrong: 1. Create data.zip with WinZip. Use Encryption to give it a password. Right click, rename to data.pak. DO THIS. 2. SetZipStreamPassword("data.pak","password"); invoked before loading any meshes. DO THIS. 3. TModel scene = LoadModel("zip::data.pak//scene.gmf"); This is where my program fails. Instead of this use: TModel scene = LoadModel("abstract::scene.gmf"); Make sure your data.pak file is in the same directory as the exe or wherever you used Registerabstractpath();
  16. I have AppSpeed() plus an additional animationspeed variable so I can tweek how the animations look in code, as well. Now, go blend animations. Whenever a new animation starts my code sets blend to 1.0 and counts it down over a period of 0.25 seconds. Looks very nice. if (blend >= 0.0f) { blend = blend - AppSpeed()*0.0667f; } else { blend = 0.0f; } //Perform the animations Animate(mesh,frame2,blend,0,true); Animate(mesh,frame1,1.0f-blend,0,true);
  17. I think you may be mis-understanding visibility (or I am misunderstanding you). 1. Visibility in your screenshot is to make "holes" in the terrain for caves or underground areas. You would usually place a model here for your character to enter. If you don't, he just falls through the world. IE, a basement in a structure that you enter from ground level would have the terrain removed inside the building. 2. The first terrain texture is automatically painted EVERYWHERE. You need to paint over it with other textures instead of trying to make it invisible somewhere.
  18. Thanks for posting this. It was useful to take some of your methods and adapt my own. I will need to post my 3rd person controller here soon.
  19. That's very similar to what I do. And, yeah, it was based off of what Rick told me some time ago.
  20. So, I'm a little obsessed with improving performance right now. Can't seem to focus on moving on to coding game play at least until I understand some things. I'm taking a look at the values in the SetStats() function. FPS - self explanitory Polys - got it Shadow Polys - got it Mem Usage - got it World Render Time - Is this all of the other times (Entity Draw Time, Terrain Draw Time,Vegetation Draw Time) added up? Seems like it. Octree update time - Whats this? Entities drawn - Seems straightforward. Batch Draw Time Batches drawn - What is a batch in this context? My number of batches is very high compared to some of the sample .sbx files that come with LW.
  21. I guess I'm not sure I understand the question then. Sorry.
  22. mx=Curve(MouseX()-GraphicsWidth()/2,mx,6); my=Curve(MouseY()-GraphicsHeight()/2,my,6); PivotRotation.X += my/15; PivotRotation.Y -= mx/15; I do the curve when calculating the mx and my values. I, also, add the /15 modifier to make it not rotate as fast with the mouse in that same piece of code in my project. Of course, it could be made into a modifiable value based on user preference.
  23. I did this with trigonometry. Parented the camera to the player controller. Parented a Pivot that was about shoulder high. See my video for how this looks. PositionEntity(camera,Vec3(0,1+mz*sin(atan(camrotation.X/40)),mz*cos(2*3.14-atan(camrotation.X/20)))); PointEntity(camera,pivot);
  24. What happens when you DrawRect();?
×
×
  • Create New...