Jump to content

Joh

Members
  • Posts

    474
  • Joined

  • Last visited

Everything posted by Joh

  1. Joh

    Drag'N'Drop

    This probably is a pick-positionentity issue. Remeber that pick is done on updateworld, so probably if you move fast it "lost" the the object, you should just do a pick, something like this: Check if mousedown, check if a boolean pick is true, if not cast a raycast, if yes just position the object till you don't release the button (to do this you can simply put another boolean on top of loop and set it to false, if mouse is down you reset i to true, on the end of the loop you check that variable, if false put the pick to nulland release the object) In this case you'll never lose the object.
  2. Can this help you? http://lua-users.org/wiki/SaveTableToFile
  3. I can understand your feeling but how many time your project will take to get out? Consider that hardware improve day by day, even in 3 months you will have a big improve on graphic card. So probably in a few months low hardware could be a shader 3.0 ... I had this type of complaint too when i bought the engine 1 year ago, also i bought an expensive nvidia 8800 10 months ago.. Now i can see the same card at really low price. Just think about it.
  4. mmm how? There is no any docs on it.. I am able to do it on c++ and bmax, but don't know the way to do it on lua..
  5. This is easy enough, that "checkpoint" are area system normally porgrammer use radius starting from a point, or squared area or in some cases face of a navmesh to check if the player reach the point. Normally they did this in a "clean area" (no enemy, many npc are freeze no strange fx etc..) so the save system is clean and fast. You should check if the prior checkpoint is better, (as for example you pass a checkpoint and come back to an old one, you don't want save it) so save the position of char, his rotation and others (life, npc etc.). You can choose if save on a file (slower) or "keep it in mind" saving it in an array or list/vector (more memory). Let me know if you need more infos.
  6. That was my tought there is no way to check the collision from the body itself.. To do this i should modify all the models to handle collision with that body OR create an "empty" model to do this.. So for example if i wanna check the collision from 2 bodies created directly on code?
  7. Blitz3d it was a quite good engine, but it's really old and many users can't do anything more then a Mario game with it. Many users buy Leadwerks just to have more speed and better rendering. We all know that you like Blitz3d but probably we don't care about it. Love it in Blitz3d forum please.
  8. Also don't forget that if you create terrain mesh you don't even have clod so you will have a tons of poly on your screen. If you really need to have more terrain you should write it by code, but as Josh said this will take many time, almost depend in how many time you have and also how good you are.. Doing a bad terrain won't help you tough. You could create an rpg that wehn you reach the border you unload the map and load anotehr one, i remember that a final fantasy did this.
  9. Mmm seem this doesn't help me at all. What i am trying to do if check if a body (created by code) is collided or not. I don't need to know more other infos, just if it's collided. The oildrum code it's seem a little different it created a class for a model and so took the object and check the collision.. Did i need to create an empty gmf and create a lua file as oildrum have?
  10. mmm didn't read your name at all.. I know wich game are you making Well could you explain better wich is the problem?
  11. What do you mean exaclty? I think you mean save player position, and status. In this case you should create a file where you simply store all the data you may need. I did 2 type of save in my game normally, 1 where i store the option (graphics, sound etc.) and second type is game type save. How do this depend in your game. As for example in a race game if you save during the race, you'll need to save all the car position, rotation, speed, eventually damage, fuel, weather, consumed tyre etc.. In an rpg you probably should save quest (best use boolean). Etc. If you could tell me wich game you are creating i could try to help you more in deep.
  12. Yeah i know about vec2 vec3 and vec4, but i was meaning c/c++ vector ( http://www.cplusplus.com/reference/stl/vector/ ) Thx for the collision issue, i didn't found that on oildrum.
  13. Nice! But i think we are a little out of topic If you create your own topic i will write there.
  14. Nice i like those effect In past i worked on a "gravity granade" wich was quite funny..
  15. Thx for the answer! Anyway my big problem is about collision as i am making a tool wich need collision..
  16. I need to check it before.. Lua array are undefinited, so you can create an array like this: array = {} for i=1, 100 do array[i] = 0 end In this case we could do something like this i guess: Function addLast (a) array[counter] = a counter = counter + 1 end Function removeFirst() a = array[0] for i=0, counter-1 array[i] = array [i+1] end array[counter] = nil counter = counter - 1 return a end I need to check it, it obviously not a list but it can work.
  17. Anyone known? Seem really strange.. There is nobody who need to check collision on theyr game using lua? I think to have found a sort of solution for list/vector.
  18. Well i don't know how to explain.. This isn't a leadwerks bug as the camera is using MouseY to rotate, if this wasn't work correctly you won't be able to rotate the camera too. So my question did you try the Mumbles code? Same things happend?
  19. You used reaycast and then addforceatpoint right? Strangly when you "disabled" the gravity the already sleeping physics body wasn't effected.. I think you'll need to loop into all those body to reactive them. Am i right?
  20. Well there is a lot of confusing things here.. You are calling MouseY() before the update 2 times and after it 1 time. It's better to call it less time possible.. (As for example use a variable wich store theyr position during the loop), anyway you also put the mouseon the center of the screen too.. Couldn't you simple use dy to check it? Also i don't see where you are checking the mousebutton is held down..
  21. Well isn't harder then this: //This is where we set the position TVec3 V = TFormVector( Vec3(0,0,1), gun, null ); V= Vec3(EntityPosition(gun).x +V.x,EntityPosition(gun).y +V.y,EntityPosition(gun).z +V.z); Now you should only point to the currect direction and translate.
  22. Why are you using 2 MouseY() in one loop? Wich language are you using? If you use blitzmax try to put a FlushMouse () on the end of the loop.
  23. In c++/bmax we use collision callback to have infos from collision wath i should use on lua? Is there any way to create a vector/list on lua? Thx.
  24. Not exactly.. You need to find local position of gun before. Check this link http://leadwerks.com/werkspace/index.php?/topic/1620-solved-placing-objects-in-front-of-you/ I know that's lua but the code is really similar.
  25. I think there are 2 ways to do this: 1) Store object rotation and re-set it every loop (till you keep it) 2) Use SetBodyOmega with a vec3(0) till keep it (this should "freeze" the body) Never tested so it can be wrong.
×
×
  • Create New...